You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
-mm=rc/own: a global object literal { s: mk() } is freed at start #461
Actual, tslang --emit=jit --no-default-lib, main 8b9d631:
gc: made1.
rc: k15.
own: k21. Freed memory, reused by the keep loop.
The same literal as a local (const o = { s: mk() } inside main) prints made1 under rc. So the problem is the global initializer not taking over the field's reference. This is related to #459 (a Node | null global initialised from a call) but is a different shape. Found by the review of Shared<T> (own phase 8), where a global { s: mkS() } holding a handle crashes the same way.
Activity
rc: a global object literal takes over what its fields were given (#461)