"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java" between
apache-groovy-src-3.0.8.zip and apache-groovy-src-3.0.9.zip

About: Groovy is an agile dynamic (scripting) language for the Java Platform. It has features similar to those of Python, Ruby, Perl, and Smalltalk. Source release.

AsmClassGenerator.java  (apache-groovy-src-3.0.8):AsmClassGenerator.java  (apache-groovy-src-3.0.9)
skipping to change at line 119 skipping to change at line 119
import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.Label; import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Type; import org.objectweb.asm.Type;
import org.objectweb.asm.util.TraceMethodVisitor; import org.objectweb.asm.util.TraceMethodVisitor;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.Writer; import java.io.Writer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import static org.apache.groovy.ast.tools.ClassNodeUtils.getField; import static org.apache.groovy.ast.tools.ClassNodeUtils.getField;
import static org.apache.groovy.ast.tools.ExpressionUtils.isThisOrSuper; import static org.apache.groovy.ast.tools.ExpressionUtils.isThisOrSuper;
skipping to change at line 767 skipping to change at line 768
} }
} }
@Override @Override
public void visitSpreadExpression(final SpreadExpression expression) { public void visitSpreadExpression(final SpreadExpression expression) {
throw new GroovyBugError("SpreadExpression should not be visited here"); throw new GroovyBugError("SpreadExpression should not be visited here");
} }
@Override @Override
public void visitSpreadMapExpression(final SpreadMapExpression expression) { public void visitSpreadMapExpression(final SpreadMapExpression expression) {
Expression subExpression = expression.getExpression(); // GROOVY-3421: SpreadMapExpression is key expression and contains value
// to not record the underlying MapExpression twice, callX(ClassHelper.make(Collections.class), "emptyMap").visit(this);
// we disable the assertion tracker spreadMap.call(controller.getMethodVisitor()); // dummy SpreadMap
// see https://issues.apache.org/jira/browse/GROOVY-3421
controller.getAssertionWriter().disableTracker();
subExpression.visit(this);
controller.getOperandStack().box();
spreadMap.call(controller.getMethodVisitor());
controller.getAssertionWriter().reenableTracker();
controller.getOperandStack().replace(ClassHelper.OBJECT_TYPE); controller.getOperandStack().replace(ClassHelper.OBJECT_TYPE);
} }
@Override @Override
public void visitMethodPointerExpression(final MethodPointerExpression expre ssion) { public void visitMethodPointerExpression(final MethodPointerExpression expre ssion) {
controller.getMethodPointerExpressionWriter().writeMethodPointerExpressi on(expression); controller.getMethodPointerExpressionWriter().writeMethodPointerExpressi on(expression);
} }
@Override @Override
public void visitMethodReferenceExpression(final MethodReferenceExpression e xpression) { public void visitMethodReferenceExpression(final MethodReferenceExpression e xpression) {
 End of changes. 2 change blocks. 
9 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)