[Tinyos-commits] CVS: tinyos-1.x/tos/lib/VM/languages/motlle/mate/runtime SFNmagic.nc, NONE, 1.1

David Gay idgay at users.sourceforge.net
Sun Oct 23 10:22:23 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/mate/runtime
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5081

Added Files:
	SFNmagic.nc 
Log Message:
opcodes reused as functions


--- NEW FILE: SFNmagic.nc ---
configuration SFNmagic {
  provides {
    //FN eq?: x1 x2 -> b. True if x1 and x2 are the same object
    interface MateBytecode as EqP;

    //FN eqv?: x1 x2 -> b. True if x1 and x2 are the same object
    interface MateBytecode as EqvP;

    //FN any-ref: x1 n -> x2. Lookup nth element of vector or string x1
    interface MateBytecode as AnyRef;

    //FN vector-ref: v1 n -> x2. Lookup nth element of vector v1
    interface MateBytecode as VectorRef;

    //FN string-ref: s1 n -> x2. Lookup nth element of s1
    interface MateBytecode as StringRef;

    //FN any-set!: x1 n x2 -> x2. Set nth element of vector or string x1 to x2
    interface MateBytecode as AnySetB;

    //FN vector-set!: v1 n x2 -> x2. Set nth element of vector v1 to x2
    interface MateBytecode as VectorSetB;

    //FN string-set!: s1 n x2 -> x2. Set nth element of s1 to x2
    interface MateBytecode as StringSetB;

    //FN not: b1 -> b2. Return logical negation of b1
    interface MateBytecode as Not;
  }
}
implementation {
  components OPmeq, OPmref, OPmset, OPmnot;

  EqP = OPmeq;
  EqvP = OPmeq;

  AnyRef = OPmref;
  StringRef = OPmref;
  VectorRef = OPmref;

  AnySetB = OPmset;
  VectorSetB = OPmset;
  StringSetB = OPmset;

  Not = OPmnot;
}



More information about the Tinyos-commits mailing list