-
Notifications
You must be signed in to change notification settings - Fork 323
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
Removing Unsafe.set_atom_field #4023
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some doubts regarding the user facing API and also the internals, though from the high level I like this solution. I also like it's all self-contained, not polluting what Atoms really are. Also, do you have any info on the performance impact of this?
...me/src/main/java/org/enso/interpreter/node/expression/builtin/meta/LazyAtomInstanceNode.java
Outdated
Show resolved
Hide resolved
...me/src/main/java/org/enso/interpreter/node/expression/builtin/meta/LazyAtomInstanceNode.java
Outdated
Show resolved
Hide resolved
Here is a benchmark measuring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very minor points but lgtm
fea0260
to
8ccbecb
Compare
I think we are ready to integrate. The only problem is 2-3x slowdown - but I'd like to resolve it later. Right now I feel there are other important issues to focus on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits
if (in.isDefined) { | ||
ensoProperties.setProperty("input", in.get.toString()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
in.foreach { prop =>
ensoProperties.setProperty("input", prop.toString())
}
} else { | ||
if (lastIndex != -2) { | ||
CompilerDirectives.transferToInterpreterAndInvalidate(); | ||
lastIndex = -2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice if those magic constants -1
and -2
were documented somehow.
Pull Request Description
Introducing
Meta.atom_with_hole
to create anAtom
with a hole that is then safely filled in later.Important Notes
Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.