Move Interpreter to test area#969
Conversation
…pls that are not required by op evaluation
|
👋 Welcome back mabbay! A progress list of the required criteria for merging this PR into |
# Conflicts: # test/jdk/jdk/incubator/code/TestSwitchExpressionOp.java
|
@mabbay This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 6 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
@mabbay this pull request can not be integrated into git checkout mv-interpreter
git fetch https://git.openjdk.org/babylon.git code-reflection
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge code-reflection"
git push |
Webrevs
|
| "TestLambdaCapture.java", // plain junit test | ||
| "ReflectableLambdaSameInstanceTest.java", // plain junit test | ||
| "CodeModelSameInstanceTest.java" // plain junit test | ||
| "LocalClassTest.java" // name of local classes is not stable at annotation processing time |
There was a problem hiding this comment.
I tried locally -- and effectively these seem to work fine -- I remember I excluded them because otherwise they would fail because of the testng imports -- but they look fine now. Odd.
There was a problem hiding this comment.
Maybe because we migrated from TestNG to JUnit
mcimadamore
left a comment
There was a problem hiding this comment.
Overall looks good. The only doubt I have is whether we should really duplicate the ArithmeticAndConvOp class. Note that we can use the @modules tag to give test access to non-exported package:
@modules jdk.incubator.code/<package name>
This would allow to keep only one copy (and keep it in a non-exported package)
|
mcimadamore
left a comment
There was a problem hiding this comment.
For now looks ok -- if we notice that code starts diverging too much, or that we need to keep the internal version of ArithmenticAndConvOp in sync with the test/interpreter one, we might revisit.
The divergence is due to the lifter of bytecode to code models, where the use of primitive conversion operation is extended to support conversion between boolean values, and then the Interpreter is used to test such lifted models. We need to revisit the lifter and also leave appropriate comments to remind us. |
| import java.lang.invoke.MethodType; | ||
| import java.util.List; | ||
|
|
||
| public final class ArithmeticAndConvOpImpls { |
There was a problem hiding this comment.
Can you add a comment as to why we need to duplicate and extend the non-test version?
|
/integrate |
|
Going to push as commit 2075f10.
Your commit was automatically rebased without conflicts. |
We move
Interpreterto the location of runtime tests alongside a copy ofArithmeticAndConvOpImpls. Runtime tests that depends on Interpreter refer to it via@librarytag.The original copy of ArithmeticAndConvOpImpls is kept in the internal package as it's used by op evaluation API. We remove methods from
internal.ArithmeticAndConvOpImplsthat are not used by the op evaluation API.Progress
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/969/head:pull/969$ git checkout pull/969Update a local copy of the PR:
$ git checkout pull/969$ git pull https://git.openjdk.org/babylon.git pull/969/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 969View PR using the GUI difftool:
$ git pr show -t 969Using diff file
Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/969.diff
Using Webrev
Link to Webrev Comment