Open jclark opened 2 years ago
Summary of the discussion: In the existing code first, we check whether the type is closed or not. If it is closed, the indexed_get function is called. If it is opened, we have to check whether the tagged pointer is exact or not, If it is exact we can call the indexed_get function otherwise, we should call the get function
The function mappingFieldIndex
returns the index of the field for close records only. But we have to change/add function to return the index for open record if possible.
Please make clearer distinction between compile-time and runtime. Also need to be clearer about atomic vs non-atomic types.
We should only generate different code for the case where at compile time, static type is an atomic type and the atomic type is open. The code that is generated should check whether at runtime the type is exact, and call get or indexed_get accordingly.
At the moment we use an indexed get/set (bypassing hash table lookup) when we have a closed record.
We can also do it for an open record when the exact bit of the tagged pointer is set.
This builds on #736