When we were trying to fix the GC for kompile -O3 on EVM, we added some logic to deal with the case where a map/list/set was a garbage collection root. Over the course of several iterations, that code evolved, and eventually became rather complex. However, it came to my attention analyzing the code that some of the complexity that was added early on was made redundant by later complexity. So we are actually able to simplify somewhat.
What this PR does is remove the is_block boolean parameter everywhere. This was being done because we were passing a block * for map/list/set pointers that had been promoted from the alwaysgcspace to the youngspace. However, the new derived pointer logic we added can handle derived pointers to embedded map/list/set objects now, so this is no longer necessary.
I may make further simplifications to this logic in the near future; I am considering how it may interact with changes that would make the garbage collector walk the stack. However, this is an intermediate step that I was able to write and test to ensure it didn't break anything, and since it is overall a deletion of code, I wanted to get it in first.
When we were trying to fix the GC for
kompile -O3
on EVM, we added some logic to deal with the case where a map/list/set was a garbage collection root. Over the course of several iterations, that code evolved, and eventually became rather complex. However, it came to my attention analyzing the code that some of the complexity that was added early on was made redundant by later complexity. So we are actually able to simplify somewhat.What this PR does is remove the
is_block
boolean parameter everywhere. This was being done because we were passing ablock *
for map/list/set pointers that had been promoted from the alwaysgcspace to the youngspace. However, the new derived pointer logic we added can handle derived pointers to embedded map/list/set objects now, so this is no longer necessary.I may make further simplifications to this logic in the near future; I am considering how it may interact with changes that would make the garbage collector walk the stack. However, this is an intermediate step that I was able to write and test to ensure it didn't break anything, and since it is overall a deletion of code, I wanted to get it in first.