smarr / SOMns

SOMns: A Newspeak for Concurrency Research
MIT License
67 stars 30 forks source link

Simplify/unify scope handling for object literal support #182

Open smarr opened 7 years ago

smarr commented 7 years ago

The object literal support introduced with #112 avoids changing some of the scope handling infrastructure and instead of modeling lexical scope as a single chain, it introduces direct access to scopes of objects.

Specifically, the MixinBuilder has not an outer builder and an outer method, it should only have a single outer scope, the rest should be reached through traversal. Same issue was introduced in the MixinScope class, there we also got two scope information now.

This could be hiding bugs, and made it hard to implement the contextual nodes in a way that the parser determines correctly the chain of casts needed to get to the outer context. Currently, the chain is determined at run time, because I had issues to get it correct during inlining. The parser support worked, but finding the right data to have the chain correct after splitting was an issue.

So, we should fix:

smarr commented 6 years ago

The first part of this was done with #233, but the second bit could still be investigated.