cvsuser 04/11/02 02:23:47
Modified: include/parrot interpreter.h
src runops_cores.c warnings.c
Log:
move current_pc into context
Revision Changes Path
1.160 +2 -3 parrot/include/parrot/interpreter.h
Index: interpreter.h
===================================================================
RCS file: /cvs/public/parrot/include/parrot/interpreter.h,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- interpreter.h 1 Nov 2004 14:26:32 -0000 1.159
+++ interpreter.h 2 Nov 2004 10:23:46 -0000 1.160
@@ -1,7 +1,7 @@
/* interpreter.h
* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
* CVS Info
- * $Id: interpreter.h,v 1.159 2004/11/01 14:26:32 leo Exp $
+ * $Id: interpreter.h,v 1.160 2004/11/02 10:23:46 leo Exp $
* Overview:
* The interpreter api handles running the operations
* Data Structure and Algorithms:
@@ -172,6 +172,7 @@
*/
PMC *current_cont; /* the return continuation PMC */
PMC *current_object; /* current object if a method call */
+ opcode_t *current_pc; /* program counter of Sub invocation */
} parrot_context_t;
struct _Thread_data; /* in thread.h */
@@ -228,8 +229,6 @@
RunProfile *profile; /* The structure and array where we keep the
* profile counters */
- opcode_t *cur_pc; /* for profile and warnings */
-
INTVAL resume_flag;
size_t resume_offset;
1.51 +3 -3 parrot/src/runops_cores.c
Index: runops_cores.c
===================================================================
RCS file: /cvs/public/parrot/src/runops_cores.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- runops_cores.c 25 Jul 2004 10:40:30 -0000 1.50
+++ runops_cores.c 2 Nov 2004 10:23:47 -0000 1.51
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: runops_cores.c,v 1.50 2004/07/25 10:40:30 leo Exp $
+$Id: runops_cores.c,v 1.51 2004/11/02 10:23:47 leo Exp $
=head1 NAME
@@ -142,7 +142,7 @@
trace_op(interpreter, code_start, code_end, pc);
}
while (pc) {/* && pc >= code_start && pc < code_end) {*/
- interpreter->cur_pc = pc;
+ interpreter->ctx.current_pc = pc;
DO_OP(pc, interpreter);
@@ -212,7 +212,7 @@
}
while (pc) {/* && pc >= code_start && pc < code_end) */
- interpreter->cur_pc = pc;
+ interpreter->ctx.current_pc = pc;
profile->cur_op = cur_op = *pc + PARROT_PROF_EXTRA;
profile->data[cur_op].numcalls++;
profile->starttime = Parrot_floatval_time();
1.25 +3 -3 parrot/src/warnings.c
Index: warnings.c
===================================================================
RCS file: /cvs/public/parrot/src/warnings.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- warnings.c 15 Aug 2004 04:39:23 -0000 1.24
+++ warnings.c 2 Nov 2004 10:23:47 -0000 1.25
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: warnings.c,v 1.24 2004/08/15 04:39:23 chromatic Exp $
+$Id: warnings.c,v 1.25 2004/11/02 10:23:47 leo Exp $
=head1 NAME
@@ -46,10 +46,10 @@
op_info_t *op_info;
opcode_t *pc;
- if (!interpreter->cur_pc)
+ if (!interpreter->ctx.current_pc)
return -2;
pc = interpreter->code->cur_cs->base.data;
- offs = interpreter->cur_pc - pc;
+ offs = interpreter->ctx.current_pc - pc;
for (i = n = 0; n < interpreter->code->cur_cs->base.size; i++) {
op_info = &interpreter->op_info_table[*pc];
if (n >= offs)