Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Complete (hopefully) todo local handling.
  • Loading branch information
jnthn committed Apr 7, 2013
1 parent f6b38e8 commit 977809b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/org/perl6/nqp/jast2bc/JASTToJVMBytecode.java
Expand Up @@ -171,10 +171,9 @@ else if (curLine.startsWith("++ local ")) {
String[] bits = curLine.split("\\s", 4);
if (localVariables.containsKey(bits[2]))
throw new Exception("Duplicate local name: " + bits[2]);

//TODO: indexes
localVariables.put(bits[2],
new VariableDef(++curArgIndex, processType(bits[3]).getDescriptor()));
Type t = processType(bits[3]);
localVariables.put(bits[2], new VariableDef(curArgIndex, t.getDescriptor()));
curArgIndex += (t == Type.LONG_TYPE || t == Type.DOUBLE_TYPE ? 2 : 1);
}
else
throw new Exception("Cannot understand '" + curLine + "'");
Expand Down

0 comments on commit 977809b

Please sign in to comment.