mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-17 00:41:32 +00:00
Rename memory instructions; Rework constant handling
This commit is contained in:
@ -46,7 +46,7 @@ var justFieldNoInit = new JustFieldNoInit();
|
||||
// explicit allocation with no extra checks
|
||||
class CtorReturns {
|
||||
constructor() {
|
||||
return changetype<CtorReturns>(allocate_memory(0));
|
||||
return changetype<CtorReturns>(memory.allocate(0));
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ var b: bool = true;
|
||||
class CtorConditionallyReturns {
|
||||
constructor() {
|
||||
if (b) {
|
||||
return changetype<CtorConditionallyReturns>(allocate_memory(0));
|
||||
return changetype<CtorConditionallyReturns>(memory.allocate(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user