[Tinyos-commits]
CVS: tinyos-1.x/tos/lib/VM/languages/motlle/mate/rep-16
MotlleRepM.nc, 1.2, 1.3
David Gay
idgay at users.sourceforge.net
Sun Oct 23 14:09:26 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/mate/rep-16
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19711/rep-16
Modified Files:
MotlleRepM.nc
Log Message:
marks on values for detecting circular structures
valid_list test
sequence functions (incl. for-each)
frames with attached (nesC) code
consequent revamp of pc->opcode mapping
still needs: testing. revamp of opmhandler4 (to just opmhandler)
PC now indicates special instructions for pc=0 (opmhandler), pc=1 (halt),
pc=2 (execute frame code)
Index: MotlleRepM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/mate/rep-16/MotlleRepM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MotlleRepM.nc 30 Nov 2004 18:52:43 -0000 1.2
--- MotlleRepM.nc 23 Oct 2005 21:09:24 -0000 1.3
***************
*** 155,157 ****
--- 155,180 ----
return x != call V.make_integer(0);
}
+
+ // Marks. Use the forwarding bits, so don't use if GC can occur!
+ command void V.mark(mvalue x) {
+ if (call V.pointerp(x))
+ {
+ uint8_t *hdr = objbase(call V.pointer(x));
+
+ hdr[0] |= 1;
+ }
+ }
+
+ command void V.unmark(mvalue x) {
+ if (call V.pointerp(x))
+ {
+ uint8_t *hdr = objbase(call V.pointer(x));
+
+ hdr[0] &= ~1;
+ }
+ }
+
+ command bool V.marked(mvalue x) {
+ return call V.pointerp(x) && call V.forwardedp(call V.pointer(x));
+ }
}
More information about the Tinyos-commits
mailing list