[svn:parrot] r41335 - branches/kill_jit/src

darbelo at svn.parrot.org darbelo at svn.parrot.org
Fri Sep 18 18:03:39 UTC 2009


Author: darbelo
Date: Fri Sep 18 18:03:32 2009
New Revision: 41335
URL: https://trac.parrot.org/parrot/changeset/41335

Log:
With the JIT dead, nobody has exec capability anymore.

Modified:
   branches/kill_jit/src/embed.c
   branches/kill_jit/src/frame_builder.h
   branches/kill_jit/src/packfile.c

Modified: branches/kill_jit/src/embed.c
==============================================================================
--- branches/kill_jit/src/embed.c	Fri Sep 18 16:56:17 2009	(r41334)
+++ branches/kill_jit/src/embed.c	Fri Sep 18 18:03:32 2009	(r41335)
@@ -807,15 +807,6 @@
     /* Set up @ARGS (or whatever this language calls it) in userargv. */
     userargv = setup_argv(interp, argc, argv);
 
-#if EXEC_CAPABLE
-
-    /* s. runops_exec interpreter.c */
-    if (Parrot_str_equal(interp, interp->run_core->name,
-        Parrot_str_new_constant(interp, "exec")))
-        Parrot_exec_run = 1;
-
-#endif
-
     /*
      * If any profile information was gathered, print it out
      * before exiting, then print debug infos if turned on.

Modified: branches/kill_jit/src/frame_builder.h
==============================================================================
--- branches/kill_jit/src/frame_builder.h	Fri Sep 18 16:56:17 2009	(r41334)
+++ branches/kill_jit/src/frame_builder.h	Fri Sep 18 18:03:32 2009	(r41335)
@@ -211,11 +211,7 @@
     int                             flags;
     const struct jit_arch_info_t    *arch_info;
     int                              n_args;
-#if EXEC_CAPABLE
-    Parrot_exec_objfile_t           *objfile;
-#else
     void                            *objfile;
-#endif /* EXEC_CAPABLE */
 } Parrot_jit_info_t;
 
 #define Parrot_jit_fixup_target(jit_info, fixup) \
@@ -526,19 +522,11 @@
     *(long *)(pc) = (long)(imm); \
     (pc) += 4; }
 
-#if EXEC_CAPABLE
-#  define emitm_pushl_m(pc, mem) { \
-       *((pc)++) = (char) 0xff; \
-       *((pc)++) = (char) 0x35; \
-       *(long *)(pc) = (long)(mem); \
-       (pc) += 4; }
-#else /* EXEC_CAPABLE */
-#  define emitm_pushl_m(pc, mem) { \
+#define emitm_pushl_m(pc, mem) { \
        *((pc)++) = (char) 0xff; \
        *((pc)++) = (char) 0x35; \
        *(long *)(pc) = (long)(mem); \
        (pc) += 4; }
-#endif /* EXEC_CAPABLE */
 
 char * emit_pushl_m(PARROT_INTERP, char *pc, int base, int i, int scale,
     long disp);
@@ -1348,16 +1336,9 @@
     *((pc)++) = (char) 0xff; \
     *((pc)++) = (char) 0xd0 | ((reg) - 1); }
 
-#if EXEC_CAPABLE
-#  define emitm_callm(pc, b, i, s, d) { \
-       *((pc)++) = (char) 0xff; \
-       (pc) = emit_r_X((interp), (pc), emit_reg(emit_b010), (b), (i), (s), (d));\
-       }
-#else /* EXEC_CAPABLE */
 #  define emitm_callm(pc, b, i, s, d) { \
        *((pc)++) = (char) 0xff; \
        (pc) = emit_r_X((interp), (pc), emit_reg(emit_b010), (b), (i), (s), (d)); }
-#endif /* EXEC_CAPABLE */
 
 #  define emitm_jumps(pc, disp) { \
     *((pc)++) = (char) 0xeb; \
@@ -1371,16 +1352,9 @@
     *((pc)++) = (char) 0xff; \
     *((pc)++) = (char)(0xe0 | ((reg) - 1)); }
 
-#if EXEC_CAPABLE
-#  define emitm_jumpm(pc, b, i, s, d) { \
-       *((pc)++) = (char) 0xff; \
-       (pc) = emit_r_X((interp), (pc), emit_reg(emit_b100), (b), (i), (s), (d)); \
-       }
-#else /* EXEC_CAPABLE */
 #  define emitm_jumpm(pc, b, i, s, d) { \
        *((pc)++) = (char) 0xff; \
        (pc) = emit_r_X((interp), (pc), emit_reg(emit_b100), (b), (i), (s), (d)); }
-#endif /* EXEC_CAPABLE */
 
 /* Conditional jumps */
 
@@ -1971,46 +1945,6 @@
 
 #endif /* JIT_VTABLE_OPS */
 
-#if EXEC_CAPABLE
-#  ifdef JIT_CGP
-#    ifdef EXEC_SHARED
-#      define exec_emit_end(interp, pc) { \
-           jit_emit_mov_rm_i((pc), c, 2); \
-           Parrot_exec_add_text_rellocation(jit_info->objfile, \
-             jit_info->native_ptr, RTYPE_COM, "cgp_core", 0); \
-           emitm_movl_m_r((interp), jit_info->native_ptr, emit_ESI, emit_ESI, \
-             emit_None, 1, 0); \
-           emitm_addb_i_r(jit_info->native_ptr, \
-             (int)((ptrcast_t)((op_func_t*) \
-               (interp)->op_lib->op_func_table)[0]) - (int)cgp_core, \
-                 emit_ESI); \
-           emitm_jumpr((pc), emit_ESI); \
-         }
-#    else /* EXEC_SHARED */
-#      define exec_emit_end(interp, pc) { \
-           jit_emit_mov_ri_i((interp), (pc), emit_ESI, \
-             (int)((ptrcast_t)((op_func_t*) \
-               (interp)->op_lib->op_func_table)[0]) - (int)cgp_core); \
-           Parrot_exec_add_text_rellocation(jit_info->objfile, \
-             jit_info->native_ptr, RTYPE_COM, "cgp_core", -4); \
-           emitm_jumpr((pc), emit_ESI); \
-         }
-#    endif /* EXEC_SHARED */
-
-#  else /* JIT_CGP */
-
-#    define exec_emit_end(pc) jit_emit_end(pc)
-
-#  endif /* JIT_CGP */
-#endif /* EXEC_CAPABLE */
-
-#ifdef JIT_CGP
-#  define jit_emit_end(interp, pc) { \
-       jit_emit_mov_ri_i((interp), (pc), emit_ESI, \
-         (ptrcast_t)((op_func_t*)(interp)->op_lib->op_func_table) [0]); \
-       emitm_jumpr((pc), emit_ESI); \
-     }
-#else /* JIT_CGP */
 #  define jit_emit_end(pc) { \
        jit_emit_add_ri_i((interp), (pc), emit_ESP, 4); \
        emitm_popl_r((pc), emit_EDI); \
@@ -2020,8 +1954,6 @@
        emitm_ret(pc); \
      }
 
-#endif /* JIT_CGP */
-
 void jit_get_params_pc(Parrot_jit_info_t *jit_info, PARROT_INTERP);
 
 /*

Modified: branches/kill_jit/src/packfile.c
==============================================================================
--- branches/kill_jit/src/packfile.c	Fri Sep 18 16:56:17 2009	(r41334)
+++ branches/kill_jit/src/packfile.c	Fri Sep 18 18:03:32 2009	(r41335)
@@ -462,10 +462,6 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
 
-#if EXEC_CAPABLE
-    extern int Parrot_exec_run;
-#endif
-
 /* offset not in ptr diff, but in byte */
 #define OFFS(pf, cursor) ((pf) ? ((const char *)(cursor) - (const char *)((pf)->src)) : 0)
 /**
@@ -3694,10 +3690,6 @@
 }
 
 
-#if EXEC_CAPABLE
-PackFile_Constant *exec_const_table;
-#endif
-
 /*
 
 =item C<const opcode_t * PackFile_ConstTable_unpack(PARROT_INTERP,
@@ -3749,13 +3741,7 @@
     for (i = 0; i < self->const_count; i++) {
         TRACE_PRINTF(("PackFile_ConstTable_unpack(): Unpacking constant %ld/%ld\n",
             i, self->const_count));
-
-#if EXEC_CAPABLE
-        if (Parrot_exec_run)
-            self->constants[i] = &exec_const_table[i];
-        else
-#endif
-            self->constants[i] = PackFile_Constant_new(interp);
+        self->constants[i] = PackFile_Constant_new(interp);
 
         cursor = PackFile_Constant_unpack(interp, self, self->constants[i],
                     cursor);


More information about the parrot-commits mailing list