Package erjang

Examples of erjang.FunID


    @Override
    public void visitMaxs(Collection<Integer> x_regs, int y_count,
        int fp_count, boolean isTailRecursive,
        Collection<Integer> dead_blocks) {

      FunID me = new FunID(module_name, fun_name, arity);
      this.funInfo = funInfos.get(me);
      this.isTailRecursive = isTailRecursive;
      this.deadBlocks = dead_blocks;

      Lambda lambda = get_lambda_freevars(fun_name, arity);
View Full Code Here


          mv.visitVarInsn(ALOAD, 0);
          for (int i = 0; i < args.length; i++) {
            push(args[i], EOBJECT_TYPE);
          }

          FunInfo target = funInfos.get(new FunID(fun.mod,
              fun.name(), fun.arity));

         
          if (!is_tail &&
            target.may_return_tail_marker &&
View Full Code Here

       * ann) { System.err.println(" -> "+field.getName()+" : "+a); }
       */

      Internal imp = field.getAnnotation(Internal.class);
      if (imp != null) {
        FunID f = new FunID(imp);

        EModuleManager.add_internal(f, new FieldBinder(field, f, module_name()));

        // System.out.println("  import " + f
        // + (resolved ? "resolved" : ""));

        continue;
      }

      Export exp = field.getAnnotation(Export.class);
      if (exp != null) {
        field.setAccessible(true);
        EFun value;
        try {
          value = (EFun) field.get(null);
        } catch (Exception e) {
          throw new Error(e);
        }

        if (value == null)
          throw new Error("field " + field + " not initialized");

        FunID f;
        EModuleManager.add_export(this, f = new FunID(exp), value);

        // System.out.println("  export " + f);

        continue;
      }
View Full Code Here

      throw ERT.badarg(a1, a2, a3);
    }
   
    int arity = a.length();
   
    EFun target = EModuleManager.resolve(new FunID(m,f,arity));
   
    if (target == null) {
      throw new ErlangUndefined(m, f, new ESmall(arity));
    }
   
View Full Code Here

    ESmall arity = a.testSmall();
    if (mod==null||fun==null||arity==null) {
      throw ERT.badarg(m,f,a);
    }
   
    return EModuleManager.resolve(new FunID(mod, fun, arity.value));
  }
View Full Code Here

      }
     
      EAtom mn = t2.elem1.testAtom();
      EAtom fn = t2.elem2.testAtom();
     
      FunID funspec;
      f = EModuleManager.resolve(funspec=new FunID(mn,fn,a.length()));
     
      if (f == null) {
        throw ERT.undef(funspec, a.toArray());
      }
     
View Full Code Here

    return fi;
  }

  FunInfo get(EAtom fun, int arity, Label label) {
    FunInfo fi = get(label);
    fi.name = new FunID(name, fun, arity);
    return fi;
  }
View Full Code Here

   * @param old_uniq
   */
  public void register_lambda(EAtom fun, int arity_plus, int freevars,
      int index, int old_index, EBinary uniq, int old_uniq) {

    lambdas_xx.put(new FunID(module_name, fun, arity_plus), new Lambda(fun,
        arity_plus, freevars, index, old_index, uniq, old_uniq));
  }
View Full Code Here

    lambdas_xx.put(new FunID(module_name, fun, arity_plus), new Lambda(fun,
        arity_plus, freevars, index, old_index, uniq, old_uniq));
  }

  public Lambda get_lambda_freevars(EAtom fun, int arity_plus) {
    return lambdas_xx.get(new FunID(module_name, fun, arity_plus));
  }
View Full Code Here

  static class FunIDWithGuardedness {
    final FunID fun;
    final boolean is_guard;

    public FunIDWithGuardedness(EAtom mod, EAtom fun, int arity, boolean is_guard) {
      this.fun = new FunID(mod, fun, arity);
      this.is_guard = is_guard;
    }
View Full Code Here

TOP

Related Classes of erjang.FunID

Copyright © 2018 www.massapicom. 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.