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

Exclusive context policy ensures EnsoContext.get returns compilation constant #7493

Merged
merged 9 commits into from
Aug 8, 2023

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Aug 3, 2023

Pull Request Description

Fixes #6809 by giving up on any attempt to share Node among multiple Context via sharing a single Engine.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Aug 3, 2023
@JaroslavTulach JaroslavTulach self-assigned this Aug 3, 2023
@JaroslavTulach
Copy link
Member Author

There is a discussion about ContextReference at GraalVM slack. Technically ContextReference shall return a compilation constant, but it didn't so far. Using EXCLUSIVE context policy turn EnsoContext.get into compilation constant - that might also speed up our benchmarks.

Copy link
Member

@Akirathan Akirathan left a comment

Choose a reason for hiding this comment

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

This is very cool. Not only the performance might be better, but also some asserts should stop failing.

import org.junit.BeforeClass;
import org.junit.Test;

public class SharedEngineTest extends TestBase {
Copy link
Member Author

@JaroslavTulach JaroslavTulach Aug 4, 2023

Choose a reason for hiding this comment

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

This is a test taken from branch wip/jtulach/NoTypeInNodePlease_6809. The test seems to pass OK with EXCLUSIVE context policy.

@JaroslavTulach
Copy link
Member Author

SharedEngineTest fails on the CI trying to download an edition. Probably an Engine configuration problem.

@JaroslavTulach
Copy link
Member Author

DebuggingEnsoTest asserts - fixed in d1b5913

@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Aug 8, 2023

The first Benchmark results were not good, but the second benchmark results are sane. Running 3rd benchmark results to confirm the result.

I think the results are OK and we can integrate.

@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Aug 8, 2023
@mergify mergify bot merged commit 05e8aad into develop Aug 8, 2023
26 of 28 checks passed
@mergify mergify bot deleted the wip/jtulach/Exclusive_6809 branch August 8, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type in Truffle Node breaks GraalVM semantics
3 participants