Skip to content

Conversation

@smarr
Copy link
Member

@smarr smarr commented Dec 3, 2023

This PR is based on #185, and extracts the supernodes for the comparison with literal strings:

  • "someString" = var and var = "someString"
  • the various variations with locals, arguments, non-locals, and fields
  • fields for local and non-local access to self

smarr added 2 commits December 3, 2023 16:24
…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]>

# Conflicts:
#	src/trufflesom/src/trufflesom/compiler/ParserAst.java
smarr added 5 commits December 3, 2023 19:04
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]>
Should be ensured in the caller.

Signed-off-by: Stefan Marr <[email protected]>
@smarr smarr force-pushed the supernode/string-equal branch from 7351fb5 to 3d74296 Compare December 3, 2023 19:05
@smarr smarr mentioned this pull request Dec 3, 2023
4 tasks
@smarr smarr merged commit 1defdd7 into SOM-st:master Dec 3, 2023
@smarr smarr deleted the supernode/string-equal branch December 3, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant