Examples of EAtom


Examples of erjang.EAtom

  }

  @BIF
 
  static public EObject get_module_info(EObject mod, EObject key) {
    EAtom m = mod.testAtom();
    EAtom k = key.testAtom();
   
    if (m == null || k == null) {
      throw ERT.badarg(mod, key);
    }
View Full Code Here

Examples of erjang.EAtom

            return ERT.box( is_record$g(term, tag, size) == ERT.TRUE );
  }

    @BIF(type=Type.GUARD, name="is_record")
            public static EAtom is_record$g(EObject term, EObject tag) {
                EAtom atag = tag.testAtom();
                ETuple tup = term.testTuple();
                boolean ok = ( (atag != null) && (tup != null)
                                && (tup.arity() > 0)
                                && (tup.elm(1) == atag) );
                if (ok) return ERT.TRUE;
View Full Code Here

Examples of erjang.EAtom

                else return null;
  }

    @BIF(type=Type.GUARD, name="is_record")
            public static EAtom is_record$g(EObject term, EObject tag, EObject size) {
                EAtom atag = tag.testAtom();
                ETuple tup = term.testTuple();
                ESmall siz = size.testSmall();
                boolean ok = ( (atag != null) && (tup != null) && (siz != null)
                                && (tup.arity() == siz.value)
                                && (tup.elm(1) == atag) );
View Full Code Here

Examples of erjang.EAtom

    return ERT.box(o.testNil() != null);
  }

  @BIF
  public static EString atom_to_list(EObject atom) {
    EAtom am = atom.testAtom();
    if (am == null)
      throw ERT.badarg(atom);
    return new EString(am.getName());
  }
View Full Code Here

Examples of erjang.EAtom

    return EModuleManager.loaded_modules();
  }
 
  @BIF
  public static EAtom delete_module(EObject m) {
    EAtom mod = m.testAtom();
    if (mod == null) throw ERT.badarg(m);
    return EModuleManager.delete_module(mod);
  }
View Full Code Here

Examples of erjang.EAtom

    return EModuleManager.delete_module(mod);
  }
 
  @BIF
  public static EObject call_on_load_function(EProc proc, EObject mod) throws Pausable {
    EAtom name;
    if ((name=mod.testAtom()) == null) {
      throw ERT.badarg(mod);
    }
   
    return EModuleLoader.call_on_load_function(proc, name);
View Full Code Here

Examples of erjang.EAtom

    return ERT.am_ok;
  }
 
  @BIF 
  public static ETuple2 load_module(EObject mod, EObject bin) {
    EAtom name = mod.testAtom();
    EBinary binary = bin.testBinary();
    return load_module(name, binary);
  }
View Full Code Here

Examples of erjang.EAtom

    return ERT.box(o1 == ERT.FALSE);
  }

  @BIF
  public static EAtom xor(EObject o1, EObject o2) {
    EAtom a1, a2;
    if ((a1 = o1.testBoolean()) == null ||
        (a2 = o2.testBoolean()) == null)
      throw ERT.badarg(o1, o2);
    boolean b1 = a1 == ERT.TRUE,
            b2 = a2 == ERT.TRUE;
View Full Code Here

Examples of erjang.EAtom

 
  @BIF
  public static EObject raise(EObject kind, EObject value, EObject trace)
      throws ErlangException {

    EAtom clazz = kind.testAtom();
    ESeq traz = trace.testSeq();

    if (traz == null) {
//      System.err.println("bad argument to raise3: ("+kind+", "+value+", "+trace+")");
      return ERT.am_badarg;
View Full Code Here

Examples of erjang.EAtom

            return val;
        }

    @BIF
    public static EAtom check_old_code(EObject obj) {
        EAtom module = obj.testAtom();
        if (module == null)
            throw ERT.badarg(obj);

        boolean result = EModuleManager.module_loaded(module);
        return ERT.box(result);
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.