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

@ -476,8 +476,8 @@ export function allocateBlock(root: Root, size: usize): Block {
if (DEBUG) assert(block); // must be found now
}
if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit
block.gcInfo = 0;
block.rtId = 0; // not determined yet
block.gcInfo = 1; // RC=1
// block.rtId = 0; // set by the caller (__alloc)
block.rtSize = size;
removeBlock(root, <Block>block);
prepareBlock(root, <Block>block, payloadSize);