示例#1
0
文件: Act.java 项目: TonyClark/ESL
  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;
  }
示例#2
0
文件: Case.java 项目: TonyClark/ESL
 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;
 }
示例#3
0
文件: Apply.java 项目: TonyClark/ESL
 public int maxLocals() {
   return Math.max(op.maxLocals(), maxLocals(args));
 }