Open samrushing opened 11 years ago
This might be moot with precise gc and untagged immediates.
I would not bother with this. I think this is premature optimization, and is adding complexity to a tag system that will be moot with untagged immediates and precise gc.
This was originally in the python compiler, if a datatype contains an alt with a single immediate in it, and this immediate type is not present again in the datatype, then we can skip the box layer and use that immediate directly.
Example:
This version of thing can actually be always stored as an immediate, quite a handy optimization. This version cannot:
... because there is no way at runtime to distinguish between the two ints.