]> source.dussan.org Git - aspectj.git/commitdiff
generates accurate max stack height information for aspectOf method
authorjhugunin <jhugunin>
Tue, 27 Jan 2004 19:47:12 +0000 (19:47 +0000)
committerjhugunin <jhugunin>
Tue, 27 Jan 2004 19:47:12 +0000 (19:47 +0000)
this is a long-standing bug that was masked by the weaver which
would always recompute this field.  optimizations to the weaver made
this bug appear again.

org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java

index f2f343a6932a35f6462575b7832400e31303ca8f..a3cff8ae6eadddc81db8f98c05a7b9a6b1814498 100644 (file)
@@ -527,6 +527,7 @@ public class AspectDeclaration extends TypeDeclaration {
                                codeStream.areturn();
                                isNull.place();
                                
+                               codeStream.incrStackSize(+1);  // the dup trick above confuses the stack counter
                                codeStream.new_(world.makeTypeBinding(AjcMemberMaker.NO_ASPECT_BOUND_EXCEPTION));
                                codeStream.dup();
                                codeStream.ldc(typeX.getNameAsIdentifier());