In chapter 26, In the implementation of markCompilerRoots, the GC only mark the functions outward from the current function, what about function next to it (its sibling)?
For example:
fun a() {}
fun b() {}
When compiling b, let's say it triggers a garbage collection, markCompilerRoots will not mark a to avoid it from being collected. Isn't it supposed to do so?
It seems that a will be marked because it's in the enclosing function constants list, since the enclosing function will be marked, its constants will be marked too.
In chapter 26, In the implementation of markCompilerRoots, the GC only mark the functions outward from the current function, what about function next to it (its sibling)?
For example:
When compiling
b
, let's say it triggers a garbage collection,markCompilerRoots
will not marka
to avoid it from being collected. Isn't it supposed to do so?