[ 
https://issues.apache.org/jira/browse/GROOVY-8699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18064975#comment-18064975
 ] 

ASF GitHub Bot commented on GROOVY-8699:
----------------------------------------

codecov-commenter commented on PR #2395:
URL: https://github.com/apache/groovy/pull/2395#issuecomment-4035683468

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2395?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :x: Patch coverage is `94.11765%` with `2 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 66.7562%. Comparing base 
([`a2a7da6`](https://app.codecov.io/gh/apache/groovy/commit/a2a7da6fc0780adae2e9d70fc7ebfc6a98ff2aa7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`493c709`](https://app.codecov.io/gh/apache/groovy/commit/493c70912224b476391f790683ca56fe9227f305?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2395?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...rg/codehaus/groovy/classgen/AsmClassGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/2395?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FAsmClassGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0FzbUNsYXNzR2VuZXJhdG9yLmphdmE=)
 | 50.0000% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2395?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...orm/sc/transformers/ListExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/2395?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FListExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvTGlzdEV4cHJlc3Npb25UcmFuc2Zvcm1lci5qYXZh)
 | 96.7742% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2395?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2395/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2395?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2395        +/-   ##
   ==================================================
   + Coverage     66.7519%   66.7562%   +0.0043%     
   - Complexity      29867      29868         +1     
   ==================================================
     Files            1382       1382                
     Lines          116106     116130        +24     
     Branches        20472      20476         +4     
   ==================================================
   + Hits            77503      77524        +21     
   - Misses          32272      32273         +1     
   - Partials         6331       6333         +2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2395?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...in/java/org/codehaus/groovy/classgen/Verifier.java](https://app.codecov.io/gh/apache/groovy/pull/2395?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FVerifier.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL1ZlcmlmaWVyLmphdmE=)
 | `89.4848% <100.0000%> (+0.0111%)` | :arrow_up: |
   | 
[...rg/codehaus/groovy/classgen/AsmClassGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/2395?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FAsmClassGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0FzbUNsYXNzR2VuZXJhdG9yLmphdmE=)
 | `84.6494% <50.0000%> (ø)` | |
   | 
[...orm/sc/transformers/ListExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/2395?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FListExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvTGlzdEV4cHJlc3Npb25UcmFuc2Zvcm1lci5qYXZh)
 | `97.7778% <96.7742%> (-2.2222%)` | :arrow_down: |
   
   ... and [6 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2395/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> Somehow reduce or optimize o.g.c.r calls in CompileStatic
> ---------------------------------------------------------
>
>                 Key: GROOVY-8699
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8699
>             Project: Groovy
>          Issue Type: Wish
>            Reporter: death lord
>            Assignee: Eric Milles
>            Priority: Major
>
> Given the following simple snippet:
>  
> {code:java}
> import groovy.transform.*
> @CompileStatic
> class IteratorTest {
>   static void main(args) {
>     final coords = [new Coord(1, 2), new Coord(0, 3), new Coord(1, 3), new 
> Coord(0, 2)]
>     int i = 0
>     for (coord in coords) {
>       if (i in coord.x..coord.y) println "coord $i is between coord $coord.x 
> and $coord.y"
>       ++i
>     }
>   }
>   
>   @TupleConstructor
>   static class Coord {
>     int x, y
>   }
> }{code}
> The bytecode output for the main method is polluted with needed class 
> constants (in 2.4.12)
> {code:java}
> public static void main(String... args) {
>     List coords = ScriptBytecodeAdapter.createList(new Object[]{new 
> IteratorTest.Coord(1, 2), new IteratorTest.Coord(0, 3), new 
> IteratorTest.Coord(1, 3), new IteratorTest.Coord(0, 2)});
>     // ScriptBytecodeAdapter.createList calls InvokerHelper.createList which 
> calls addAll on a ArrayList, meanwhile Arrays.asList (around since java 2) 
> would directly call an efficient private ArrayList constructor
>     int i = 0;
>     IteratorTest.Coord coord = null;
>     for(Iterator var4 = coords.iterator(); var4.hasNext(); ++i) {
>         coord = 
> (IteratorTest.Coord)ScriptBytecodeAdapter.castToType(var4.next(), 
> IteratorTest.Coord.class);
>         // this castToType call is fine with a normal cast
>         if (DefaultTypeTransformation.booleanUnbox(new IntRange(true, 
> coord.getX(), coord.getY()) == null ? false : DefaultGroovyMethods.isCase(new 
> IntRange(true, coord.getX(), coord.getY()), i))) {
>         // isCase returns a primitive boolean so no need for unbox
>         // if certain expressions like a range expression can prove to not be 
> null, then the == null check for for-in statements can be optimized out
>         // maybe an annotation to transform aliased method calls could make 
> this compile to (coord.x..coord.y).contains(i), or even better: (i >= coord.x 
> && i <= coord.y)
>             DefaultGroovyMethods.println(IteratorTest.class, new 
> GStringImpl(new Object[]{i, coord.getX(), coord.getY()}, new String[]{"coord 
> ", " is between coord ", " and ", ""}));
>             // GStrings could be optimized to StringBuilder if there's no 
> closure expressions
>             // or, this could alias transform into System.out.println, and 
> since it calls .toString on the GString all direct (GString 
> literal).toString() calls can be optimized to StringBuilder
>             Object var10000 = null;
>             // random aconst_null
>         }
>     }
> }
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to