Examples of astring()


Examples of anvil.codec.Code.astring()

  public void compile(ByteCompiler context, int operation)
  {
    _child.compile(context, GET);
    Code code = context.getCode();
    code.astring(_symbol);
    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY,
      "has", "(Ljava/lang/String;)Z"));
    if (operation != GET_BOOLEAN) {
      context.boolean2any();
    }
View Full Code Here

Examples of anvil.codec.Code.astring()

      Parameter param = params[i];
      Any defaultvalue = param.value;
      code.dup();
      code.iconst(j++);
      if (param.type == CompilableFunction.PARAMETER_REST) {
        code.astring(".."+param.name);
      } else if (defaultvalue != null) {
        code.astring("*"+param.name);
      } else {
        code.astring(param.name);
      }
View Full Code Here

Examples of anvil.codec.Code.astring()

      code.dup();
      code.iconst(j++);
      if (param.type == CompilableFunction.PARAMETER_REST) {
        code.astring(".."+param.name);
      } else if (defaultvalue != null) {
        code.astring("*"+param.name);
      } else {
        code.astring(param.name);
      }
      code.aastore();
      if (defaultvalue != null) { 
View Full Code Here

Examples of anvil.codec.Code.astring()

      if (param.type == CompilableFunction.PARAMETER_REST) {
        code.astring(".."+param.name);
      } else if (defaultvalue != null) {
        code.astring("*"+param.name);
      } else {
        code.astring(param.name);
      }
      code.aastore();
      if (defaultvalue != null) { 
        code.dup();
        code.iconst(j++);
View Full Code Here

Examples of anvil.codec.Code.astring()

    if (_function instanceof NativeJava) {
      if (hasSplices()) {
        code.getstatic(pool.addFieldRef(_function.getParent().getTypeRef(pool),
          "__module__", "Lanvil/script/compiler/NativeNamespace;"));
        code.aload_first();
        code.astring(_function.getName())
        context.compileArgumentList(getChilds(0));
        code.invokevirtual(pool.addMethodRef(
          "anvil/script/compiler/NativeNamespace", "execute",
          "(Lanvil/script/Context;Ljava/lang/String;[Lanvil/core/Any;)Lanvil/core/Any;"));
         
View Full Code Here

Examples of anvil.codec.Code.astring()

    Source isnull = code.if_null();
    code.getstatic(javafield);
    Source notnull = code.go_to();
    isnull.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();
View Full Code Here

Examples of anvil.codec.Code.astring()

      code.anewarray("[[B", 1);
      Enumeration e = _texts.keys();
      for(int i=0; e.hasMoreElements(); i++) {
        code.dup();
        code.iconst(i);
        code.astring((String)e.nextElement());
        code.invokestatic(getBytes);
        code.aastore();
      }
      code.putstatic(_f_text);
    }
View Full Code Here

Examples of anvil.codec.Code.astring()

      BindingEnumeration e = _symbols.keysAndElements();
      while(e.hasMoreElements()) {
        int index = ((Integer)e.nextKey()).intValue();
        String name = (String)e.nextElement();
        Field field = clazz.createField("r_"+name, "I", ACC_PUBLIC|ACC_STATIC|ACC_FINAL);
        code.astring(name);
        code.invokestatic(register);
        code.putstatic(field);
      }
    }
    code.vreturn();
View Full Code Here

Examples of anvil.codec.Code.astring()

      case CompilableFunction.PARAMETER_STRING:
        if (c<max) {
          Node node = parameters[c++];
          if (node.isConstant()) {
            code.astring(node.eval().toString());
          } else {
            node.compile(this, Node.GET);
            code.invokevirtual(pool.addMethodRef(TYPE_OBJECT,
              "toString", "()Ljava/lang/String;"));
          }
View Full Code Here

Examples of anvil.codec.Code.astring()

            code.invokevirtual(pool.addMethodRef(TYPE_OBJECT,
              "toString", "()Ljava/lang/String;"));
          }
        } else {
          if (defaultValue != null) {
            code.astring(defaultValue.toString());
          } else {
            code.aconst_null();
          }
        }
        break;
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.