Replaced builtin store function with a new syntax
This commit is contained in:
@ -7,6 +7,6 @@ alloc(length int) -> []byte {
|
||||
return x
|
||||
}
|
||||
|
||||
store(x, 8, length)
|
||||
[x] = length
|
||||
return x + 8
|
||||
}
|
@ -5,7 +5,7 @@ alloc(length int) -> []byte {
|
||||
return x
|
||||
}
|
||||
|
||||
store(x, 8, length)
|
||||
[x] = length
|
||||
return x + 8
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,9 @@ import sys
|
||||
create(func *any) -> int {
|
||||
stack := sys.mmap(0, 4096, 0x1|0x2, 0x02|0x20|0x100)
|
||||
stack += 4096 - 8
|
||||
store(stack, 8, core.exit)
|
||||
[stack] = core.exit
|
||||
stack -= 8
|
||||
store(stack, 8, func)
|
||||
[stack] = func
|
||||
return sys.clone(clone.vm|clone.fs|clone.files|clone.sighand|clone.parent|clone.thread|clone.io, stack, 0, 0, 0)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user