Load/store constant offset utility

This commit is contained in:
dcodeIO
2018-01-21 16:34:50 +01:00
parent b77646df6e
commit a257b6e529
11 changed files with 327 additions and 27 deletions

View File

@ -273,7 +273,7 @@ function gc_scan_fn(control: Control, header: ObjectHeader | null): void {
} else {
// visit all referenced objects using the compiler's knowledge of this
// object's layout
var classId = load<u32>(changetype<usize>(header) + ObjectHeader.SIZE);
var classId = load<u32>(changetype<usize>(header), ObjectHeader.SIZE);
// switch (classId) {
// arrays
// strings