[Tinyos-commits]
CVS: tinyos-1.x/tos/lib/VM/languages/motlle/mate/rep-float
MotlleRepM.nc, 1.3, 1.4
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-float
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19711/rep-float
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-float/MotlleRepM.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MotlleRepM.nc 19 May 2005 17:20:37 -0000 1.3
--- MotlleRepM.nc 23 Oct 2005 21:09:24 -0000 1.4
***************
*** 47,51 ****
command mvalue V.read(svalue *location) {
return (mvalue)*location;
! }
command void V.write(svalue *location, mvalue x) {
--- 47,51 ----
command mvalue V.read(svalue *location) {
return (mvalue)*location;
! }
command void V.write(svalue *location, mvalue x) {
***************
*** 188,190 ****
--- 188,213 ----
(x & ~(1L << 31)) == 0); /* +/-0.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