Exemple #1
0
  @SuppressWarnings("unchecked")
  public StackHandler(FeatureExpr ctx, int nLocals, int nOperands) {
    if (ctx == null) {
      // if loading class inside jetty, the ctx is null
      System.err.println("CAUTIOUS! CTX == NULL, creating True");
      ctx = FeatureExprFactory.True();
      //      throw new RuntimeException("CTX == NULL");
    }
    length = nLocals + nOperands;
    locals = new Conditional[nLocals];
    Arrays.fill(locals, nullValue);

    // stack = new One<>(new Stack(nOperands));
    stack = StackFactory.createVStack(nOperands);
    stack.setCtx(ctx);
  }
Exemple #2
0
 @SuppressWarnings("unchecked")
 public StackHandler() {
   locals = new Conditional[0];
   stack = StackFactory.createVStack();
   stack.setCtx(FeatureExprFactory.True());
 }
Exemple #3
0
 @Override
 public void setCtx(FeatureExpr ctx) {
   stack.setCtx(ctx);
 }