Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AST Inlining from Black Diamonds #231

Merged
merged 8 commits into from
Mar 18, 2018
Merged

Use AST Inlining from Black Diamonds #231

merged 8 commits into from
Mar 18, 2018

Conversation

smarr
Copy link
Owner

@smarr smarr commented Feb 24, 2018

With this PR, we are adopting the inlining/splitting support from Black Diamonds: SOM-st/black-diamonds#6

With 346842b, we unfortunately revert #177
While there is a performance issue, it is not possible to simply apply the solution in #177. It is semantically not sound, because it results in scopes pointing to the wrong parent. And at the moment, we need a direct parent chain.

The only solution seems to be to revamp scope handling entirely in SOMns. At the moment we mix run-time info and compile-time info (lexical scopes vs. root nodes), which is leading to this issue.
Think, I need to move the run-time info entirely in root nodes or SInvokable/SObject.
How to do that is not entirely clear yet to me. One step in doing this is going to be #233. But there is much more work needed, which I can't do at the moment. So, this means we have a performance regression in the mean time. But it's a somewhat obscure benchmark, so well...

We should also make sure that any issue cleaning this up, removes unnecessary tracking introduced by #177.

The corresponding PR for TruffleSOM is SOM-st/TruffleSOM#13

@smarr smarr added the enhancement Improves the implementation with something noteworthy label Feb 24, 2018
@smarr smarr added this to the v0.6.0 - Black Diamonds milestone Feb 24, 2018
ANTLR has been used years ago for SOM, was never used in TruffleSOM or SOMns

Signed-off-by: Stefan Marr <[email protected]>
@smarr
Copy link
Owner Author

smarr commented Mar 14, 2018

Ok, so, here we go, this should make things work with SOMns.

Unfortunately, this increases warnings with javac quite a bit. Can't explain it, the change from before is trivial, except that the classes are now in BD. Might be a javac bug.

@coveralls
Copy link

coveralls commented Mar 14, 2018

Coverage Status

Coverage decreased (-0.01%) to 77.298% when pulling 2cbbe3f on bd-inlining into 65e468a on dev.

Start using BD's versions of various basic mechanisms:

- ProgramDefinitionError
- DummyParent
- IdProvider
- WithSource
- use NodeState for communicating details for self/super node creation
- inlining/adapting to scope changes

Signed-off-by: Stefan Marr <[email protected]>
@smarr smarr merged commit 1d86f8c into dev Mar 18, 2018
@smarr smarr deleted the bd-inlining branch March 18, 2018 22:13
@smarr smarr mentioned this pull request Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the implementation with something noteworthy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants