Package erjang

Examples of erjang.ESmall


    }
   
    @BIF(name="binary_part", type=Type.GUARD)
    public static EObject binary_part_guard(EObject bin, EObject start) {
      EBinary bin1 = bin.testBinary();
      ESmall start1 = start.testSmall();
      if (bin1 == null || start1 == null) {
        return null;
      }
     
      return binary_part_guard(bin, start, ERT.box( bin1.byteSize() - start1.value ));
View Full Code Here


    }
   
    @BIF(name="binary_part", type=Type.GUARD)
    public static EObject binary_part_guard(EObject bin, EObject start, EObject length) {
      EBinary bin1 = bin.testBinary();
      ESmall start1 = start.testSmall();
      ESmall length1 = length.testSmall();
     
      if (bin1 == null || start1 == null || length == null) {
        return null;
      }
     
View Full Code Here

 
  @BIF
  public static EAtom is_builtin(EObject m, EObject f, EObject a) {
    EAtom mod  = m.testAtom();
    EAtom fun  = f.testAtom();
    ESmall ary = a.testSmall();
   
    if (mod == null || fun == null || ary == null)
      throw ERT.badarg(m, f, a);
   
    BuiltInFunction bif = BIFUtil.getMethod(mod, fun, ary.value, false, false);
View Full Code Here

  public static final EAtom am_lists = EAtom.intern("lists");
  public static final EAtom am_mapfoldl = EAtom.intern("mapfoldl");
 
  @BIF
  public static EObject keymember(EObject key, EObject nth_arg, EObject list_arg) {
    ESmall nth = nth_arg.testSmall();
    ESeq list = list_arg.testSeq();
   
    if (key == null || nth == null | list == null)
        throw ERT.badarg(key, nth_arg, list_arg);
View Full Code Here

    return ERT.FALSE;
  }
 
  @BIF
  public static EObject keyfind(EObject key, EObject nth_arg, EObject list_arg) {
    ESmall nth = nth_arg.testSmall();
    ESeq list = list_arg.testSeq();
   
    if (key == null || nth == null | list == null)
        throw ERT.badarg(key, nth_arg, list_arg);
View Full Code Here

    return ERT.FALSE;
  }
 
  @BIF
  public static EObject keysearch(EObject k, EObject n, EObject list) {
    ESmall idx = n.testSmall();
    ESeq src = list.testSeq();
   
    if (k==null||idx==null||src==null||idx.value<1)
      throw ERT.badarg(k, n, list);
   
View Full Code Here

  }
 
  @BIF
  public static ESeq seq(EObject start, EObject end)
  {
    ESmall sm_s = start.testSmall();
    ESmall sm_e = end.testSmall();
   
    if (sm_s == null || sm_e == null) {
      EInteger i_s;
      EInteger i_e;
      if ((i_s=start.testInteger()) == null
View Full Code Here

  }
 
  @BIF
  public static EObject delete_element(EObject idx0, EObject tup0)
  {
    ESmall idx = idx0.testSmall();
    ETuple tup = tup0.testTuple();
    if (idx == null || tup == null || idx.value < 1 || idx.value > tup.arity())
      throw ERT.badarg(idx0, tup0);
   
    EObject[] vals = new EObject[tup.arity()-1];
View Full Code Here

 
  @BIF
  public static EObject
  insert_element(EObject idx0, EObject tup0, EObject term)
  {
    ESmall idx = idx0.testSmall();
    ETuple tup = tup0.testTuple();
    if (idx == null || tup == null || idx.value < 1 || idx.value > tup.arity()+1)
      throw ERT.badarg(idx0, tup0);
   
    EObject[] vals = new EObject[tup.arity()+1];
View Full Code Here

        port = null;

      p = port.testInternalPort();
    }

    ESmall op = operation.testSmall();

    List<ByteBuffer> ovec = new ArrayList<ByteBuffer>();
    if (p == null || op == null || !data.collectIOList(ovec)) {
      throw ERT.badarg(port, operation, data);
    }
View Full Code Here

TOP

Related Classes of erjang.ESmall

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.