public int maxLocals() { // This does not remove those bindings that will be implemented as // dynamic variables, however it is fail safe... int maxLocals = name.maxLocals() + init.maxLocals() + Binding.valueBindings(bindings).length; for (BArm arm : arms) maxLocals += arm.maxLocals(); int valueLocals = 0; for (Binding b : Binding.valueBindings(bindings)) valueLocals = Math.max(valueLocals, b.getValue().maxLocals()); return maxLocals + valueLocals; }
public int maxLocals() { // Be sure to add in local slots for each of the expression values... int maxLocals = 0; for (AST exp : exps) maxLocals = Math.max(maxLocals, exp.maxLocals()); for (BArm arm : arms) maxLocals = Math.max(maxLocals, arm.maxLocals()); return maxLocals + exps.length; }
public int maxLocals() { return Math.max(op.maxLocals(), maxLocals(args)); }