Rework static memory segment creation; Fix stdlib gc hooks not marking own fields; Align everything to 8 bytes that might be touched by GC

This commit is contained in:
dcodeIO
2018-08-04 00:36:59 +02:00
parent 61de7cf962
commit 631478c7c9
61 changed files with 11944 additions and 5286 deletions

View File

@ -166,8 +166,10 @@ export class Map<K,V> {
}
private __gc(): void {
__gc_mark(changetype<usize>(this.buckets)); // tslint:disable-line
var entries = this.entries;
__gc_mark(changetype<usize>(entries)); // tslint:disable-line
if (isManaged<K>() || isManaged<V>()) {
let entries = this.entries;
let offset: usize = 0;
let end: usize = this.entriesOffset * ENTRY_SIZE<K,V>();
while (offset < end) {