This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Removed OP_IN_REGISTER and related defines.
authorBrian Fraser <fraserbn@gmail.com>
Fri, 6 Sep 2013 01:16:50 +0000 (22:16 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sat, 21 Sep 2013 11:47:40 +0000 (08:47 -0300)
Added as an experiment in 462e5cf6, it never quite worked, and
recently wasn't even using registers.

cop.h
embedvar.h
intrpvar.h
perl.h

diff --git a/cop.h b/cop.h
index 0741d92..2a976ad 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -38,14 +38,6 @@ struct jmpenv {
 
 typedef struct jmpenv JMPENV;
 
-#ifdef OP_IN_REGISTER
-#define OP_REG_TO_MEM  PL_opsave = op
-#define OP_MEM_TO_REG  op = PL_opsave
-#else
-#define OP_REG_TO_MEM  NOOP
-#define OP_MEM_TO_REG  NOOP
-#endif
-
 /*
  * How to build the first jmpenv.
  *
@@ -107,9 +99,7 @@ typedef struct jmpenv JMPENV;
            Perl_deb(aTHX_ "JUMPENV_PUSH level=%d at %s:%d\n",          \
                         i,  __FILE__, __LINE__);})                     \
        cur_env.je_prev = PL_top_env;                                   \
-       OP_REG_TO_MEM;                                                  \
        cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf, SCOPE_SAVES_SIGNAL_MASK);              \
-       OP_MEM_TO_REG;                                                  \
        PL_top_env = &cur_env;                                          \
        cur_env.je_mustcatch = FALSE;                                   \
        (v) = cur_env.je_ret;                                           \
@@ -133,7 +123,6 @@ typedef struct jmpenv JMPENV;
            while (p) { i++; p = p->je_prev; }                  \
            Perl_deb(aTHX_ "JUMPENV_JUMP(%d) level=%d at %s:%d\n", \
                         (int)v, i, __FILE__, __LINE__);})      \
-       OP_REG_TO_MEM;                                          \
        if (PL_top_env->je_prev)                                \
            PerlProc_longjmp(PL_top_env->je_buf, (v));          \
        if ((v) == 2)                                           \
index 7c721ed..75a0cc9 100644 (file)
 #define PL_op_exec_cnt         (vTHX->Iop_exec_cnt)
 #define PL_op_mask             (vTHX->Iop_mask)
 #define PL_opfreehook          (vTHX->Iopfreehook)
-#define PL_opsave              (vTHX->Iopsave)
 #define PL_origalen            (vTHX->Iorigalen)
 #define PL_origargc            (vTHX->Iorigargc)
 #define PL_origargv            (vTHX->Iorigargv)
index 4ca7000..f4efc32 100644 (file)
  * Important ones in the first cache line (if alignment is done right) */
 
 PERLVAR(I, stack_sp,   SV **)          /* top of the stack */
-#ifdef OP_IN_REGISTER
-PERLVAR(I, opsave,     OP *)
-#else
 PERLVAR(I, op,         OP *)           /* currently executing op */
-#endif
 PERLVAR(I, curpad,     SV **)          /* active pad (lexicals+tmps) */
 
 PERLVAR(I, stack_base, SV **)
diff --git a/perl.h b/perl.h
index 5a27614..6b1c6b3 100644 (file)
--- a/perl.h
+++ b/perl.h
 #  endif
 #endif
 
-#ifdef OP_IN_REGISTER
-#  ifdef __GNUC__
-#    define stringify_immed(s) #s
-#    define stringify(s) stringify_immed(s)
-struct op *Perl_op asm(stringify(OP_IN_REGISTER));
-#  endif
-#endif
-
 /* gcc (-ansi) -pedantic doesn't allow gcc statement expressions,
  * g++ allows them but seems to have problems with them
  * (insane errors ensue).