Repository navigation
Spock-Compiler does not use wrapper types anymore - #1765
Merged
leonard84 merged 3 commits intoSep 15, 2023
Merged
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1765 +/- ##
=========================================
Coverage 79.82% 79.83%
- Complexity 4079 4083 +4
=========================================
Files 425 425
Lines 12914 12953 +39
Branches 1630 1641 +11
=========================================
+ Hits 10309 10341 +32
- Misses 1998 2000 +2
- Partials 607 612 +5
☔ View full report in Codecov by Sentry. |
leonard84
previously approved these changes
Aug 21, 2023
Vampire
previously approved these changes
Aug 22, 2023
Vampire
left a comment
Member
There was a problem hiding this comment.
Changes look good to me, thanks.
Could you maybe add some tests that verify the outcome?
You can look for usages of Snapshotter on how to do it.
AndreasTu
force-pushed
the
CondRewriter_Primitive
branch
from
August 22, 2023 17:02
d7742b7 to
d12a9e5
Compare
Member
Author
|
@Vampire I have added the tests. |
Vampire
approved these changes
Aug 23, 2023
Changed the usages of ConstExpressions to use primitive type where possible. Previously the generated code was: ICONST_4 INVOKESTATIC Integer.valueOf (I)L/Integer; INVOKEVIRTUAL Integer.intValue ()I INVOKEVIRTUAL ValueRecorder.startRecordingValue (I)I Now it is simply: ICONST_4 INVOKEVIRTUAL ValueRecorder.startRecordingValue (I)I SourceToAstNodeAndSourceTranspiler now also supports to trace out the generated bytecode.
leonard84
force-pushed
the
CondRewriter_Primitive
branch
from
September 15, 2023 10:00
f40e29e to
1cf92b1
Compare
leonard84
approved these changes
Sep 15, 2023
Comment on lines
+73
to
+78
| boolean shallTraceBytecode = compilePhase >= CompilePhase.CLASS_GENERATION.phaseNumber | ||
| if (shallTraceBytecode) { | ||
| cu.setClassgenCallback(createClassgenCallback(writer, showSet)) | ||
| } else { | ||
| cu.addPhaseOperation(new AstNodeToScriptVisitor(writer, showSet), compilePhase) | ||
| } |
Member
There was a problem hiding this comment.
This will have some impact on https://gwc-experiment.appspot.com/ as that is the default phase that is pre-selected, .
leonard84
added a commit
that referenced
this pull request
Sep 15, 2023
in #1765 the behavior of the SourceToAstNodeAndSourceTranspiler was changed, so that it would output bytecode instructions when the `CLASS_GENERATION` compile phase was used. This was problematic as the SourceToAstNodeAndSourceTranspiler is also used in the Groovy Web Console, and the `CLASS_GENERATION` phase still had transformations that affected the source and would have not been accessible anymore. Now we moved the bytecode output trigger to the `OUTPUT` phase, while internally clamping the actual compiler phase to the `CLASS_GENERATION` phase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed the usages of ConstExpressions to use primitive type where possible.
Previously the generated code was:
Now it is simply: