[svn:parrot] r41285 - in branches/kill_jit: compilers/imcc compilers/pirc/src src

darbelo at svn.parrot.org darbelo at svn.parrot.org
Tue Sep 15 23:48:37 UTC 2009


Author: darbelo
Date: Tue Sep 15 23:48:36 2009
New Revision: 41285
URL: https://trac.parrot.org/parrot/changeset/41285

Log:
HAS_JIT doesn't exist anymore. Remove dead code.

Modified:
   branches/kill_jit/compilers/imcc/pbc.c
   branches/kill_jit/compilers/imcc/pbc.h
   branches/kill_jit/compilers/pirc/src/bcgen.c
   branches/kill_jit/src/packfile.c
   branches/kill_jit/src/pic.c

Modified: branches/kill_jit/compilers/imcc/pbc.c
==============================================================================
--- branches/kill_jit/compilers/imcc/pbc.c	Tue Sep 15 23:09:10 2009	(r41284)
+++ branches/kill_jit/compilers/imcc/pbc.c	Tue Sep 15 23:48:36 2009	(r41285)
@@ -179,10 +179,6 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-PARROT_WARN_UNUSED_RESULT
-static int old_blocks(PARROT_INTERP)
-        __attribute__nonnull__(1);
-
 static void store_fixup(PARROT_INTERP,
     ARGIN(const SymReg *r),
     int pc,
@@ -270,8 +266,6 @@
 #define ASSERT_ARGS_mk_multi_sig __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(r)
-#define ASSERT_ARGS_old_blocks __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_store_fixup __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(r)
@@ -287,14 +281,6 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
 
-#ifdef HAS_JIT
-
-PARROT_WARN_UNUSED_RESULT
-static int old_blocks(PARROT_INTERP)
-        __attribute__nonnull__(1);
-
-#endif /* HAS_JIT */
-
 /*
 
 =item C<static void imcc_globals_destroy(PARROT_INTERP, int ex, void *param)>
@@ -482,84 +468,6 @@
     return 0;
 }
 
-
-#ifdef HAS_JIT
-
-/*
-
-=item C<static int old_blocks(PARROT_INTERP)>
-
-Gets the size/line of bytecode in ops at this point.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static int
-old_blocks(PARROT_INTERP)
-{
-    ASSERT_ARGS(old_blocks)
-    const  subs_t *s;
-    size_t         size = 0;
-
-    for (s = IMCC_INFO(interp)->globals->cs->subs; s; s = s->prev) {
-        size += s->n_basic_blocks;
-    }
-
-    return size;
-}
-
-
-/*
-
-=item C<opcode_t * make_jit_info(PARROT_INTERP, const IMC_Unit *unit)>
-
-Creates JIT information for this compilation unit.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-opcode_t *
-make_jit_info(PARROT_INTERP, ARGIN(const IMC_Unit *unit))
-{
-    ASSERT_ARGS(make_jit_info)
-    const size_t old  = old_blocks(interp);
-    const size_t size = unit->n_basic_blocks + old;
-
-    if (!IMCC_INFO(interp)->globals->cs->jit_info) {
-        const size_t len  = strlen(IMCC_INFO(interp)->globals->cs->seg->base.name) + 5;
-        char * const name = mem_allocate_n_typed(len, char);
-
-        snprintf(name, len, "%s_JIT",
-            IMCC_INFO(interp)->globals->cs->seg->base.name);
-
-        IMCC_INFO(interp)->globals->cs->jit_info =
-                PackFile_Segment_new_seg(interp,
-                    interp->code->base.dir, PF_UNKNOWN_SEG, name, 1);
-
-        mem_sys_free(name);
-    }
-
-    /* store current size */
-    IMCC_INFO(interp)->globals->cs->subs->n_basic_blocks = unit->n_basic_blocks;
-
-    /* offset of block start and end, 4 * registers_used */
-    IMCC_INFO(interp)->globals->cs->jit_info->data =
-        mem_realloc_n_typed(IMCC_INFO(interp)->globals->cs->jit_info->data,
-            size * 4, opcode_t);
-
-    IMCC_INFO(interp)->globals->cs->jit_info->size = size * 4;
-
-    return IMCC_INFO(interp)->globals->cs->jit_info->data + old * 4;
-}
-
-#endif /* HAS_JIT */
-
-
 /*
 
 =item C<static void make_new_sub(PARROT_INTERP, IMC_Unit *unit)>

Modified: branches/kill_jit/compilers/imcc/pbc.h
==============================================================================
--- branches/kill_jit/compilers/imcc/pbc.h	Tue Sep 15 23:09:10 2009	(r41284)
+++ branches/kill_jit/compilers/imcc/pbc.h	Tue Sep 15 23:48:36 2009	(r41285)
@@ -48,12 +48,6 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-opcode_t * make_jit_info(PARROT_INTERP, ARGIN(const IMC_Unit *unit))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
 #define ASSERT_ARGS_e_pbc_close __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_e_pbc_emit __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -77,9 +71,6 @@
 #define ASSERT_ARGS_IMCC_string_from_reg __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(r)
-#define ASSERT_ARGS_make_jit_info __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(unit)
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: compilers/imcc/pbc.c */
 

Modified: branches/kill_jit/compilers/pirc/src/bcgen.c
==============================================================================
--- branches/kill_jit/compilers/pirc/src/bcgen.c	Tue Sep 15 23:09:10 2009	(r41284)
+++ branches/kill_jit/compilers/pirc/src/bcgen.c	Tue Sep 15 23:48:36 2009	(r41285)
@@ -1060,58 +1060,6 @@
     return pmc_new(bc->interp, type);
 }
 
-
-#if 0
-
-/*
-
-=item C<opcode_t * make_jit_info(PARROT_INTERP, const struct _IMC_Unit *unit)>
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-opcode_t *
-make_jit_info(PARROT_INTERP, ARGIN(const struct _IMC_Unit *unit))
-{
-    ASSERT_ARGS(make_jit_info)
-    const size_t old  = old_blocks(interp);
-    const size_t size = unit->n_basic_blocks + old;
-
-    if (!IMCC_INFO(interp)->globals->cs->jit_info) {
-        const size_t len  =
-            strlen(IMCC_INFO(interp)->globals->cs->seg->base.name) + 5;
-        char * const name = mem_allocate_n_typed(len, char);
-
-        snprintf(name, len, "%s_JIT",
-            IMCC_INFO(interp)->globals->cs->seg->base.name);
-
-        IMCC_INFO(interp)->globals->cs->jit_info =
-                PackFile_Segment_new_seg(interp,
-                    interp->code->base.dir, PF_UNKNOWN_SEG, name, 1);
-
-        mem_sys_free(name);
-    }
-
-    /* store current size */
-    IMCC_INFO(interp)->globals->cs->subs->n_basic_blocks = unit->n_basic_blocks;
-
-    /* offset of block start and end, 4 * registers_used */
-    IMCC_INFO(interp)->globals->cs->jit_info->data =
-        mem_realloc_n_typed(IMCC_INFO(interp)->globals->cs->jit_info->data,
-            size * 4, opcode_t);
-
-    IMCC_INFO(interp)->globals->cs->jit_info->size = size * 4;
-
-    return IMCC_INFO(interp)->globals->cs->jit_info->data + old * 4;
-}
-
-#endif /* HAS_JIT */
-
-
-
 /*
 
 =item C<int add_sub_pmc(bytecode * const bc, sub_info * const info, int needlex,

Modified: branches/kill_jit/src/packfile.c
==============================================================================
--- branches/kill_jit/src/packfile.c	Tue Sep 15 23:09:10 2009	(r41284)
+++ branches/kill_jit/src/packfile.c	Tue Sep 15 23:48:36 2009	(r41285)
@@ -2569,9 +2569,6 @@
     ASSERT_ARGS(byte_code_destroy)
     PackFile_ByteCode * const byte_code = (PackFile_ByteCode *)self;
 
-#ifdef HAS_JIT
-    Parrot_destroy_jit(byte_code->jit_info);
-#endif
     parrot_PIC_destroy(byte_code);
     if (byte_code->prederef.code) {
         Parrot_free_memalign(byte_code->prederef.code);

Modified: branches/kill_jit/src/pic.c
==============================================================================
--- branches/kill_jit/src/pic.c	Tue Sep 15 23:09:10 2009	(r41284)
+++ branches/kill_jit/src/pic.c	Tue Sep 15 23:48:36 2009	(r41285)
@@ -85,11 +85,6 @@
 #  include "parrot/oplib/core_ops_cgp.h"
 #endif
 
-#ifdef HAS_JIT
-#  include "parrot/exec.h"
-#  include "jit.h"
-#endif
-
 /* needs a Makefile dependency */
 /* #include "pmc/pmc_integer.h" */
 


More information about the parrot-commits mailing list