cvsuser 04/05/09 07:58:31
Modified: include/parrot pobj.h
src list.c
Log:
off by 1 errror; move const to pobj.h
Revision Changes Path
1.43 +3 -1 parrot/include/parrot/pobj.h
Index: pobj.h
===================================================================
RCS file: /cvs/public/parrot/include/parrot/pobj.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -w -r1.42 -r1.43
--- pobj.h 22 Apr 2004 08:55:06 -0000 1.42
+++ pobj.h 9 May 2004 14:58:28 -0000 1.43
@@ -1,7 +1,7 @@
/* pobj.h
* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
* CVS Info
- * $Id: pobj.h,v 1.42 2004/04/22 08:55:06 leo Exp $
+ * $Id: pobj.h,v 1.43 2004/05/09 14:58:28 leo Exp $
* Overview:
* Parrot Object data members and flags enum
* Data Structure and Algorithms:
@@ -310,11 +310,13 @@
# define ARENA_FLAG_MASK 0x7
# define ALL_LIVE_MASK 0x11111111
# define ALL_FREE_MASK 0x22222222
+# define ALL_SPECIAL_MASK 0x44444444
#elif INTVAL_SIZE == 8
# define ARENA_FLAG_SHIFT 4
# define ARENA_FLAG_MASK 0xf
# define ALL_LIVE_MASK 0x1111111111111111
# define ALL_FREE_MASK 0x2222222222222222
+# define ALL_SPECIAL_MASK 0x4444444444444444
#else
# error Unsupported INTVAL_SIZE
#endif /* INTVAL_SIZE == 4 */
1.50 +16 -9 parrot/src/list.c
Index: list.c
===================================================================
RCS file: /cvs/public/parrot/src/list.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -w -r1.49 -r1.50
--- list.c 9 May 2004 07:56:39 -0000 1.49
+++ list.c 9 May 2004 14:58:31 -0000 1.50
@@ -1,7 +1,7 @@
/*
Copyright: (c) 2002 Leopold Toetsch <[EMAIL PROTECTED]>
License: Artistic/GPL, see README and LICENSES for details
-$Id: list.c,v 1.49 2004/05/09 07:56:39 leo Exp $
+$Id: list.c,v 1.50 2004/05/09 14:58:31 leo Exp $
=head1 NAME
@@ -1397,26 +1397,33 @@
++pp;
next = pp[1];
if (up) {
- if ((char*)next - (char*)p != obj_size)
+ if ((char*)next - (char*)p != obj_size) {
+ ++i;
goto slow;
+ }
+ nm += 4;
+ ++n;
if (! (n & ARENA_FLAG_MASK)) {
++dod_flags;
- if ((*dod_flags & 0x44444444) == 0x44444444) {
+ if ((*dod_flags & ALL_SPECIAL_MASK) ==
+ ALL_SPECIAL_MASK) {
/* found a bunch of special_PMCs */
+ ++i;
goto slow;
}
nm = 0;
}
- else
- nm += 4;
- ++n;
}
else {
- if ((char*)p - (char*)next != obj_size)
+ if ((char*)p - (char*)next != obj_size) {
+ ++i;
goto slow;
+ }
if (! (n & ARENA_FLAG_MASK)) {
--dod_flags;
- if ((*dod_flags & 0x44444444) == 0x44444444) {
+ if ((*dod_flags & ALL_SPECIAL_MASK) ==
+ ALL_SPECIAL_MASK) {
+ ++i;
goto slow;
}
nm = ((n-1) & ARENA_FLAG_MASK) << 2;
@@ -1430,9 +1437,9 @@
}
}
else {
+slow:
/* do it the plain way */
for ( ; i < chunk->items; ++i, ++pp) {
-slow:
if (*pp)
pobject_lives(interpreter, *pp);
}