-
-
Notifications
You must be signed in to change notification settings - Fork 356
XX PhIP CompiledMethod Flags
The compiler allows us to set options, but the resulting method does not know the options that were used when it was compiled, which makes decompiling impossible.
For many of these options, a binary flag would be a solution.
- we have method properties
- used for isFFIMethod, hasHalts
- problem: not very memory efficient. We can use it for cases that are not common (like ffi), but using properties for boolean flags for many methods would be wasteful.
We could add an integer to the literals that encoded all enabled/disabled options.
This would hard-code a certain pre-defined set of flags instead of using method properties. It could be used for compiler flags, but in addition for isFFIMethod and halt tagging, too.
For compiler options: The compiler is defined per class. Maybe we need to make the compiler options used explicit in the class and thus the method can just defer to its class to find out which options were used for compilation. The problem with this is that it makes methods rely on the class even more and would not allow compiling methods without a class (e.g. like what a doit does now)