예제 #1
0
파일: Act.java 프로젝트: TonyClark/ESL
 public void setPath(String path) {
   this.path = path;
   for (Binding b : bindings) b.setPath(path);
   init.setPath(path);
   name.setPath(path);
   for (BArm b : arms) b.setPath(path);
 }
예제 #2
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;
  }
예제 #3
0
파일: Act.java 프로젝트: TonyClark/ESL
 public void FV(HashSet<String> vars) {
   HashSet<String> bound = new HashSet<String>();
   for (Binding b : Binding.valueBindings(bindings)) {
     bound.add(b.getName());
   }
   for (Binding b : Binding.valueBindings(bindings)) {
     HashSet<String> free = new HashSet<String>();
     b.FV(free);
     free.removeAll(bound);
     vars.addAll(free);
   }
   HashSet<String> free = new HashSet<String>();
   for (BArm arm : arms) arm.FV(vars);
   init.FV(vars);
   name.FV(vars);
   free.removeAll(bound);
   vars.addAll(free);
 }