forked from smarr/TruffleSOM
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Adding supernodes #185
Open
smarr
wants to merge
38
commits into
SOM-st:master
Choose a base branch
from
smarr:all-supernodes-new
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Adding supernodes #185
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The most common version of this is sending to self. Signed-off-by: Stefan Marr <[email protected]>
This also adds the support in the bytecode interpreter (this is mostly incidental, since I had to remove it completely, too) Signed-off-by: Stefan Marr <[email protected]>
- also supports `-` as operator in parser - add tests - add fallback support Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Cherry-picked from supernodes branch
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
- do specialization in the parser to do it as early as possible - remove AssignLocalSquareToLocalNode which is the run-time specialization version Signed-off-by: Stefan Marr <[email protected]>
…string comparions. For the nil case in the string comparison, we store `nil` in a local static field to avoid type restrictions of the DSL. Signed-off-by: Stefan Marr <[email protected]>
This node inlines the argument and field reading and does the string equal. There's theoretical an early abort for non-object fields. Though, we don't have those in our benchmarks. Well, perhaps uninitialized fields. Though, the structure of the lookup, and caching makes that tricky. Not sure it's worth optimizing that. Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
… some other expression Signed-off-by: Stefan Marr <[email protected]>
SomSom's parser also has `text := text + self currentChar.` where `text` is a field in the lexer. Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
…ntexts… Make sure we track the context correctly for each variable. Add a specialization that fetches the context only once if possible.
This avoids issues in Eclipse with the SomTests interferring with the context of TruffleTestSetup
Should be ensured in the caller.
The BC interpreter doesn’t need them.
This was referenced Oct 4, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to merge all the supernodes that were developed into the main branch.
Though, at this point, it's still a work in progress, and this PR is helping to track the work that needs to be done.
TODOs
List of Supernodes
Increment/Decrement Nodes
e - k
ore + k
(e: arbitrary expression, k: constant integer)field := field + 1
andfield := field - 323
field := field + e
,field := field - e
.Square Nodes
local * local
| l | [ l * l ]
b := l * l
Literal Comparison Nodes
"someString" = var
andvar = "someString"
self