directize more (eliminate table use)

This commit is contained in:
dcode
2019-04-02 16:18:44 +02:00
parent 6bf8276746
commit e1bd0050e2
45 changed files with 4202 additions and 5869 deletions

View File

@ -2,6 +2,7 @@
import { HASH } from "./util/hash";
import { __runtime_id } from "./runtime";
import { __gc_mark_members } from "./gc";
// A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht
@ -283,11 +284,11 @@ export class Map<K,V> {
if (isNullable<K>()) {
if (val) {
__ref_mark(val);
call_direct(__runtime_id<K>(), val);
__gc_mark_members(__runtime_id<K>(), val);
}
} else {
__ref_mark(val);
call_direct(__runtime_id<K>(), val);
__gc_mark_members(__runtime_id<K>(), val);
}
}
if (isManaged<V>()) {
@ -295,11 +296,11 @@ export class Map<K,V> {
if (isNullable<V>()) {
if (val) {
__ref_mark(val);
call_direct(__runtime_id<V>(), val);
__gc_mark_members(__runtime_id<V>(), val);
}
} else {
__ref_mark(val);
call_direct(__runtime_id<V>(), val);
__gc_mark_members(__runtime_id<V>(), val);
}
}
}