### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java,v retrieving revision 1.11 diff -u -r1.11 StackMapFrameCodeStream.java --- compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java 16 Jun 2006 22:38:53 -0000 1.11 +++ compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrameCodeStream.java 20 Jun 2006 14:56:15 -0000 @@ -1183,17 +1183,20 @@ super.invokespecial(methodBinding); int argCount = 0; if (methodBinding.isConstructor()) { - if (methodBinding.declaringClass.isNestedType()) { + final ReferenceBinding declaringClass = methodBinding.declaringClass; + if (declaringClass.isNestedType()) { // enclosing instances - TypeBinding[] syntheticArgumentTypes = methodBinding.declaringClass.syntheticEnclosingInstanceTypes(); + TypeBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes(); if (syntheticArgumentTypes != null) { argCount += syntheticArgumentTypes.length; } // outer local variables - SyntheticArgumentBinding[] syntheticArguments = methodBinding.declaringClass.syntheticOuterLocalVariables(); + SyntheticArgumentBinding[] syntheticArguments = declaringClass.syntheticOuterLocalVariables(); if (syntheticArguments != null) { argCount += syntheticArguments.length; } + } else if (declaringClass.isEnum()) { + argCount += 2; } argCount += methodBinding.parameters.length; this.currentFrame.numberOfStackItems -= argCount; Index: compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java,v retrieving revision 1.138 diff -u -r1.138 CodeStream.java --- compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 16 Jun 2006 22:38:53 -0000 1.138 +++ compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 20 Jun 2006 14:56:15 -0000 @@ -4127,28 +4127,34 @@ methodBinding.selector, methodBinding.signature(), false)); - if (methodBinding.isConstructor() && methodBinding.declaringClass.isNestedType()) { - // enclosing instances - TypeBinding[] syntheticArgumentTypes = methodBinding.declaringClass.syntheticEnclosingInstanceTypes(); - if (syntheticArgumentTypes != null) { - for (int i = 0, max = syntheticArgumentTypes.length; i < max; i++) { - if (((id = syntheticArgumentTypes[i].id) == TypeIds.T_double) || (id == TypeIds.T_long)) { - argCount += 2; - } else { - argCount++; + if (methodBinding.isConstructor()) { + final ReferenceBinding declaringClass = methodBinding.declaringClass; + if (declaringClass.isNestedType()) { + // enclosing instances + TypeBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes(); + if (syntheticArgumentTypes != null) { + for (int i = 0, max = syntheticArgumentTypes.length; i < max; i++) { + if (((id = syntheticArgumentTypes[i].id) == TypeIds.T_double) || (id == TypeIds.T_long)) { + argCount += 2; + } else { + argCount++; + } } } - } - // outer local variables - SyntheticArgumentBinding[] syntheticArguments = methodBinding.declaringClass.syntheticOuterLocalVariables(); - if (syntheticArguments != null) { - for (int i = 0, max = syntheticArguments.length; i < max; i++) { - if (((id = syntheticArguments[i].type.id) == TypeIds.T_double) || (id == TypeIds.T_long)) { - argCount += 2; - } else { - argCount++; + // outer local variables + SyntheticArgumentBinding[] syntheticArguments = declaringClass.syntheticOuterLocalVariables(); + if (syntheticArguments != null) { + for (int i = 0, max = syntheticArguments.length; i < max; i++) { + if (((id = syntheticArguments[i].type.id) == TypeIds.T_double) || (id == TypeIds.T_long)) { + argCount += 2; + } else { + argCount++; + } } } + } else if (declaringClass.isEnum()) { + // adding String and int + argCount += 2; } } for (int i = methodBinding.parameters.length - 1; i >= 0; i--)