Examples of EAtom


Examples of erjang.EAtom

    }
  }

  private void visit_function(ModuleVisitor v, ETuple fun) {

    EAtom name = (EAtom) fun.elm(2);
    int ary = fun.elm(3).asInt();
    int entry = fun.elm(4).asInt();
    EList insns = (EList) fun.elm(5);

    FunctionVisitor fv = v.visitFunction(name, ary, entry);
View Full Code Here

Examples of erjang.EAtom

   * @param ctx
   * @return
   */
  private static Expr parse_ConditionExpression(EObject expr, ParseContext ctx) {

    EAtom am = expr.testAtom();
    if (am != null && is_expr_match_var(am)) {
      return parse_ExprMatchVariable(am, ctx);

    }

View Full Code Here

Examples of erjang.EAtom

    throw ERT.badarg(head);

  }

  private static Pattern compile_Match(EObject head, ParseContext ctx) {
    EAtom am;
    ECons cons;
    ETuple tuple;

    // is it '_'
    if (head == am_ANY) {
View Full Code Here

Examples of erjang.EAtom

    return a1.is_function(a2);
  }

  @BIF
  public static EObject function_exported(EObject a1, EObject a2, EObject a3) {
      EAtom mod = a1.testAtom();
      EAtom fun = a2.testAtom();
      ESmall ary = a3.testSmall();

      return ERT.box(EModuleManager.function_exported(mod,fun,ary.value));
  }
View Full Code Here

Examples of erjang.EAtom

 
  @BIF
  public static EObject fun_info(EObject fun_arg, EObject spec_arg)
  {
    EFun fun = fun_arg.testFunction();
    EAtom spec = spec_arg.testAtom();
   
    if (fun == null || spec == null) throw ERT.badarg(fun_arg, spec_arg);
   
    return fun.info(spec);
  }
View Full Code Here

Examples of erjang.EAtom

  }
 
  @BIF
  public static EFun make_fun(EObject m, EObject f, EObject a)
  {
    EAtom mod = m.testAtom();
    EAtom fun = f.testAtom();
    ESmall arity = a.testSmall();
    if (mod==null||fun==null||arity==null) {
      throw ERT.badarg(m,f,a);
    }
   
View Full Code Here

Examples of erjang.EAtom

    return proc.erase();
  }

  @BIF
  public static EObject register(EObject name, EObject pid) {
    EAtom aname;
    EHandle handle = pid.testHandle();
    if ((aname=name.testAtom()) == null
        || handle == null) throw ERT.badarg(name, pid);
    ERT.register(aname, handle);
    return ERT.TRUE;
View Full Code Here

Examples of erjang.EAtom

  }

 
  @BIF
  public static EObject unregister(EObject name) {
    EAtom aname;
    if ((aname=name.testAtom()) == null
      || !ERT.unregister(aname)) throw ERT.badarg(name);
    return ERT.TRUE;
  }
View Full Code Here

Examples of erjang.EAtom

 
 
  @BIF
  public static EObject spawn_link(EProc proc, EObject mod, EObject fun, EObject args) throws Pausable {
   
    EAtom m = mod.testAtom();
    EAtom f = fun.testAtom();
    ESeq  a = args.testSeq();
   
    if (m==null||f==null||a==null)
      throw ERT.badarg(mod, fun, args);
   
View Full Code Here

Examples of erjang.EAtom

  }

  @BIF
  public static EObject spawn_opt(EProc self, EObject tup) throws Pausable {
    ETuple t;
    EAtom m;
    EAtom f;
    ESeq a;
    ESeq o;
    if ((t=tup.testTuple()) == null
        || t.arity() != 4
        || (m=t.elm(1).testAtom()) == null
        || (f=t.elm(2).testAtom()) == null
        || (a=t.elm(3).testSeq()) == null
        || (o=t.elm(4).testSeq()) == null
        ) throw ERT.badarg(tup);
   
    boolean link = false;
    boolean monitor = false;
    EAtom priority = null;
   
    for (; !o.isNil(); o = o.tail() ) {
      EObject val = o.head();
     
      ETuple2 t2;
      if (val == am_link) {
        link = true;
      } else if (val == am_monitor) {
        monitor = true;
      } else if ((t2 = ETuple2.cast(val)) != null) {
       
        if (t2.elm(1) == am_priority) {
          EAtom am = t2.elm(2).testAtom();
          if (am != null)
            priority = am;
        }
       
        // ignore full_sweep_after and min_heap_size
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.