SOMns icon indicating copy to clipboard operation
SOMns copied to clipboard

Add support for reads from immutable slots/indexes

Open smarr opened this issue 5 years ago • 0 comments

We should do AST caching of reads from immutable storage locations.

I tried this before, but not correctly: https://github.com/smarr/SOMns/commit/fe9140ab6d83dfc126d14f52deb04afb0caa37b0

May only be beneficial for very few programs, and has the problem of caching values. Though, for things like reading from outer objects, that might be beneficial.

The previous attempt was incorrect I think. Though, by doing this, we can avoid the subclasses for immutable objects/arrays, and a lot of complexity with it. By moving it into the AST, we could get a uniform handling.

smarr avatar Jul 09 '19 22:07 smarr