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

@ -1,5 +1,3 @@
import "allocator/arena";
// trailing conditional allocate
class EmptyCtor {
constructor() {}
@ -46,7 +44,7 @@ var justFieldNoInit = new JustFieldNoInit();
// explicit allocation with no extra checks
class CtorReturns {
constructor() {
return changetype<CtorReturns>(memory.allocate(0));
return changetype<CtorReturns>(0);
}
}
@ -58,7 +56,7 @@ var b: bool = true;
class CtorConditionallyReturns {
constructor() {
if (b) {
return changetype<CtorConditionallyReturns>(memory.allocate(0));
return changetype<CtorConditionallyReturns>(0);
}
}
}