ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

Inconsistent pop while doing += on map values #344

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
@Typed package foo

Map<String, List<String>> map = [:]
map['foo'] = ['goo']
map['foo'] += ['bar']
println map

Compilation fails:
java.lang.RuntimeException: Internal compiler error: Inconsistent pop
    at org.mbte.groovypp.compiler.bytecode.BytecodeStack.pop(BytecodeStack.java:45)
    at org.mbte.groovypp.compiler.bytecode.StackAwareMethodAdapter.popArgs(StackAwareMethodAdapter.java:669)
    at org.mbte.groovypp.compiler.bytecode.StackAwareMethodAdapter.visitMethodInsn(StackAwareMethodAdapter.java:596)
    at org.mbte.groovypp.compiler.asm.IcmpZeroImproverMethodAdapter.visitMethodInsn(IcmpZeroImproverMethodAdapter.java:84)
    at org.mbte.groovypp.compiler.asm.I2LL2IRemoverMethodAdapter.visitMethodInsn(I2LL2IRemoverMethodAdapter.java:75)
    at org.mbte.groovypp.compiler.asm.UneededBoxingRemoverMethodAdapter.dropBoxing(UneededBoxingRemoverMethodAdapter.java:38)
    at org.mbte.groovypp.compiler.asm.UneededBoxingRemoverMethodAdapter.visitInsn(UneededBoxingRemoverMethodAdapter.java:48)
    at org.mbte.groovypp.compiler.asm.UneededDupStoreRemoverMethodAdapter.dropDupStore(UneededDupStoreRemoverMethodAdapter.java:66)
    at org.mbte.groovypp.compiler.asm.UneededDupStoreRemoverMethodAdapter.visitJumpInsn(UneededDupStoreRemoverMethodAdapter.java:148)
    at org.mbte.groovypp.compiler.asm.UneededDupXStoreRemoverMethodAdapter.visitJumpInsn(UneededDupXStoreRemoverMethodAdapter.java:156)
    at org.mbte.groovypp.compiler.asm.UneededLoadPopRemoverMethodAdapter.visitJumpInsn(UneededLoadPopRemoverMethodAdapter.java:220)
    at org.mbte.groovypp.compiler.CompilerTransformer$6.compile(CompilerTransformer.java:624)
    at org.mbte.groovypp.compiler.bytecode.BytecodeExpr.visit(BytecodeExpr.java:43)
    at org.mbte.groovypp.compiler.transformers.CastExpressionTransformer$5.compile(CastExpressionTransformer.java:591)
    at org.mbte.groovypp.compiler.bytecode.BytecodeExpr.visit(BytecodeExpr.java:43)
    at org.mbte.groovypp.compiler.bytecode.ResolvedMethodBytecodeExpr.loadParams(ResolvedMethodBytecodeExpr.java:249)
    at org.mbte.groovypp.compiler.bytecode.ResolvedMethodBytecodeExpr.compile(ResolvedMethodBytecodeExpr.java:238)
    at org.mbte.groovypp.compiler.bytecode.BytecodeExpr.visit(BytecodeExpr.java:43)
    at org.mbte.groovypp.compiler.bytecode.ResolvedMethodBytecodeExpr.compile(ResolvedMethodBytecodeExpr.java:196)
    at org.mbte.groovypp.compiler.bytecode.BytecodeExpr.visit(BytecodeExpr.java:43)
    at org.mbte.groovypp.compiler.transformers.CastExpressionTransformer$Cast.compile(CastExpressionTransformer.java:663)
    at org.mbte.groovypp.compiler.bytecode.BytecodeExpr.visit(BytecodeExpr.java:43)
    at org.mbte.groovypp.compiler.bytecode.ResolvedArrayLikeBytecodeExpr$6.compile(ResolvedArrayLikeBytecodeExpr.java:130)
    at org.mbte.groovypp.compiler.bytecode.BytecodeExpr.visit(BytecodeExpr.java:43)
    at org.mbte.groovypp.compiler.StaticCompiler.visitExpressionStatement(StaticCompiler.java:391)
    at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
    at org.mbte.groovypp.compiler.StaticCompiler.visitBlockStatement(StaticCompiler.java:359)
    at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
    at org.mbte.groovypp.compiler.StaticCompiler.execute(StaticCompiler.java:1204)
    at org.mbte.groovypp.compiler.StaticMethodBytecode.<init>(StaticMethodBytecode.java:81)
    at org.mbte.groovypp.compiler.StaticMethodBytecode.replaceMethodCode(StaticMethodBytecode.java:105)
    at org.mbte.groovypp.compiler.CompileASTTransform.visit(CompileASTTransform.java:125)
    at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:129)
    at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:172)
    at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:942)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:519)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:497)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474)
    at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:43)
    at org.jetbrains.groovy.compiler.rt.GroovycRunner.main(GroovycRunner.java:128)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:75)

Original issue reported on code.google.com by gromop...@gmail.com on 6 Mar 2011 at 2:32

GoogleCodeExporter commented 8 years ago

Original comment by alex.tka...@gmail.com on 22 Mar 2011 at 6:51