Examples of elm()


Examples of erjang.ETuple.elm()

    if (t.arity() != 4) {
      throw ERT.badarg(node_arg, cid_arg, type_arg);
    }
   
    ESmall flags = t.elm(1).testSmall();
    ESmall version = t.elm(2).testSmall();
    if (flags == null || version == null) {
      throw ERT.badarg(node_arg, cid_arg, type_arg);
    }

    EPeer n = EPeer.get_or_create(node, creation, port, flags.value, version.value);
View Full Code Here

Examples of erjang.ETuple.elm()

    ETuple t;
    if ((t=tup.testTuple()) == null) { throw ERT.badarg(tup); }

    ESeq res = ERT.NIL;
    for (int i = t.arity(); i > 0; i--) {
      EObject e = t.elm(i);
      res = res.cons(e==null?ERT.NIL:e);
    }
   
    return res;
  }
View Full Code Here

Examples of erjang.ETuple.elm()

          // close is handled by exception handling code
          return;
        }
      } else if ((tup = msg.testTuple()) != null && tup.arity() == 5) {
        // {'DOWN', ref, process, pid, reason}
        if (tup.elm(1) == ERT.am_DOWN) {
          ERef ref = tup.elm(2).testReference();
          instance.processExit(ref);
        }

      }
View Full Code Here

Examples of erjang.ETuple.elm()

          return;
        }
      } else if ((tup = msg.testTuple()) != null && tup.arity() == 5) {
        // {'DOWN', ref, process, pid, reason}
        if (tup.elm(1) == ERT.am_DOWN) {
          ERef ref = tup.elm(2).testReference();
          instance.processExit(ref);
        }

      }
View Full Code Here

Examples of erjang.ETuple.elm()

    ETuple tup = ent.head().testTuple();
    if (tup == null || p.value < 1 || p.value > tup.arity()) {
      throw ERT.badarg(tab, key, p);
    }
   
    return tup.elm(p.value);
  }

 
 
  @BIF
View Full Code Here

Examples of erjang.ETuple.elm()

          return rec.elm(idx);
         
        } else if ((one=upd.testTuple()) != null) {
         
          if (one.arity() == 2) {
            ESmall eidx = one.elm(1).testSmall();
            incr = one.elm(2).testInteger();
            if (eidx == null || eidx.value > rec.arity() || incr == null) return null;
            int idx = eidx.value;
           
            rec = update(rec, idx, incr);
View Full Code Here

Examples of erjang.ETuple.elm()

         
        } else if ((one=upd.testTuple()) != null) {
         
          if (one.arity() == 2) {
            ESmall eidx = one.elm(1).testSmall();
            incr = one.elm(2).testInteger();
            if (eidx == null || eidx.value > rec.arity() || incr == null) return null;
            int idx = eidx.value;
           
            rec = update(rec, idx, incr);
            if (rec == null) return null;
View Full Code Here

Examples of erjang.ETuple.elm()

            set(map);
            return rec.elm(idx);

          } else if (one.arity() == 4){
           
            ESmall eidx = one.elm(1).testSmall();
            incr = one.elm(2).testInteger();
            EInteger threshold = one.elm(3).testInteger();
            EInteger setvalue = one.elm(4).testInteger();
            if (eidx == null || eidx.value > rec.arity() || incr == null
                || threshold == null || setvalue == null) return null;
View Full Code Here

Examples of erjang.ETuple2.elm()

            mv.visitInsn(ICONST_0);
            return Type.BOOLEAN_TYPE;
          }
          if (value instanceof ETuple2) {
            ETuple2 t2 = (ETuple2) value;
            if (t2.elm(1) == ATOM_field_flags) {
              push_int(t2.elem2.asInt());
              return Type.INT_TYPE;
            }
          }
          throw new Error("cannot convert " + value + " as "
View Full Code Here

Examples of erjang.ETuple2.elm()

        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;
        }
       
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.