1
0
mirror of https://github.com/fluencelabs/assemblyscript synced 2025-06-22 03:01:55 +00:00

Polyfill move_memory and set_memory and remove Heap

This commit is contained in:
dcodeIO
2018-01-14 02:30:20 +01:00
parent 2c009c67d3
commit ad469ca445
33 changed files with 8529 additions and 5057 deletions

@ -1,4 +1,4 @@
var arr = changetype<i32[]>(Heap.allocate(sizeof<usize>() + 2 * sizeof<i32>()));
var arr = changetype<i32[]>(allocate_memory(sizeof<usize>() + 2 * sizeof<i32>()));
assert(arr.length == 0);
assert(arr.__capacity == 0);
@ -36,7 +36,7 @@ assert(arr[0] == 43);
assert(arr[1] == 44);
assert(arr[2] == 45);
arr.unshift(42); // see FIXME in std:array
arr.unshift(42);
assert(arr.length == 4);
assert(arr.__capacity == 4);