directize

This commit is contained in:
dcode
2019-04-02 10:12:57 +02:00
parent 1ada854830
commit 3bcd32f3ba
91 changed files with 4225 additions and 4615 deletions

View File

@ -1,4 +1,4 @@
import { runtime, classId } from "./runtime";
import { runtime, __runtime_id } from "./runtime";
import { ArrayBufferView } from "./arraybuffer";
import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort";
import { E_INDEXOUTOFRANGE } from "./util/error";
@ -967,7 +967,7 @@ function SUBARRAY<TArray extends ArrayBufferView, T>(
changetype<ArrayBufferView>(out).data = data; // links
changetype<ArrayBufferView>(out).dataStart = dataStart + (<usize>begin << alignof<T>());
changetype<ArrayBufferView>(out).dataLength = (end - begin) << alignof<T>();
return changetype<TArray>(runtime.register(out, classId<TArray>()));
return changetype<TArray>(runtime.register(out, __runtime_id<TArray>()));
}
// @ts-ignore: decorator