Ejemplo n.º 1
0
  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;
  }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 public int maxLocals() {
   return Math.max(op.maxLocals(), maxLocals(args));
 }