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

Removing Unsafe.set_atom_field #4023

Merged
merged 27 commits into from
Jan 9, 2023
Merged

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Jan 4, 2023

Pull Request Description

Introducing Meta.atom_with_hole to create an Atom with a hole that is then safely filled in later.

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.

@JaroslavTulach JaroslavTulach added the CI: Clean build required CI runners will be cleaned before and after this PR is built. label Jan 5, 2023
Copy link
Contributor

@kustosz kustosz left a 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?

@JaroslavTulach
Copy link
Member Author

Also, do you have any info on the performance impact of this?

Here is a benchmark measuring List.map - 695775b - currently it is not fast and I need to check IGV to find out what can be improved.

Copy link
Member

@jdunkerley jdunkerley left a 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

distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso Outdated Show resolved Hide resolved
@JaroslavTulach JaroslavTulach force-pushed the wip/jtulach/NoSetAtomField_183578531 branch from fea0260 to 8ccbecb Compare January 6, 2023 15:13
@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Jan 6, 2023
@JaroslavTulach
Copy link
Member Author

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.

@mergify mergify bot merged commit 41b2aac into develop Jan 9, 2023
@mergify mergify bot deleted the wip/jtulach/NoSetAtomField_183578531 branch January 9, 2023 13:39
Copy link
Collaborator

@hubertp hubertp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits

Comment on lines +140 to +142
if (in.isDefined) {
ensoProperties.setProperty("input", in.get.toString())
}
Copy link
Collaborator

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;
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants