This patch will clash with Steve Fink's stacks patch, but you get the
idea.

Also, there's gonna be a small speed hit that I don't know how to get
around.  The problem is that when you save an int constant on the stack in
a mixed 32/64-bit system, the int type is 8 bytes but the pointer points
to four bytes of int constant and four bytes of... something else.  So it
has to be copied out into a temp variable before being referenced.  I'll
leave it to greater minds to find a way around this. :-)

Index: core.ops
===================================================================
RCS file: /home/perlcvs/parrot/core.ops,v
retrieving revision 1.72
diff -u -r1.72 core.ops
--- core.ops    9 Jan 2002 17:24:11 -0000       1.72
+++ core.ops    10 Jan 2002 22:00:30 -0000
@@ -2292,7 +2292,8 @@
 =cut

 inline op save(in INT) {
-  push_generic_entry(interpreter, &interpreter->user_stack_top, &($1), 
STACK_ENTRY_INT, NULL);
+  INTVAL val = $1;
+  push_generic_entry(interpreter, &interpreter->user_stack_top, &val, 
+STACK_ENTRY_INT, NULL);
   goto NEXT();
 }



- D

<[EMAIL PROTECTED]>


Reply via email to