Merge pull request #1072 from alexcrichton/dense

Ensure our JS heap is a dense array
This commit is contained in:
Alex Crichton 2018-11-30 16:00:52 -06:00 committed by GitHub
commit 0e1494f2a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -907,6 +907,7 @@ impl<'a> Context<'a> {
return;
}
self.global(&format!("const heap = new Array({});", INITIAL_HEAP_OFFSET));
self.global("heap.fill(undefined);");
self.global(&format!("heap.push({});", INITIAL_HEAP_VALUES.join(", ")));
}