rt hooks all over the place

still some work to do on optimizing away retain/release calls, but this looks promising
This commit is contained in:
dcode
2019-05-15 21:17:41 +02:00
parent cb09edf677
commit f73d807d5a
99 changed files with 8237 additions and 18460 deletions

View File

@ -87,7 +87,7 @@ function weakHeapSort<T>(
const shift32 = alignof<u32>();
var bitsetSize = (length + 31) >> 5 << shift32;
var bitset = memory.allocate(bitsetSize); // indexed in 32-bit chunks below
var bitset = __alloc(bitsetSize, 0); // indexed in 32-bit chunks below
memory.fill(bitset, 0, bitsetSize);
// see: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.21.1863&rep=rep1&type=pdf
@ -133,7 +133,7 @@ function weakHeapSort<T>(
}
}
memory.free(bitset);
__free(bitset);
var t: T = load<T>(dataStart, sizeof<T>()); // t = arr[1]
store<T>(dataStart, load<T>(dataStart), sizeof<T>()); // arr[1] = arr[0]