Examples of ETuple


Examples of erjang.ETuple

    in_tx(new WithMap<Object>() {
      @Override
      protected Object run(IPersistentMap map) {
        int count = 0;
        for (ESeq seq = values; !seq.isNil(); seq = seq.tail()) {
          ETuple value = seq.head().testTuple();
          if (value == null) throw ERT.badarg(values);
          EObject key = get_key(value);
          IPersistentCollection c =
            (IPersistentCollection) map.valAt(key, empty());
View Full Code Here

Examples of erjang.ETuple

        }
       
        int count = 0;
        for (; !vals.isNil(); vals = vals.tail()) {
          try {
            ETuple val = (ETuple) vals.head();
            key = val.elm(keypos1);
            IPersistentCollection coll = (IPersistentCollection) map.valAt(key);

            if (coll instanceof IPersistentSet) {
              IPersistentSet set = (IPersistentSet) coll;
              set = set.disjoin(val);
View Full Code Here

Examples of erjang.ETuple

          map_seq = map_seq.next();
        }
       
        assert seq_has_more(coll_seq);
       
        ETuple candidate = (ETuple) coll_seq.first();
        coll_seq = coll_seq.next();
       
        EObject res;
        if ((res = matcher.match(candidate)) != null) {
          count += 1;
View Full Code Here

Examples of erjang.ETuple

    int i = 0;
    for (Insn insn : body) {
      symBody[i++] = insn.toSymbolic();
    }

    ETuple fun = ETuple.make(CodeAtoms.FUNCTION_ATOM,
                 sig.fun,
                 new ESmall(sig.arity),
                 new ESmall(sig.label),
                 ESeq.fromArray(symBody));
    return fun;
View Full Code Here

Examples of erjang.ETuple

    }
  }

  private void visit_attributes(ModuleVisitor v) {
    for (ESeq exp = (ESeq) attributes; exp != ERT.NIL; exp = exp.tail()) {
      ETuple attr = (ETuple) exp.head();
      v.visitAttribute((EAtom) attr.elm(1), attr.elm(2));
    }
  }
View Full Code Here

Examples of erjang.ETuple

    }
  }

  private void visit_compile(ModuleVisitor v) {
    for (ESeq exp = (ESeq) compilation_info; exp != ERT.NIL; exp = exp.tail()) {
      ETuple attr = (ETuple) exp.head();
      v.visitCompile((EAtom) attr.elm(1), attr.elm(2));
    }
  }
View Full Code Here

Examples of erjang.ETuple

  public EObject toSymbolic() {
      return opcode.symbol;
  }
  public final ETuple toSymbolicTuple() {
    EObject symInsn0 = toSymbolic();
    ETuple symInsn = (symInsn0 instanceof ETuple)?
      ((ETuple)symInsn0) : ETuple.make(symInsn0);
    return symInsn;
  }
View Full Code Here

Examples of erjang.ETuple

    EInternalPort port = cid_arg.testInternalPort();
    if (port == null) {
      throw ERT.badarg(node_arg, cid_arg, type_arg);
    }

    ETuple t = type_arg.testTuple();
    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

        EProc new_owner_task;
        if ((new_owner_task = new_owner.task()) != null) {
            //System.err.println("received exit from owner "+former_owner
            //          +" => transfer to "+new_owner_task);

            ETuple msg = ETuple.make(EAtom.intern("ETS-TRANSFER"),
                    this.is_named ? this.aname : this.tid,
                    former_owner,
                    transfer_data);

            this.owner = new WeakReference<EProc>(new_owner_task);
View Full Code Here

Examples of erjang.ETuple

      if (op == null) {
        return -1;
      }
     
      ETuple2 ok = new ETuple2(ERT.am_error, req);
      ETuple msg = ETuple.make(am_inet_async, desc.port(), ERT.box(op.id), ok);
     
      desc.driver_send_term(op.caller, msg);

    } else {
          /* {http, S, {http_error, Line}}} */
     
      ETuple http = ETuple.make(am_http, desc.port(), req);
     
      desc.driver_output_term(http);
    }
   
    return 0;
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.