mu-spec issueshttps://gitlab.anu.edu.au/mu/mu-spec/-/issues2018-02-19T20:22:27+11:00https://gitlab.anu.edu.au/mu/mu-spec/-/issues/19push_frame should take frame cursor as parameter2018-02-19T20:22:27+11:00Kunshan Wangpush_frame should take frame cursor as parameterIt is a mistake when refactoring the API to use frame cursors. https://gitlab.anu.edu.au/mu/mu-spec/commit/9853cbddf3f34eef88e8f884e162a8789ccb41cc
All functions related to stack manipulation should take a frame cursor as a parameter. ...It is a mistake when refactoring the API to use frame cursors. https://gitlab.anu.edu.au/mu/mu-spec/commit/9853cbddf3f34eef88e8f884e162a8789ccb41cc
All functions related to stack manipulation should take a frame cursor as a parameter. Therefore,
```c
void (*push_frame )(MuCtx *ctx, MuStackRefValue stack, MuFuncRefValue func);
```
should be
```c
void (*push_frame )(MuCtx *ctx, MuFCRefValue cursor, MuFuncRefValue func);
```Kunshan WangKunshan Wanghttps://gitlab.anu.edu.au/mu/mu-spec/-/issues/18Branch to entry block2017-09-18T09:06:53+10:00Zixian CaiBranch to entry block> The entry block must not be branched to from any basic blocks.
Why is this restriction here?> The entry block must not be branched to from any basic blocks.
Why is this restriction here?https://gitlab.anu.edu.au/mu/mu-spec/-/issues/15MOVED TO mu-impl-fast2018-01-26T04:47:41+11:00Isaac Garianoisaac@ecs.vuw.ac.nzMOVED TO mu-impl-fasthttps://gitlab.anu.edu.au/mu/mu-spec/-/issues/12Returning exit status from a Mu program2018-01-26T04:47:41+11:00Isaac Garianoisaac@ecs.vuw.ac.nzReturning exit status from a Mu programCurrently there does not appear to be a standard way in Mu to return an exit status from a program, or pass arguments to it, e.g. you could do this is c:
int main(int argc, char* argv[])
{
return argc;
}
To implement this i...Currently there does not appear to be a standard way in Mu to return an exit status from a program, or pass arguments to it, e.g. you could do this is c:
int main(int argc, char* argv[])
{
return argc;
}
To implement this in Mu, you have to return an exit status by CCALLing the c 'exit' function, (which is bad as CCALL is implementation specific).
```
.typedef @int32 = int<32>
.typedef @char = int<8>
.typedef @string = uptr<@char>
.typedef @string_array = uptr<@string>
.funcsig @main_sig = (@int32 @string_array)->()
.funcdecl @my_main <@main_sig>
.funcsig @exit_sig = (@int32) -> ()
.typedef @ufp_exit = ufuncptr<@exit_sig>
.const @const_exit <@ufp_exit> = EXTERN "exit"
.funcdef @my_main VERSION @my_main_v1 <@main_sig>
{
%entry(<@int32>%argc <@string_array>%argv):
CCALL #DEFAULT <@ufp_exit @exit_sig> @const_exit (%argc)
RET
}
```
I suggest altering the spec to allow the primordial function to have the signature `(int<32>, uptr<uptr<char>>)->(int<32>)` and have it behave like the c main function. If there are multiple threads, each with there own 'root' function, I suggest having the first one to return an int `i` be equivalent to calling `exit(i)`, if you don't wan't the program to die, then you'd use `THREADEXIT` instead.
So that above could be rewritten as:
```
.funcdef @my_main VERSION @my_main_v1 <(@int32 @string_array)->(@int32)>
{
%entry(<@int32>%argc <@string_array>%argv):
RET %argc
}
```https://gitlab.anu.edu.au/mu/mu-spec/-/issues/5Meta ID/Name conversion name string `\0`-terminated2018-01-26T04:47:41+11:00John ZhangMeta ID/Name conversion name string `\0`-terminatedIs `%name` in `[0x250]@uvm.meta.id_of (%name: @uvm.meta.bytes.r) -> int<32>` a `\0`-terminated string? It seems that in the reference implementation there is such assumption.
Maybe it's good to make it clear in the spec?Is `%name` in `[0x250]@uvm.meta.id_of (%name: @uvm.meta.bytes.r) -> int<32>` a `\0`-terminated string? It seems that in the reference implementation there is such assumption.
Maybe it's good to make it clear in the spec?Kunshan WangKunshan Wanghttps://gitlab.anu.edu.au/mu/mu-spec/-/issues/1Casts in muapi.h, please2018-01-26T04:47:41+11:00John ZhangCasts in muapi.h, please*Created by: eliotmoss*
Things like MU_BINOP_ADD should have the cast to MuBinOptr, e.g.:
#define MU_BINOP_ADD ((MuBinOptr)0x01)
(This is the consensus of the UMass team + Tony)*Created by: eliotmoss*
Things like MU_BINOP_ADD should have the cast to MuBinOptr, e.g.:
#define MU_BINOP_ADD ((MuBinOptr)0x01)
(This is the consensus of the UMass team + Tony)