Move Map and Set to stdlib, fixes #17

This commit is contained in:
dcodeIO
2018-06-21 16:55:51 +02:00
parent 7ed55f7ea6
commit 1626e50b0f
11 changed files with 4186 additions and 5200 deletions

View File

@ -27,16 +27,4 @@ export class ArrayBuffer {
move_memory(changetype<usize>(buffer) + HEADER_SIZE, changetype<usize>(this) + HEADER_SIZE + begin, newLen);
return buffer;
}
// internals
static readonly HEADER_SIZE: usize = HEADER_SIZE;
@inline load<T>(index: usize): T {
return load<T>(changetype<usize>(this) + index * sizeof<T>(), HEADER_SIZE);
}
@inline store<T>(index: usize, value: T): void {
store<T>(changetype<usize>(this) + index * sizeof<T>(), value, HEADER_SIZE);
}
}