typos/formatting
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/084e7332 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/084e7332 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/084e7332 Branch: refs/heads/parrot Commit: 084e7332e8832a21afea4e33a001780c7d189947 Parents: 35c6f78 Author: paulk <pa...@asert.com.au> Authored: Mon Nov 7 20:57:28 2016 +1000 Committer: paulk <pa...@asert.com.au> Committed: Mon Nov 7 20:57:28 2016 +1000 ---------------------------------------------------------------------- .../groovy/classgen/asm/CompileStack.java | 37 ++++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/084e7332/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java ---------------------------------------------------------------------- diff --git a/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java b/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java index d7220a7..7397307 100644 --- a/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java +++ b/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java @@ -105,9 +105,9 @@ public class CompileStack implements Opcodes { private final LinkedList stateStack = new LinkedList(); // handle different states for the implicit "this" - private final LinkedList<Boolean> implicitThisStack = new LinkedList(); + private final LinkedList<Boolean> implicitThisStack = new LinkedList<Boolean>(); // handle different states for being on the left hand side - private final LinkedList<Boolean> lhsStack = new LinkedList(); + private final LinkedList<Boolean> lhsStack = new LinkedList<Boolean>(); { implicitThisStack.add(false); lhsStack.add(false); @@ -130,7 +130,7 @@ public class CompileStack implements Opcodes { // stores if implicit or explicit this is used. private boolean implicitThis; private final WriterController controller; - private boolean inSpecialConstructallCall; + private boolean inSpecialConstructorCall; protected static class LabelRange { public Label start; @@ -171,7 +171,7 @@ public class CompileStack implements Opcodes { final Map stackVariables; final Map currentBlockNamedLabels; final LinkedList<BlockRecorder> finallyBlocks; - final boolean inSpecialConstructallCall; + final boolean inSpecialConstructorCall; StateStackElement() { scope = CompileStack.this.scope; @@ -180,7 +180,7 @@ public class CompileStack implements Opcodes { stackVariables = CompileStack.this.stackVariables; currentBlockNamedLabels = CompileStack.this.currentBlockNamedLabels; finallyBlocks = CompileStack.this.finallyBlocks; - inSpecialConstructallCall = CompileStack.this.inSpecialConstructallCall; + inSpecialConstructorCall = CompileStack.this.inSpecialConstructorCall; } } @@ -204,7 +204,7 @@ public class CompileStack implements Opcodes { breakLabel = element.breakLabel; stackVariables = element.stackVariables; finallyBlocks = element.finallyBlocks; - inSpecialConstructallCall = element.inSpecialConstructallCall; + inSpecialConstructorCall = element.inSpecialConstructorCall; } public Label getContinueLabel() { @@ -388,7 +388,6 @@ public class CompileStack implements Opcodes { usedVariables.clear(); scope = null; finallyBlocks.clear(); - mv=null; resetVariableIndex(false); superBlockNamedLabels.clear(); currentBlockNamedLabels.clear(); @@ -571,8 +570,8 @@ public class CompileStack implements Opcodes { private void makeLocalVariablesOffset(Parameter[] paras,boolean isInStaticContext) { resetVariableIndex(isInStaticContext); - for (int i = 0; i < paras.length; i++) { - makeNextVariableID(paras[i].getType(),false); + for (Parameter para : paras) { + makeNextVariableID(para.getType(), false); } localVariableOffset = nextVariableIndex; @@ -586,16 +585,16 @@ public class CompileStack implements Opcodes { makeLocalVariablesOffset(paras,isInStaticContext); - for (int i = 0; i < paras.length; i++) { - String name = paras[i].getName(); + for (Parameter para : paras) { + String name = para.getName(); BytecodeVariable answer; - ClassNode type = paras[i].getType(); - if (paras[i].isClosureSharedVariable()) { - boolean useExistingReference = paras[i].getNodeMetaData(ClosureWriter.UseExistingReference.class) != null; - answer = defineVar(name, paras[i].getOriginType(), true, useExistingReference); + ClassNode type = para.getType(); + if (para.isClosureSharedVariable()) { + boolean useExistingReference = para.getNodeMetaData(ClosureWriter.UseExistingReference.class) != null; + answer = defineVar(name, para.getOriginType(), true, useExistingReference); answer.setStartLabel(startLabel); if (!useExistingReference) { - controller.getOperandStack().load(type,currentVariableIndex); + controller.getOperandStack().load(type, currentVariableIndex); controller.getOperandStack().box(); // GROOVY-4237, the original variable should always appear @@ -605,7 +604,7 @@ public class CompileStack implements Opcodes { // reference will be used Label newStart = new Label(); controller.getMethodVisitor().visitLabel(newStart); - BytecodeVariable var = new BytecodeVariable(currentVariableIndex, paras[i].getOriginType(), name, currentVariableIndex); + BytecodeVariable var = new BytecodeVariable(currentVariableIndex, para.getOriginType(), name, currentVariableIndex); var.setStartLabel(startLabel); var.setEndLabel(newStart); usedVariables.add(var); @@ -856,11 +855,11 @@ public class CompileStack implements Opcodes { } public boolean isInSpecialConstructorCall() { - return inSpecialConstructallCall; + return inSpecialConstructorCall; } public void pushInSpecialConstructorCall() { pushState(); - inSpecialConstructallCall = true; + inSpecialConstructorCall = true; } }