"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesWriterController.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.

StaticTypesWriterController.java  (apache-groovy-src-3.0.8):StaticTypesWriterController.java  (apache-groovy-src-3.0.9)
skipping to change at line 102 skipping to change at line 102
} }
private void updateStaticCompileFlag(final MethodNode mn) { private void updateStaticCompileFlag(final MethodNode mn) {
ClassNode classNode = getClassNode(); ClassNode classNode = getClassNode();
AnnotatedNode node = mn; AnnotatedNode node = mn;
boolean implementsGeneratedClosureOrGeneratedLambdaInterface = ClassHelp er.isGeneratedFunction(classNode); boolean implementsGeneratedClosureOrGeneratedLambdaInterface = ClassHelp er.isGeneratedFunction(classNode);
if (implementsGeneratedClosureOrGeneratedLambdaInterface) { if (implementsGeneratedClosureOrGeneratedLambdaInterface) {
node = classNode.getOuterClass(); node = classNode.getOuterClass();
} }
boolean isStaticCompileNode = classNode.getNodeMetaData(StaticCompilatio isInStaticallyCheckedMethod = mn != null && (StaticCompilationVisitor.is
nMetadataKeys.STATIC_COMPILE_NODE) != null; StaticallyCompiled(node)
isInStaticallyCheckedMethod = || implementsGeneratedClosureOrGeneratedLambdaInterface && Boole
mn != null && (StaticCompilationVisitor.isStaticallyCompiled(nod an.TRUE.equals(classNode.getNodeMetaData(StaticCompilationMetadataKeys.STATIC_CO
e) MPILE_NODE)));
|| implementsGeneratedClosureOrGeneratedLambdaIn
terface && isStaticCompileNode);
} }
@Override @Override
public void setConstructorNode(final ConstructorNode cn) { public void setConstructorNode(final ConstructorNode cn) {
updateStaticCompileFlag(cn); updateStaticCompileFlag(cn);
super.setConstructorNode(cn); super.setConstructorNode(cn);
} }
@Override @Override
public boolean isFastPath() { public boolean isFastPath() {
if (isInStaticallyCheckedMethod) return true; if (isInStaticallyCheckedMethod) return true;
return super.isFastPath(); return super.isFastPath();
} }
@Override @Override
public CallSiteWriter getCallSiteWriter() { public CallSiteWriter getCallSiteWriter() {
MethodNode methodNode = getMethodNode(); MethodNode methodNode = getMethodNode();
if (methodNode !=null && methodNode.getNodeMetaData(StaticTypesMarker.DY NAMIC_RESOLUTION)==Boolean.TRUE) { if (methodNode != null && Boolean.TRUE.equals(methodNode.getNodeMetaData (StaticTypesMarker.DYNAMIC_RESOLUTION))) {
return super.getCallSiteWriter(); return super.getCallSiteWriter();
} }
if (isInStaticallyCheckedMethod) { if (isInStaticallyCheckedMethod) {
return callSiteWriter; return callSiteWriter;
} }
return super.getCallSiteWriter(); return super.getCallSiteWriter();
} }
public CallSiteWriter getRegularCallSiteWriter() { public CallSiteWriter getRegularCallSiteWriter() {
return super.getCallSiteWriter(); return super.getCallSiteWriter();
 End of changes. 2 change blocks. 
8 lines changed or deleted 6 lines changed or added

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