Examples of self()


Examples of anvil.codec.Code.self()

  public void accessInstance(ClassType context, ClassType target)
  {
    Code code = getCode();
    if (context == null || context == target) {
      code.self();
      return;
    }
    ConstantPool pool = code.getPool();
    ClassType[] parents = context.getEnclosingClasses();
    int n = parents.length;
View Full Code Here

Examples of anvil.codec.Code.self()

    ClassType[] parents = context.getEnclosingClasses();
    int n = parents.length;
    for(int i=0; i<n; i++) {
      ClassType parent = parents[i];
      if (parent == target) {
        code.self();
        code.getfield(pool.addFieldRef(context.getTypeRef(pool), "this$"+i,
          'L'+parent.getDescriptor()+';'));
        return;
      }
    }
View Full Code Here

Examples of anvil.codec.Code.self()

        code.getfield(pool.addFieldRef(context.getTypeRef(pool), "this$"+i,
          'L'+parent.getDescriptor()+';'));
        return;
      }
    }
    code.self();
  }


}
View Full Code Here

Examples of anvil.codec.Code.self()

    clazz.addInterface("anvil/script/GeneratorDispatcher");
    clazz.setAccessFlags(ACC_PUBLIC|ACC_FINAL);

    Method method = clazz.createMethod("<init>", "()V", ACC_PUBLIC);
    Code code = method.getCode();
    code.self();
    code.invokespecial(pool.addMethodRef(clazz.getSuperClassIndex(), "<init>", "()V"));
    code.vreturn();

    method = clazz.createMethod("execute",
      "(Lanvil/script/Context;Lanvil/core/AnyClass;Lanvil/script/Generator;)Lanvil/core/Any;",
View Full Code Here

Examples of anvil.codec.Code.self()

    } else {
      code.aconst_null();
    }
    code.getstatic(pool.addFieldRef(_thunk.getParent().getTypeRef(pool), name, "Lanvil/script/Function;"));
    if (inclass) {
      code.self();
    }
    code.invokespecial(pool.addMethodRef(clazz, "<init>", signature));

    if (operation == GET_BOOLEAN) {
      context.any2boolean();
View Full Code Here

Examples of anvil.codec.Code.self()

    if (!blocked) {
      if (_expression != null) {
        code.aload(rv);
        code.areturn();
      } else {
        code.self();
        code.areturn();
      }
    }
  }  
View Full Code Here

Examples of anvil.codec.Code.self()

  {
    ClassType base = _classtype.getBaseClass();
    if (base != null) {
      Code code = context.getCode();
      CompilableFunction ctor = base.getConstructor();
      code.self();
      context.compileArgumentList(ctor, getChilds(0));
      code.invokespecial(ctor.getTypeRef(code.getPool()));
    }
  }
View Full Code Here

Examples of anvil.codec.Code.self()

    ConstantPool pool = code.getPool();
    boolean inClass = (_function.getType() != Type.FUNCTION);
   
    code.aload_first();
    if (inClass) {
      code.self();
    }
   
    int parent = _function.getParent().getTypeRef(pool);
    String name = (inClass ? "m_" : "f_")+_function.getName();
    int field = pool.addFieldRef(parent, name, "Lanvil/script/Function;");
View Full Code Here

Examples of anvil.codec.Code.self()

            if (name.hashCode() == kase.getKey()) {
              code.aload(l_attr);
              code.astring(name);
              code.invokevirtual(sig_equals);
              Source isfalse = code.if_eq();
              code.self();
              context.compileArgumentList(target, nodes1, l_context);
              code.invokevirtual(target.getTypeRef(pool));
              if (castToBoolean) {
                code.invokevirtual(sig_toBoolean);
                code.ireturn();
View Full Code Here

Examples of anvil.codec.Code.self()

          MethodStatement target = methods[i];
          code.aload(l_attr);
          code.astring(target.getName().substring(prefixLength));
          code.invokevirtual(sig_equals);
          Source isfalse = code.if_eq();
          code.self();
          context.compileArgumentList(target, nodes1, l_context);
          code.invokevirtual(target.getTypeRef(pool));
          if (castToBoolean) {
            code.invokevirtual(sig_toBoolean);
            code.ireturn();
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.