Package anvil.codec

Examples of anvil.codec.Source.bind()


    code.aload_first();
    code.astring(classname);
    code.invokevirtual(pool.addMethodRef(contextclass, "reflect", "(Ljava/lang/String;)Lanvil/core/reflect/Reflection;"));
    code.dup();
    code.putstatic(javafield);
    notnull.bind();
    code.popop();
    return this;
  }
 
View Full Code Here


      code.aload(l_context);
      code.astring(function.toString());
      code.invokevirtual(pool.addMethodRef("anvil/script/Context", "NoInstance",
        "(Ljava/lang/String;)Lanvil/script/ScriptException;"));
      code.athrow();
      nonnull.bind();
    }

    code.aload(l_parameters);
    code.arraylength();
    Switch select = code.select();
View Full Code Here

      code.aload(l_context);
      code.astring(function.toString());
      code.invokevirtual(pool.addMethodRef("anvil/script/Context", "NoInstance",
        "(Ljava/lang/String;)Lanvil/script/ScriptException;"));
      code.athrow();
      nonnull.bind();
    }
   
    /*int l_index = 0;
    ExceptionHandler handler = null;
    if (function instanceof NativeJava) {
View Full Code Here

      Source isfalse = code.if_eq();
      code.iconst(true);
      Source toend = code.go_to();
      isfalse.bind();
      code.iconst(false);
      toend.bind();
    } else {
      code.invokestatic(code.getPool().addMethodRef(context.TYPE_ANY,
        "create", "(I)Lanvil/core/Any;"));
    }
  }
View Full Code Here

    _left.compile(context, GET_BOOLEAN);
    code.dup();
    Source source = code.if_eq();
    code.pop();
    _right.compile(context, GET_BOOLEAN);
    source.bind();
    if (operation != GET_BOOLEAN) {
      context.boolean2any();
    }   
  }
View Full Code Here

      if (_start != null) {
        _start.compile(context, Node.GET_BOOLEAN);
        Source istrue = code.if_ne();
        handler.callFinally();
        handler.jumpOut();
        istrue.bind();
      }
      if (_statement != null) {
        _statement.compile(context);
      }
      if (_end != null) {
View Full Code Here

    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY,
      "toBoolean", "()Z"));
    Source iftrue = code.if_ne();
    code.pop();
    _right.compile(context, GET);
    iftrue.bind();
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

        }
      }

      for(int i=0; i<n; i++) {
        if (isfalse != null) {
          isfalse.bind();
        }
        Node child = _types.getChild(i);
        if (child.typeOf() == Node.EXPR_TYPE) {
          code.aload(l_data);
          child.compile(context, Node.GET_TYPE);
View Full Code Here

     
      _statement.compile(context);
      handler.callFinally();
      handler.jumpOut();
     
      isfalse.bind();
     
    } else {
      _assignment.compile(context, datanode);
      code.pop();
      _statement.compile(context);
View Full Code Here

    _left.compile(context, GET_BOOLEAN);
    code.dup();
    Source source = code.if_ne();
    code.pop();
    _right.compile(context, GET_BOOLEAN);
    source.bind();
    if (operation != GET_BOOLEAN) {
      context.boolean2any();
    }   
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.