[svn:parrot] r41294 - in trunk: . compilers/imcc config/gen/makefiles include/parrot src src/interp src/ops src/pmc src/runcore t/tools

bacek at svn.parrot.org bacek at svn.parrot.org
Wed Sep 16 13:26:05 UTC 2009


Author: bacek
Date: Wed Sep 16 13:25:57 2009
New Revision: 41294
URL: https://trac.parrot.org/parrot/changeset/41294

Log:
Merge branch kill_pic back to trunk.

Deleted:
   trunk/include/parrot/pic.h
   trunk/src/ops/pic.ops
   trunk/src/pic.c
   trunk/src/pic_jit.c
Modified:
   trunk/DEPRECATED.pod
   trunk/MANIFEST
   trunk/PBC_COMPAT
   trunk/compilers/imcc/imc.h
   trunk/compilers/imcc/pbc.c
   trunk/config/gen/makefiles/root.in
   trunk/include/parrot/packfile.h
   trunk/include/parrot/parrot.h
   trunk/src/interp/inter_misc.c
   trunk/src/jit.c
   trunk/src/ops/ops.num
   trunk/src/packfile.c
   trunk/src/parrot_debugger.c
   trunk/src/pbc_merge.c
   trunk/src/pmc/eval.pmc
   trunk/src/runcore/cores.c
   trunk/src/runcore/main.c
   trunk/t/tools/pbc_dump.t

Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/DEPRECATED.pod	Wed Sep 16 13:25:57 2009	(r41294)
@@ -153,14 +153,6 @@
 
 L<http://rt.perl.org/rt3/Ticket/Display.html?id=60626>
 
-=item src/pic.c and src/pic_jit.c [eligible in 1.1]
-
-These two files were a thin prototype implementation of Polymorphic Inline
-Caching that only ever applied to 4 opcodes, one of which has now been removed.
-The files (and all functions in them) are deprecated, and will be removed.
-
-L<http://rt.perl.org/rt3/Ticket/Display.html?id=60048>
-
 =item Subs marked with C<:vtable>/C<:method> aren't in namespace [eligible in 1.1]
 
 Subs marked with C<:vtable> or C<:method> flags are no longer given a

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/MANIFEST	Wed Sep 16 13:25:57 2009	(r41294)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Sep 13 02:24:50 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Sep 16 06:03:11 2009 UT
 #
 # See below for documentation on the format of this file.
 #
@@ -996,7 +996,6 @@
 include/parrot/oplib.h                                      [main]include
 include/parrot/packfile.h                                   [main]include
 include/parrot/parrot.h                                     [main]include
-include/parrot/pic.h                                        [main]include
 include/parrot/pmc.h                                        [main]include
 include/parrot/pmc_freeze.h                                 [main]include
 include/parrot/pobj.h                                       [main]include
@@ -1373,7 +1372,6 @@
 src/ops/object.ops                                          []
 src/ops/ops.num                                             [devel]src
 src/ops/ops.skip                                            []
-src/ops/pic.ops                                             []
 src/ops/pmc.ops                                             []
 src/ops/set.ops                                             []
 src/ops/string.ops                                          []
@@ -1387,8 +1385,6 @@
 src/pbc_disassemble.c                                       []
 src/pbc_dump.c                                              []
 src/pbc_merge.c                                             []
-src/pic.c                                                   []
-src/pic_jit.c                                               []
 src/pmc.c                                                   []
 src/pmc/addrregistry.pmc                                    [devel]src
 src/pmc/array.pmc                                           [devel]src

Modified: trunk/PBC_COMPAT
==============================================================================
--- trunk/PBC_COMPAT	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/PBC_COMPAT	Wed Sep 16 13:25:57 2009	(r41294)
@@ -27,6 +27,7 @@
 
 # please insert tab separated entries at the top of the list
 
+5.2	2009.09.16	darbelo	remove pic.ops
 5.2	2009.08.06	dukeleto	remove Random PMC
 5.1	2009.08.06	cotto	remove branch_cs opcode 
 5.0	2009.07.21	cotto	released 1.4.0 

Modified: trunk/compilers/imcc/imc.h
==============================================================================
--- trunk/compilers/imcc/imc.h	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/compilers/imcc/imc.h	Wed Sep 16 13:25:57 2009	(r41294)
@@ -573,7 +573,6 @@
     struct code_segment_t *prev;          /* previous code segment */
     struct code_segment_t *next;          /* next code segment */
     SymHash                key_consts;    /* this seg's cached key constants */
-    int                    pic_idx;       /* next index of PIC */
 } code_segment_t;
 
 typedef struct _imcc_globals_t {

Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/compilers/imcc/pbc.c	Wed Sep 16 13:25:57 2009	(r41294)
@@ -2110,24 +2110,14 @@
         constant_folding(interp, unit);
         store_sub_size(interp, code_size, ins_size);
 
-        /*
-         * allocate code and pic_index
-         *
-         * pic_index is half the size of the code, as one PIC-cacheable opcode
-         * is at least two opcodes wide - see below how to further decrease
-         * this storage
-         */
+        /* allocate code */
         interp->code->base.data       = (opcode_t *)
             mem_sys_realloc(interp->code->base.data, bytes);
 
         /* reallocating this removes its mmaped-ness; needs encapsulation */
         interp->code->base.pf->is_mmap_ped = 0;
 
-        interp->code->pic_index->data = (opcode_t *)
-            mem_sys_realloc(interp->code->pic_index->data, bytes / 2);
-
         interp->code->base.size       = oldsize + code_size;
-        interp->code->pic_index->size = (oldsize + code_size) / 2;
 
         IMCC_INFO(interp)->pc  = (opcode_t *)interp->code->base.data + oldsize;
         IMCC_INFO(interp)->npc = 0;
@@ -2252,21 +2242,6 @@
 
         op = (opcode_t)ins->opnum;
 
-        /* add PIC idx */
-        if (parrot_PIC_op_is_cached(op)) {
-            const size_t offs = IMCC_INFO(interp)->pc - interp->code->base.data;
-            /*
-             * for pic_idx fitting into a short, we could
-             * further reduce the size by storing shorts
-             * the relation code_size / pic_index_size could
-             * indicate the used storage
-             *
-             * drawback: if we reach 0xffff, we'd have to resize again
-             */
-            interp->code->pic_index->data[offs / 2] =
-                ++IMCC_INFO(interp)->globals->cs->pic_idx;
-        }
-
         /* Start generating the bytecode */
         *(IMCC_INFO(interp)->pc)++   = op;
 

Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/config/gen/makefiles/root.in	Wed Sep 16 13:25:57 2009	(r41294)
@@ -452,8 +452,6 @@
     $(SRC_DIR)/oo$(O) \
     $(SRC_DIR)/packfile$(O) \
     $(SRC_DIR)/packout$(O) \
-    $(SRC_DIR)/pic_jit$(O) \
-    $(SRC_DIR)/pic$(O) \
     $(SRC_DIR)/platform$(O) \
     $(SRC_DIR)/pmc_freeze$(O) \
     $(SRC_DIR)/pmc$(O) \
@@ -1191,11 +1189,6 @@
 
 $(SRC_DIR)/main$(O) : $(SRC_DIR)/main.c $(GENERAL_H_FILES)
 
-$(SRC_DIR)/pic$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/pmc/pmc_fixedintegerarray.h \
-	$(SRC_DIR)/pmc/pmc_continuation.h
-
-$(SRC_DIR)/pic_jit$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/pmc/pmc_sub.h
-
 $(SRC_DIR)/multidispatch$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/multidispatch.str \
 	$(SRC_DIR)/pmc/pmc_nci.h $(SRC_DIR)/pmc/pmc_sub.h
 
@@ -1256,8 +1249,6 @@
 $(OPS_DIR)/core_ops$(O) : $(GENERAL_H_FILES) $(OPS_DIR)/core_ops.c \
 	$(SRC_DIR)/pmc/pmc_continuation.h $(SRC_DIR)/pmc/pmc_parrotlibrary.h
 
-$(OPS_DIR)/pic.ops : $(SRC_DIR)/pmc/pmc_fixedintegerarray.h
-
 # core_ops depends upon config.h so that it gets updated along with
 # updates to config.h's version numbers
 

Modified: trunk/include/parrot/packfile.h
==============================================================================
--- trunk/include/parrot/packfile.h	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/include/parrot/packfile.h	Wed Sep 16 13:25:57 2009	(r41294)
@@ -266,8 +266,6 @@
     PackFile_Segment       base;
     Prederef               prederef;    /* The predereferenced code and info */
     struct Parrot_jit_info_t     *jit_info;    /* JITs data */
-    Parrot_PIC_store      *pic_store;   /* PIC storage */
-    PackFile_Segment      *pic_index;   /* segment of indices into store */
     struct PackFile_Debug *debugs;
     PackFile_ConstTable   *const_table;
     PackFile_FixupTable   *fixups;

Modified: trunk/include/parrot/parrot.h
==============================================================================
--- trunk/include/parrot/parrot.h	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/include/parrot/parrot.h	Wed Sep 16 13:25:57 2009	(r41294)
@@ -271,7 +271,6 @@
 #include "parrot/exceptions.h"
 #include "parrot/warnings.h"
 #include "parrot/memory.h"
-#include "parrot/pic.h"
 #include "parrot/packfile.h"
 #include "parrot/io.h"
 #include "parrot/op.h"

Deleted: trunk/include/parrot/pic.h
==============================================================================
--- trunk/include/parrot/pic.h	Wed Sep 16 13:25:57 2009	(r41293)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,204 +0,0 @@
-/* pic.h
- *  Copyright (C) 2005, Parrot Foundation.
- *  SVN Info
- *     $Id$
- *  Overview:
- *     This is the api header for the pic subsystem
- *  Data Structure and Algorithms:
- *  History:
- *  Notes:
- *  References:
- */
-
-#ifndef PARROT_PIC_H_GUARD
-#define PARROT_PIC_H_GUARD
-
-#include "parrot/runcore_api.h"
-
-/*
- * one cache slot
- *
- * if types exceed 16 bits or for general MMD function calls an
- * extended cache slot is needed with more type entries
- */
-typedef struct Parrot_pic_lru_t {
-    union {
-        INTVAL type;                    /* for MMD left << 16 | right type */
-        PMC *signature;                 /* arg passing signature */
-    } u;
-    union {
-        funcptr_t real_function;        /* the actual C code */
-        PMC *sub;                       /* or a Sub PMC */
-        PMC **pattr;                    /* attribute location */
-    } f;
-} Parrot_PIC_lru;
-
-/*
- * PIC 3 more cache slots
- */
-typedef struct Parrot_pic_t {
-    Parrot_PIC_lru lru[3];              /* PIC - three more cache entries */
-    INTVAL miss_count;                  /* how many misses */
-} Parrot_PIC;
-
-/*
- * the main used MIC one cache slot - 4 words size
- */
-typedef struct Parrot_mic_t {
-    Parrot_PIC_lru lru;                 /* MIC - one cache */
-    union {
-        STRING *method;                 /* for callmethod */
-        INTVAL func_nr;                 /* MMD function number */
-        STRING *attribute;              /* obj.attribute */
-        PMC *sig;                       /* arg passing */
-    } m;
-    Parrot_PIC *pic;                    /* more cache entries */
-} Parrot_MIC;
-
-/*
- * memory is managed by this structure hanging off a
- * PackFile_ByteCode segment
- */
-typedef struct Parrot_pic_store_t {
-    struct Parrot_pic_store_t *prev;    /* prev pic_store */
-    size_t usable;                      /* size of usable memory: */
-    Parrot_PIC *pic;                    /* from rear */
-    Parrot_MIC *mic;                    /* idx access to allocated MICs */
-    size_t n_mics;                      /* range check, debugging mainly */
-} Parrot_PIC_store;
-
-typedef int (*arg_pass_f)(PARROT_INTERP, PMC *sig,
-            char *src_base, void **src_pc, char *dest_base, void **dest_pc);
-
-/* more or less private interfaces */
-
-/* HEADERIZER BEGIN: src/pic.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-Parrot_MIC* parrot_PIC_alloc_mic(const PARROT_INTERP, size_t n);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-Parrot_PIC* parrot_PIC_alloc_pic(PARROT_INTERP)
-        __attribute__nonnull__(1);
-
-void parrot_PIC_alloc_store(ARGOUT(PackFile_ByteCode *cs), size_t n)
-        __attribute__nonnull__(1)
-        FUNC_MODIFIES(*cs);
-
-PARROT_WARN_UNUSED_RESULT
-int parrot_pic_check_sig(PARROT_INTERP,
-    ARGIN(PMC *sig1),
-    ARGIN(PMC *sig2),
-    ARGOUT(int *type))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        FUNC_MODIFIES(*type);
-
-void parrot_PIC_destroy(ARGMOD(PackFile_ByteCode *cs))
-        __attribute__nonnull__(1)
-        FUNC_MODIFIES(*cs);
-
-void parrot_pic_find_infix_v_pp(PARROT_INTERP,
-    ARGIN(PMC *left),
-    ARGIN(PMC *right),
-    ARGOUT(Parrot_MIC *mic),
-    ARGOUT(opcode_t *cur_opcode))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        FUNC_MODIFIES(*mic)
-        FUNC_MODIFIES(*cur_opcode);
-
-PARROT_CONST_FUNCTION
-int parrot_PIC_op_is_cached(int op_code);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void * parrot_pic_opcode(PARROT_INTERP, INTVAL op)
-        __attribute__nonnull__(1);
-
-void parrot_PIC_prederef(PARROT_INTERP,
-    opcode_t op,
-    ARGOUT(void **pc_pred),
-    ARGIN(Parrot_runcore_t *core))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        FUNC_MODIFIES(*pc_pred);
-
-#define ASSERT_ARGS_parrot_PIC_alloc_mic __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
-#define ASSERT_ARGS_parrot_PIC_alloc_pic __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_parrot_PIC_alloc_store __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(cs)
-#define ASSERT_ARGS_parrot_pic_check_sig __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sig1) \
-    || PARROT_ASSERT_ARG(sig2) \
-    || PARROT_ASSERT_ARG(type)
-#define ASSERT_ARGS_parrot_PIC_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(cs)
-#define ASSERT_ARGS_parrot_pic_find_infix_v_pp __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(left) \
-    || PARROT_ASSERT_ARG(right) \
-    || PARROT_ASSERT_ARG(mic) \
-    || PARROT_ASSERT_ARG(cur_opcode)
-#define ASSERT_ARGS_parrot_PIC_op_is_cached __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
-#define ASSERT_ARGS_parrot_pic_opcode __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_parrot_PIC_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(pc_pred) \
-    || PARROT_ASSERT_ARG(core)
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-/* HEADERIZER END: src/pic.c */
-
-
-/* HEADERIZER BEGIN: src/pic_jit.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-
-PARROT_WARN_UNUSED_RESULT
-int parrot_pic_is_safe_to_jit(PARROT_INTERP,
-    ARGIN(PMC *sub_pmc),
-    ARGIN(PMC *sig_args),
-    ARGIN(PMC *sig_results),
-    ARGOUT(int *flags))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        FUNC_MODIFIES(*flags);
-
-funcptr_t parrot_pic_JIT_sub(PARROT_INTERP, ARGIN(PMC *sub_pmc), int flags)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_parrot_pic_is_safe_to_jit __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sub_pmc) \
-    || PARROT_ASSERT_ARG(sig_args) \
-    || PARROT_ASSERT_ARG(sig_results) \
-    || PARROT_ASSERT_ARG(flags)
-#define ASSERT_ARGS_parrot_pic_JIT_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sub_pmc)
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-/* HEADERIZER END: src/pic_jit.c */
-
-#endif /* PARROT_PIC_H_GUARD */
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Modified: trunk/src/interp/inter_misc.c
==============================================================================
--- trunk/src/interp/inter_misc.c	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/interp/inter_misc.c	Wed Sep 16 13:25:57 2009	(r41294)
@@ -22,6 +22,7 @@
 #include "parrot/parrot.h"
 #include "inter_misc.str"
 #include "../compilers/imcc/imc.h"
+#include "parrot/runcore_api.h"
 
 #include "parrot/has_header.h"
 

Modified: trunk/src/jit.c
==============================================================================
--- trunk/src/jit.c	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/jit.c	Wed Sep 16 13:25:57 2009	(r41294)
@@ -1628,7 +1628,9 @@
                 PARROT_ASSERT(*cur_op == PARROT_OP_get_results_pc);
 
                 /* now emit the call - use special op for this */
-                (op_func[PARROT_OP_pic_callr___pc].fn)(jit_info, interp);
+                /* Don't want to fix it. JIT on chopping block.
+                 * (op_func[PARROT_OP_pic_callr___pc].fn)(jit_info, interp);
+                 */
 
                 /* and the get_results */
                 (op_func[*cur_op].fn)(jit_info, interp);

Modified: trunk/src/ops/ops.num
==============================================================================
--- trunk/src/ops/ops.num	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/ops/ops.num	Wed Sep 16 13:25:57 2009	(r41294)
@@ -803,479 +803,474 @@
 inspect_p_pc_s                  779
 inspect_p_p_sc                  780
 inspect_p_pc_sc                 781
-pic_infix___ic_p_p              782
-pic_inline_sub___ic_p_p         783
-pic_get_params___pc             784
-pic_set_returns___pc            785
-pic_callr___pc                  786
-new_p_s                         787
-new_p_sc                        788
-new_p_s_p                       789
-new_p_sc_p                      790
-new_p_s_pc                      791
-new_p_sc_pc                     792
-new_p_p                         793
-new_p_pc                        794
-new_p_p_p                       795
-new_p_pc_p                      796
-new_p_p_pc                      797
-new_p_pc_pc                     798
-root_new_p_p                    799
-root_new_p_pc                   800
-root_new_p_p_p                  801
-root_new_p_pc_p                 802
-root_new_p_p_pc                 803
-root_new_p_pc_pc                804
-typeof_s_p                      805
-typeof_p_p                      806
-get_repr_s_p                    807
-find_method_p_p_s               808
-find_method_p_p_sc              809
-defined_i_p                     810
-defined_i_p_ki                  811
-defined_i_p_kic                 812
-defined_i_p_k                   813
-defined_i_p_kc                  814
-exists_i_p_ki                   815
-exists_i_p_kic                  816
-exists_i_p_k                    817
-exists_i_p_kc                   818
-delete_p_k                      819
-delete_p_kc                     820
-delete_p_ki                     821
-delete_p_kic                    822
-elements_i_p                    823
-push_p_i                        824
-push_p_ic                       825
-push_p_n                        826
-push_p_nc                       827
-push_p_s                        828
-push_p_sc                       829
-push_p_p                        830
-pop_i_p                         831
-pop_n_p                         832
-pop_s_p                         833
-pop_p_p                         834
-unshift_p_i                     835
-unshift_p_ic                    836
-unshift_p_n                     837
-unshift_p_nc                    838
-unshift_p_s                     839
-unshift_p_sc                    840
-unshift_p_p                     841
-shift_i_p                       842
-shift_n_p                       843
-shift_s_p                       844
-shift_p_p                       845
-splice_p_p_i_i                  846
-splice_p_p_ic_i                 847
-splice_p_p_i_ic                 848
-splice_p_p_ic_ic                849
-setprop_p_s_p                   850
-setprop_p_sc_p                  851
-getprop_p_s_p                   852
-getprop_p_sc_p                  853
-delprop_p_s                     854
-delprop_p_sc                    855
-prophash_p_p                    856
-freeze_s_p                      857
-thaw_p_s                        858
-thaw_p_sc                       859
-add_multi_s_s_p                 860
-add_multi_sc_s_p                861
-add_multi_s_sc_p                862
-add_multi_sc_sc_p               863
-find_multi_p_s_s                864
-find_multi_p_sc_s               865
-find_multi_p_s_sc               866
-find_multi_p_sc_sc              867
-register_p                      868
-unregister_p                    869
-box_p_i                         870
-box_p_ic                        871
-box_p_n                         872
-box_p_nc                        873
-box_p_s                         874
-box_p_sc                        875
-iter_p_p                        876
-morph_p_p                       877
-morph_p_pc                      878
-clone_s_s                       879
-clone_s_sc                      880
-exchange_i_i                    881
-exchange_p_p                    882
-exchange_n_n                    883
-exchange_s_s                    884
-set_i_i                         885
-set_i_ic                        886
-set_i_n                         887
-set_i_nc                        888
-set_i_s                         889
-set_i_sc                        890
-set_n_n                         891
-set_n_nc                        892
-set_n_i                         893
-set_n_ic                        894
-set_n_s                         895
-set_n_sc                        896
-set_n_p                         897
-set_s_p                         898
-set_s_s                         899
-set_s_sc                        900
-set_s_i                         901
-set_s_ic                        902
-set_s_n                         903
-set_s_nc                        904
-set_p_pc                        905
-set_p_p                         906
-set_p_i                         907
-set_p_ic                        908
-set_p_n                         909
-set_p_nc                        910
-set_p_s                         911
-set_p_sc                        912
-set_i_p                         913
-assign_p_p                      914
-assign_p_i                      915
-assign_p_ic                     916
-assign_p_n                      917
-assign_p_nc                     918
-assign_p_s                      919
-assign_p_sc                     920
-assign_s_s                      921
-assign_s_sc                     922
-setref_p_p                      923
-deref_p_p                       924
-setp_ind_i_p                    925
-setp_ind_ic_p                   926
-setn_ind_i_n                    927
-setn_ind_ic_n                   928
-setn_ind_i_nc                   929
-setn_ind_ic_nc                  930
-sets_ind_i_s                    931
-sets_ind_ic_s                   932
-sets_ind_i_sc                   933
-sets_ind_ic_sc                  934
-seti_ind_i_i                    935
-seti_ind_ic_i                   936
-seti_ind_i_ic                   937
-seti_ind_ic_ic                  938
-set_p_ki_i                      939
-set_p_kic_i                     940
-set_p_ki_ic                     941
-set_p_kic_ic                    942
-set_p_ki_n                      943
-set_p_kic_n                     944
-set_p_ki_nc                     945
-set_p_kic_nc                    946
-set_p_ki_s                      947
-set_p_kic_s                     948
-set_p_ki_sc                     949
-set_p_kic_sc                    950
-set_p_ki_p                      951
-set_p_kic_p                     952
-set_i_p_ki                      953
-set_i_p_kic                     954
-set_n_p_ki                      955
-set_n_p_kic                     956
-set_s_p_ki                      957
-set_s_p_kic                     958
-set_p_p_ki                      959
-set_p_p_kic                     960
-set_p_k_i                       961
-set_p_kc_i                      962
-set_p_k_ic                      963
-set_p_kc_ic                     964
-set_p_k_n                       965
-set_p_kc_n                      966
-set_p_k_nc                      967
-set_p_kc_nc                     968
-set_p_k_s                       969
-set_p_kc_s                      970
-set_p_k_sc                      971
-set_p_kc_sc                     972
-set_p_k_p                       973
-set_p_kc_p                      974
-set_i_p_k                       975
-set_i_p_kc                      976
-set_n_p_k                       977
-set_n_p_kc                      978
-set_s_p_k                       979
-set_s_p_kc                      980
-set_p_p_k                       981
-set_p_p_kc                      982
-clone_p_p                       983
-clone_p_p_p                     984
-clone_p_p_pc                    985
-copy_p_p                        986
-null_s                          987
-null_i                          988
-null_p                          989
-null_n                          990
-cleari                          991
-clearn                          992
-clears                          993
-clearp                          994
-ord_i_s                         995
-ord_i_sc                        996
-ord_i_s_i                       997
-ord_i_sc_i                      998
-ord_i_s_ic                      999
-ord_i_sc_ic                    1000
-chr_s_i                        1001
-chr_s_ic                       1002
-chopn_s_i                      1003
-chopn_s_ic                     1004
-chopn_s_s_i                    1005
-chopn_s_sc_i                   1006
-chopn_s_s_ic                   1007
-chopn_s_sc_ic                  1008
-concat_s_s                     1009
-concat_s_sc                    1010
-concat_p_p                     1011
-concat_p_s                     1012
-concat_p_sc                    1013
-concat_s_s_s                   1014
-concat_s_sc_s                  1015
-concat_s_s_sc                  1016
-concat_p_p_s                   1017
-concat_p_p_sc                  1018
-concat_p_p_p                   1019
-repeat_s_s_i                   1020
-repeat_s_sc_i                  1021
-repeat_s_s_ic                  1022
-repeat_s_sc_ic                 1023
-repeat_p_p_i                   1024
-repeat_p_p_ic                  1025
-repeat_p_p_p                   1026
-repeat_p_i                     1027
-repeat_p_ic                    1028
-repeat_p_p                     1029
-length_i_s                     1030
-length_i_sc                    1031
-bytelength_i_s                 1032
-bytelength_i_sc                1033
-pin_s                          1034
-unpin_s                        1035
-substr_s_s_i                   1036
-substr_s_sc_i                  1037
-substr_s_s_ic                  1038
-substr_s_sc_ic                 1039
-substr_s_s_i_i                 1040
-substr_s_sc_i_i                1041
-substr_s_s_ic_i                1042
-substr_s_sc_ic_i               1043
-substr_s_s_i_ic                1044
-substr_s_sc_i_ic               1045
-substr_s_s_ic_ic               1046
-substr_s_sc_ic_ic              1047
-substr_s_s_i_i_s               1048
-substr_s_s_ic_i_s              1049
-substr_s_s_i_ic_s              1050
-substr_s_s_ic_ic_s             1051
-substr_s_s_i_i_sc              1052
-substr_s_s_ic_i_sc             1053
-substr_s_s_i_ic_sc             1054
-substr_s_s_ic_ic_sc            1055
-substr_s_i_i_s                 1056
-substr_s_ic_i_s                1057
-substr_s_i_ic_s                1058
-substr_s_ic_ic_s               1059
-substr_s_i_i_sc                1060
-substr_s_ic_i_sc               1061
-substr_s_i_ic_sc               1062
-substr_s_ic_ic_sc              1063
-substr_s_p_i_i                 1064
-substr_s_p_ic_i                1065
-substr_s_p_i_ic                1066
-substr_s_p_ic_ic               1067
-index_i_s_s                    1068
-index_i_sc_s                   1069
-index_i_s_sc                   1070
-index_i_sc_sc                  1071
-index_i_s_s_i                  1072
-index_i_sc_s_i                 1073
-index_i_s_sc_i                 1074
-index_i_sc_sc_i                1075
-index_i_s_s_ic                 1076
-index_i_sc_s_ic                1077
-index_i_s_sc_ic                1078
-index_i_sc_sc_ic               1079
-sprintf_s_s_p                  1080
-sprintf_s_sc_p                 1081
-sprintf_p_p_p                  1082
-new_s                          1083
-new_s_i                        1084
-new_s_ic                       1085
-stringinfo_i_s_i               1086
-stringinfo_i_sc_i              1087
-stringinfo_i_s_ic              1088
-stringinfo_i_sc_ic             1089
-upcase_s_s                     1090
-upcase_s_sc                    1091
-upcase_s                       1092
-downcase_s_s                   1093
-downcase_s_sc                  1094
-downcase_s                     1095
-titlecase_s_s                  1096
-titlecase_s_sc                 1097
-titlecase_s                    1098
-join_s_s_p                     1099
-join_s_sc_p                    1100
-split_p_s_s                    1101
-split_p_sc_s                   1102
-split_p_s_sc                   1103
-split_p_sc_sc                  1104
-charset_i_s                    1105
-charset_i_sc                   1106
-charsetname_s_i                1107
-charsetname_s_ic               1108
-find_charset_i_s               1109
-find_charset_i_sc              1110
-trans_charset_s_i              1111
-trans_charset_s_ic             1112
-trans_charset_s_s_i            1113
-trans_charset_s_sc_i           1114
-trans_charset_s_s_ic           1115
-trans_charset_s_sc_ic          1116
-encoding_i_s                   1117
-encoding_i_sc                  1118
-encodingname_s_i               1119
-encodingname_s_ic              1120
-find_encoding_i_s              1121
-find_encoding_i_sc             1122
-trans_encoding_s_i             1123
-trans_encoding_s_ic            1124
-trans_encoding_s_s_i           1125
-trans_encoding_s_sc_i          1126
-trans_encoding_s_s_ic          1127
-trans_encoding_s_sc_ic         1128
-is_cclass_i_i_s_i              1129
-is_cclass_i_ic_s_i             1130
-is_cclass_i_i_sc_i             1131
-is_cclass_i_ic_sc_i            1132
-is_cclass_i_i_s_ic             1133
-is_cclass_i_ic_s_ic            1134
-is_cclass_i_i_sc_ic            1135
-is_cclass_i_ic_sc_ic           1136
-find_cclass_i_i_s_i_i          1137
-find_cclass_i_ic_s_i_i         1138
-find_cclass_i_i_sc_i_i         1139
-find_cclass_i_ic_sc_i_i        1140
-find_cclass_i_i_s_ic_i         1141
-find_cclass_i_ic_s_ic_i        1142
-find_cclass_i_i_sc_ic_i        1143
-find_cclass_i_ic_sc_ic_i       1144
-find_cclass_i_i_s_i_ic         1145
-find_cclass_i_ic_s_i_ic        1146
-find_cclass_i_i_sc_i_ic        1147
-find_cclass_i_ic_sc_i_ic       1148
-find_cclass_i_i_s_ic_ic        1149
-find_cclass_i_ic_s_ic_ic       1150
-find_cclass_i_i_sc_ic_ic       1151
-find_cclass_i_ic_sc_ic_ic      1152
-find_not_cclass_i_i_s_i_i      1153
-find_not_cclass_i_ic_s_i_i     1154
-find_not_cclass_i_i_sc_i_i     1155
-find_not_cclass_i_ic_sc_i_i    1156
-find_not_cclass_i_i_s_ic_i     1157
-find_not_cclass_i_ic_s_ic_i    1158
-find_not_cclass_i_i_sc_ic_i    1159
-find_not_cclass_i_ic_sc_ic_i   1160
-find_not_cclass_i_i_s_i_ic     1161
-find_not_cclass_i_ic_s_i_ic    1162
-find_not_cclass_i_i_sc_i_ic    1163
-find_not_cclass_i_ic_sc_i_ic   1164
-find_not_cclass_i_i_s_ic_ic    1165
-find_not_cclass_i_ic_s_ic_ic   1166
-find_not_cclass_i_i_sc_ic_ic   1167
-find_not_cclass_i_ic_sc_ic_ic  1168
-escape_s_s                     1169
-compose_s_s                    1170
-compose_s_sc                   1171
-spawnw_i_s                     1172
-spawnw_i_sc                    1173
-spawnw_i_p                     1174
-err_i                          1175
-err_s                          1176
-err_s_i                        1177
-err_s_ic                       1178
-time_i                         1179
-time_n                         1180
-gmtime_s_i                     1181
-gmtime_s_ic                    1182
-localtime_s_i                  1183
-localtime_s_ic                 1184
-decodetime_p_i                 1185
-decodetime_p_ic                1186
-decodelocaltime_p_i            1187
-decodelocaltime_p_ic           1188
-sysinfo_s_i                    1189
-sysinfo_s_ic                   1190
-sysinfo_i_i                    1191
-sysinfo_i_ic                   1192
-sleep_i                        1193
-sleep_ic                       1194
-sleep_n                        1195
-sleep_nc                       1196
-sizeof_i_i                     1197
-sizeof_i_ic                    1198
-store_lex_s_p                  1199
-store_lex_sc_p                 1200
-find_lex_p_s                   1201
-find_lex_p_sc                  1202
-find_caller_lex_p_s            1203
-find_caller_lex_p_sc           1204
-get_namespace_p                1205
-get_namespace_p_p              1206
-get_namespace_p_pc             1207
-get_hll_namespace_p            1208
-get_hll_namespace_p_p          1209
-get_hll_namespace_p_pc         1210
-get_root_namespace_p           1211
-get_root_namespace_p_p         1212
-get_root_namespace_p_pc        1213
-get_global_p_s                 1214
-get_global_p_sc                1215
-get_global_p_p_s               1216
-get_global_p_pc_s              1217
-get_global_p_p_sc              1218
-get_global_p_pc_sc             1219
-get_hll_global_p_s             1220
-get_hll_global_p_sc            1221
-get_hll_global_p_p_s           1222
-get_hll_global_p_pc_s          1223
-get_hll_global_p_p_sc          1224
-get_hll_global_p_pc_sc         1225
-get_root_global_p_s            1226
-get_root_global_p_sc           1227
-get_root_global_p_p_s          1228
-get_root_global_p_pc_s         1229
-get_root_global_p_p_sc         1230
-get_root_global_p_pc_sc        1231
-set_global_s_p                 1232
-set_global_sc_p                1233
-set_global_p_s_p               1234
-set_global_pc_s_p              1235
-set_global_p_sc_p              1236
-set_global_pc_sc_p             1237
-set_hll_global_s_p             1238
-set_hll_global_sc_p            1239
-set_hll_global_p_s_p           1240
-set_hll_global_pc_s_p          1241
-set_hll_global_p_sc_p          1242
-set_hll_global_pc_sc_p         1243
-set_root_global_s_p            1244
-set_root_global_sc_p           1245
-set_root_global_p_s_p          1246
-set_root_global_pc_s_p         1247
-set_root_global_p_sc_p         1248
-set_root_global_pc_sc_p        1249
-find_name_p_s                  1250
-find_name_p_sc                 1251
-find_sub_not_null_p_s          1252
-find_sub_not_null_p_sc         1253
-store_dynamic_lex_s_p          1254
-store_dynamic_lex_sc_p         1255
-find_dynamic_lex_p_s           1256
-find_dynamic_lex_p_sc          1257
+new_p_s                         782
+new_p_sc                        783
+new_p_s_p                       784
+new_p_sc_p                      785
+new_p_s_pc                      786
+new_p_sc_pc                     787
+new_p_p                         788
+new_p_pc                        789
+new_p_p_p                       790
+new_p_pc_p                      791
+new_p_p_pc                      792
+new_p_pc_pc                     793
+root_new_p_p                    794
+root_new_p_pc                   795
+root_new_p_p_p                  796
+root_new_p_pc_p                 797
+root_new_p_p_pc                 798
+root_new_p_pc_pc                799
+typeof_s_p                      800
+typeof_p_p                      801
+get_repr_s_p                    802
+find_method_p_p_s               803
+find_method_p_p_sc              804
+defined_i_p                     805
+defined_i_p_ki                  806
+defined_i_p_kic                 807
+defined_i_p_k                   808
+defined_i_p_kc                  809
+exists_i_p_ki                   810
+exists_i_p_kic                  811
+exists_i_p_k                    812
+exists_i_p_kc                   813
+delete_p_k                      814
+delete_p_kc                     815
+delete_p_ki                     816
+delete_p_kic                    817
+elements_i_p                    818
+push_p_i                        819
+push_p_ic                       820
+push_p_n                        821
+push_p_nc                       822
+push_p_s                        823
+push_p_sc                       824
+push_p_p                        825
+pop_i_p                         826
+pop_n_p                         827
+pop_s_p                         828
+pop_p_p                         829
+unshift_p_i                     830
+unshift_p_ic                    831
+unshift_p_n                     832
+unshift_p_nc                    833
+unshift_p_s                     834
+unshift_p_sc                    835
+unshift_p_p                     836
+shift_i_p                       837
+shift_n_p                       838
+shift_s_p                       839
+shift_p_p                       840
+splice_p_p_i_i                  841
+splice_p_p_ic_i                 842
+splice_p_p_i_ic                 843
+splice_p_p_ic_ic                844
+setprop_p_s_p                   845
+setprop_p_sc_p                  846
+getprop_p_s_p                   847
+getprop_p_sc_p                  848
+delprop_p_s                     849
+delprop_p_sc                    850
+prophash_p_p                    851
+freeze_s_p                      852
+thaw_p_s                        853
+thaw_p_sc                       854
+add_multi_s_s_p                 855
+add_multi_sc_s_p                856
+add_multi_s_sc_p                857
+add_multi_sc_sc_p               858
+find_multi_p_s_s                859
+find_multi_p_sc_s               860
+find_multi_p_s_sc               861
+find_multi_p_sc_sc              862
+register_p                      863
+unregister_p                    864
+box_p_i                         865
+box_p_ic                        866
+box_p_n                         867
+box_p_nc                        868
+box_p_s                         869
+box_p_sc                        870
+iter_p_p                        871
+morph_p_p                       872
+morph_p_pc                      873
+clone_s_s                       874
+clone_s_sc                      875
+exchange_i_i                    876
+exchange_p_p                    877
+exchange_n_n                    878
+exchange_s_s                    879
+set_i_i                         880
+set_i_ic                        881
+set_i_n                         882
+set_i_nc                        883
+set_i_s                         884
+set_i_sc                        885
+set_n_n                         886
+set_n_nc                        887
+set_n_i                         888
+set_n_ic                        889
+set_n_s                         890
+set_n_sc                        891
+set_n_p                         892
+set_s_p                         893
+set_s_s                         894
+set_s_sc                        895
+set_s_i                         896
+set_s_ic                        897
+set_s_n                         898
+set_s_nc                        899
+set_p_pc                        900
+set_p_p                         901
+set_p_i                         902
+set_p_ic                        903
+set_p_n                         904
+set_p_nc                        905
+set_p_s                         906
+set_p_sc                        907
+set_i_p                         908
+assign_p_p                      909
+assign_p_i                      910
+assign_p_ic                     911
+assign_p_n                      912
+assign_p_nc                     913
+assign_p_s                      914
+assign_p_sc                     915
+assign_s_s                      916
+assign_s_sc                     917
+setref_p_p                      918
+deref_p_p                       919
+setp_ind_i_p                    920
+setp_ind_ic_p                   921
+setn_ind_i_n                    922
+setn_ind_ic_n                   923
+setn_ind_i_nc                   924
+setn_ind_ic_nc                  925
+sets_ind_i_s                    926
+sets_ind_ic_s                   927
+sets_ind_i_sc                   928
+sets_ind_ic_sc                  929
+seti_ind_i_i                    930
+seti_ind_ic_i                   931
+seti_ind_i_ic                   932
+seti_ind_ic_ic                  933
+set_p_ki_i                      934
+set_p_kic_i                     935
+set_p_ki_ic                     936
+set_p_kic_ic                    937
+set_p_ki_n                      938
+set_p_kic_n                     939
+set_p_ki_nc                     940
+set_p_kic_nc                    941
+set_p_ki_s                      942
+set_p_kic_s                     943
+set_p_ki_sc                     944
+set_p_kic_sc                    945
+set_p_ki_p                      946
+set_p_kic_p                     947
+set_i_p_ki                      948
+set_i_p_kic                     949
+set_n_p_ki                      950
+set_n_p_kic                     951
+set_s_p_ki                      952
+set_s_p_kic                     953
+set_p_p_ki                      954
+set_p_p_kic                     955
+set_p_k_i                       956
+set_p_kc_i                      957
+set_p_k_ic                      958
+set_p_kc_ic                     959
+set_p_k_n                       960
+set_p_kc_n                      961
+set_p_k_nc                      962
+set_p_kc_nc                     963
+set_p_k_s                       964
+set_p_kc_s                      965
+set_p_k_sc                      966
+set_p_kc_sc                     967
+set_p_k_p                       968
+set_p_kc_p                      969
+set_i_p_k                       970
+set_i_p_kc                      971
+set_n_p_k                       972
+set_n_p_kc                      973
+set_s_p_k                       974
+set_s_p_kc                      975
+set_p_p_k                       976
+set_p_p_kc                      977
+clone_p_p                       978
+clone_p_p_p                     979
+clone_p_p_pc                    980
+copy_p_p                        981
+null_s                          982
+null_i                          983
+null_p                          984
+null_n                          985
+cleari                          986
+clearn                          987
+clears                          988
+clearp                          989
+ord_i_s                         990
+ord_i_sc                        991
+ord_i_s_i                       992
+ord_i_sc_i                      993
+ord_i_s_ic                      994
+ord_i_sc_ic                     995
+chr_s_i                         996
+chr_s_ic                        997
+chopn_s_i                       998
+chopn_s_ic                      999
+chopn_s_s_i                    1000
+chopn_s_sc_i                   1001
+chopn_s_s_ic                   1002
+chopn_s_sc_ic                  1003
+concat_s_s                     1004
+concat_s_sc                    1005
+concat_p_p                     1006
+concat_p_s                     1007
+concat_p_sc                    1008
+concat_s_s_s                   1009
+concat_s_sc_s                  1010
+concat_s_s_sc                  1011
+concat_p_p_s                   1012
+concat_p_p_sc                  1013
+concat_p_p_p                   1014
+repeat_s_s_i                   1015
+repeat_s_sc_i                  1016
+repeat_s_s_ic                  1017
+repeat_s_sc_ic                 1018
+repeat_p_p_i                   1019
+repeat_p_p_ic                  1020
+repeat_p_p_p                   1021
+repeat_p_i                     1022
+repeat_p_ic                    1023
+repeat_p_p                     1024
+length_i_s                     1025
+length_i_sc                    1026
+bytelength_i_s                 1027
+bytelength_i_sc                1028
+pin_s                          1029
+unpin_s                        1030
+substr_s_s_i                   1031
+substr_s_sc_i                  1032
+substr_s_s_ic                  1033
+substr_s_sc_ic                 1034
+substr_s_s_i_i                 1035
+substr_s_sc_i_i                1036
+substr_s_s_ic_i                1037
+substr_s_sc_ic_i               1038
+substr_s_s_i_ic                1039
+substr_s_sc_i_ic               1040
+substr_s_s_ic_ic               1041
+substr_s_sc_ic_ic              1042
+substr_s_s_i_i_s               1043
+substr_s_s_ic_i_s              1044
+substr_s_s_i_ic_s              1045
+substr_s_s_ic_ic_s             1046
+substr_s_s_i_i_sc              1047
+substr_s_s_ic_i_sc             1048
+substr_s_s_i_ic_sc             1049
+substr_s_s_ic_ic_sc            1050
+substr_s_i_i_s                 1051
+substr_s_ic_i_s                1052
+substr_s_i_ic_s                1053
+substr_s_ic_ic_s               1054
+substr_s_i_i_sc                1055
+substr_s_ic_i_sc               1056
+substr_s_i_ic_sc               1057
+substr_s_ic_ic_sc              1058
+substr_s_p_i_i                 1059
+substr_s_p_ic_i                1060
+substr_s_p_i_ic                1061
+substr_s_p_ic_ic               1062
+index_i_s_s                    1063
+index_i_sc_s                   1064
+index_i_s_sc                   1065
+index_i_sc_sc                  1066
+index_i_s_s_i                  1067
+index_i_sc_s_i                 1068
+index_i_s_sc_i                 1069
+index_i_sc_sc_i                1070
+index_i_s_s_ic                 1071
+index_i_sc_s_ic                1072
+index_i_s_sc_ic                1073
+index_i_sc_sc_ic               1074
+sprintf_s_s_p                  1075
+sprintf_s_sc_p                 1076
+sprintf_p_p_p                  1077
+new_s                          1078
+new_s_i                        1079
+new_s_ic                       1080
+stringinfo_i_s_i               1081
+stringinfo_i_sc_i              1082
+stringinfo_i_s_ic              1083
+stringinfo_i_sc_ic             1084
+upcase_s_s                     1085
+upcase_s_sc                    1086
+upcase_s                       1087
+downcase_s_s                   1088
+downcase_s_sc                  1089
+downcase_s                     1090
+titlecase_s_s                  1091
+titlecase_s_sc                 1092
+titlecase_s                    1093
+join_s_s_p                     1094
+join_s_sc_p                    1095
+split_p_s_s                    1096
+split_p_sc_s                   1097
+split_p_s_sc                   1098
+split_p_sc_sc                  1099
+charset_i_s                    1100
+charset_i_sc                   1101
+charsetname_s_i                1102
+charsetname_s_ic               1103
+find_charset_i_s               1104
+find_charset_i_sc              1105
+trans_charset_s_i              1106
+trans_charset_s_ic             1107
+trans_charset_s_s_i            1108
+trans_charset_s_sc_i           1109
+trans_charset_s_s_ic           1110
+trans_charset_s_sc_ic          1111
+encoding_i_s                   1112
+encoding_i_sc                  1113
+encodingname_s_i               1114
+encodingname_s_ic              1115
+find_encoding_i_s              1116
+find_encoding_i_sc             1117
+trans_encoding_s_i             1118
+trans_encoding_s_ic            1119
+trans_encoding_s_s_i           1120
+trans_encoding_s_sc_i          1121
+trans_encoding_s_s_ic          1122
+trans_encoding_s_sc_ic         1123
+is_cclass_i_i_s_i              1124
+is_cclass_i_ic_s_i             1125
+is_cclass_i_i_sc_i             1126
+is_cclass_i_ic_sc_i            1127
+is_cclass_i_i_s_ic             1128
+is_cclass_i_ic_s_ic            1129
+is_cclass_i_i_sc_ic            1130
+is_cclass_i_ic_sc_ic           1131
+find_cclass_i_i_s_i_i          1132
+find_cclass_i_ic_s_i_i         1133
+find_cclass_i_i_sc_i_i         1134
+find_cclass_i_ic_sc_i_i        1135
+find_cclass_i_i_s_ic_i         1136
+find_cclass_i_ic_s_ic_i        1137
+find_cclass_i_i_sc_ic_i        1138
+find_cclass_i_ic_sc_ic_i       1139
+find_cclass_i_i_s_i_ic         1140
+find_cclass_i_ic_s_i_ic        1141
+find_cclass_i_i_sc_i_ic        1142
+find_cclass_i_ic_sc_i_ic       1143
+find_cclass_i_i_s_ic_ic        1144
+find_cclass_i_ic_s_ic_ic       1145
+find_cclass_i_i_sc_ic_ic       1146
+find_cclass_i_ic_sc_ic_ic      1147
+find_not_cclass_i_i_s_i_i      1148
+find_not_cclass_i_ic_s_i_i     1149
+find_not_cclass_i_i_sc_i_i     1150
+find_not_cclass_i_ic_sc_i_i    1151
+find_not_cclass_i_i_s_ic_i     1152
+find_not_cclass_i_ic_s_ic_i    1153
+find_not_cclass_i_i_sc_ic_i    1154
+find_not_cclass_i_ic_sc_ic_i   1155
+find_not_cclass_i_i_s_i_ic     1156
+find_not_cclass_i_ic_s_i_ic    1157
+find_not_cclass_i_i_sc_i_ic    1158
+find_not_cclass_i_ic_sc_i_ic   1159
+find_not_cclass_i_i_s_ic_ic    1160
+find_not_cclass_i_ic_s_ic_ic   1161
+find_not_cclass_i_i_sc_ic_ic   1162
+find_not_cclass_i_ic_sc_ic_ic  1163
+escape_s_s                     1164
+compose_s_s                    1165
+compose_s_sc                   1166
+spawnw_i_s                     1167
+spawnw_i_sc                    1168
+spawnw_i_p                     1169
+err_i                          1170
+err_s                          1171
+err_s_i                        1172
+err_s_ic                       1173
+time_i                         1174
+time_n                         1175
+gmtime_s_i                     1176
+gmtime_s_ic                    1177
+localtime_s_i                  1178
+localtime_s_ic                 1179
+decodetime_p_i                 1180
+decodetime_p_ic                1181
+decodelocaltime_p_i            1182
+decodelocaltime_p_ic           1183
+sysinfo_s_i                    1184
+sysinfo_s_ic                   1185
+sysinfo_i_i                    1186
+sysinfo_i_ic                   1187
+sleep_i                        1188
+sleep_ic                       1189
+sleep_n                        1190
+sleep_nc                       1191
+sizeof_i_i                     1192
+sizeof_i_ic                    1193
+store_lex_s_p                  1194
+store_lex_sc_p                 1195
+store_dynamic_lex_s_p          1196
+store_dynamic_lex_sc_p         1197
+find_lex_p_s                   1198
+find_lex_p_sc                  1199
+find_dynamic_lex_p_s           1200
+find_dynamic_lex_p_sc          1201
+find_caller_lex_p_s            1202
+find_caller_lex_p_sc           1203
+get_namespace_p                1204
+get_namespace_p_p              1205
+get_namespace_p_pc             1206
+get_hll_namespace_p            1207
+get_hll_namespace_p_p          1208
+get_hll_namespace_p_pc         1209
+get_root_namespace_p           1210
+get_root_namespace_p_p         1211
+get_root_namespace_p_pc        1212
+get_global_p_s                 1213
+get_global_p_sc                1214
+get_global_p_p_s               1215
+get_global_p_pc_s              1216
+get_global_p_p_sc              1217
+get_global_p_pc_sc             1218
+get_hll_global_p_s             1219
+get_hll_global_p_sc            1220
+get_hll_global_p_p_s           1221
+get_hll_global_p_pc_s          1222
+get_hll_global_p_p_sc          1223
+get_hll_global_p_pc_sc         1224
+get_root_global_p_s            1225
+get_root_global_p_sc           1226
+get_root_global_p_p_s          1227
+get_root_global_p_pc_s         1228
+get_root_global_p_p_sc         1229
+get_root_global_p_pc_sc        1230
+set_global_s_p                 1231
+set_global_sc_p                1232
+set_global_p_s_p               1233
+set_global_pc_s_p              1234
+set_global_p_sc_p              1235
+set_global_pc_sc_p             1236
+set_hll_global_s_p             1237
+set_hll_global_sc_p            1238
+set_hll_global_p_s_p           1239
+set_hll_global_pc_s_p          1240
+set_hll_global_p_sc_p          1241
+set_hll_global_pc_sc_p         1242
+set_root_global_s_p            1243
+set_root_global_sc_p           1244
+set_root_global_p_s_p          1245
+set_root_global_pc_s_p         1246
+set_root_global_p_sc_p         1247
+set_root_global_pc_sc_p        1248
+find_name_p_s                  1249
+find_name_p_sc                 1250
+find_sub_not_null_p_s          1251
+find_sub_not_null_p_sc         1252

Deleted: trunk/src/ops/pic.ops
==============================================================================
--- trunk/src/ops/pic.ops	Wed Sep 16 13:25:57 2009	(r41293)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,323 +0,0 @@
-/*
- * $Id$
-** pic.ops
-*/
-
-BEGIN_OPS_PREAMBLE
-#include "parrot/oplib/ops.h"
-#include "../src/pmc/pmc_fixedintegerarray.h"
-
-typedef opcode_t* (*interface_f)(Interp*, INTVAL*, void **);
-END_OPS_PREAMBLE
-
-=head1 NAME
-
-pic.ops - PIC (Polymorphic Inline Cache) Opcodes [deprecated]
-
-=cut
-
-=head1 DESCRIPTION
-
-During predereferencing opcodes that allow caching are rewritten so that
-equivalent opcodes in this file are used. User code MUST never emit these
-opcodes directly.
-
-=head2 General infix operations
-
-These operations take an infix operation number and PMC arguments.
-
-=cut
-
-=over 4
-
-=item B<pic_infix__>(inconst INT, invar PMC, invar PMC)
-
-One for fun and MOPS.
-
-=cut
-
-inline op pic_infix__(inconst INT, invar PMC, invar PMC) :pic :flow {
-    Parrot_MIC *mic;
-    Parrot_PIC_lru *lru;
-    PMC *left, *right;
-    INTVAL lr_types;
-
-    mic = (Parrot_MIC *) cur_opcode[1];
-    left = $2;
-    right = $3;
-    lru = &mic->lru;
-    lr_types = (VTABLE_type(interp, left) << 16) | VTABLE_type(interp, right);
-    if (lru->u.type == lr_types) {
-runit_v_pp:
-        ((mmd_f_v_pp)lru->f.real_function)(interp, left, right);
-        goto NEXT();
-    }
-    if (mic->pic) {
-        lru = mic->pic->lru;
-        if (lru->u.type == lr_types)
-            goto runit_v_pp;
-        if (++lru->u.type == lr_types)
-            goto runit_v_pp;
-        if (++lru->u.type == lr_types)
-            goto runit_v_pp;
-        mic->pic->miss_count++;
-        /*
-         * RT#42353 if we got too often here just do a dynamic lookup
-         */
-    }
-    parrot_pic_find_infix_v_pp(interp, left, right, mic, cur_opcode);
-    /* rerun this opcode */
-    goto OFFSET(0);
-}
-
-=item B<pic_inline_sub__>(inconst INT, invar PMC, invar PMC)
-
-And for more fun an inlined variant too.
-
-=cut
-
-inline op pic_inline_sub__(inconst INT, invar PMC, invar PMC) :pic {
-    Parrot_MIC *mic;
-    Parrot_PIC_lru *lru;
-    PMC *left, *right;
-    INTVAL lr_types, lt, rt;
-
-    left = $2;
-    mic = (Parrot_MIC *) cur_opcode[1];
-    lt = VTABLE_type(interp, left);
-    right = $3;
-    lru = &mic->lru;
-    rt = VTABLE_type(interp, right);
-    lr_types = (lt << 16) | rt;
-    if (lru->u.type == lr_types) {
-        INTVAL a = VTABLE_get_integer(interp, left);
-        INTVAL b = VTABLE_get_integer(interp, right);
-        INTVAL c = a - b;
-        if ((c^a) >= 0 || (c^~b) >= 0) {
-            VTABLE_set_integer_native(interp, left, c);
-        }
-        else {
-            if (PARROT_ERRORS_test(interp, PARROT_ERRORS_OVERFLOW_FLAG)) {
-                opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
-                        EXCEPTION_ERR_OVERFLOW,
-                        "Integer overflow");
-                goto ADDRESS(handler);
-            }
-            /* #RT42354 preserve type system */
-            VTABLE_morph(interp, left, interp->vtables[enum_class_BigInt]->pmc_class);
-            VTABLE_set_integer_native(interp, left, a);
-            $2 = VTABLE_subtract_int(interp, left, b, left);
-        }
-    }
-    else {
-        ((void**)cur_opcode)[0] =
-            parrot_pic_opcode(interp, PARROT_OP_pic_infix___ic_p_p);
-        goto OFFSET(0);
-    }
-}
-
-=item B<pic_get_params__>(inconst PMC /* , ... */)
-
-Fetch function parameters for this subroutine.
-
-=item B<pic_set_returns__>(inconst PMC /* , ... */)
-
-Return values to caller.
-
-=cut
-
-inline op pic_get_params__(inconst PMC) :pic :flow {
-    Parrot_MIC *mic;
-    Parrot_PIC_lru *lru;
-    PMC *sig, *ccont;
-    opcode_t *src_pc;
-    void **src_pred;
-    PMC *caller_ctx, *ctx;
-    int n;
-
-    /* avoid load dependencies - intermix derefs
-     * - yes, confusing but faster
-     */
-    ctx         = CURRENT_CONTEXT(interp);
-    src_pc      = interp->current_args;
-    mic         = (Parrot_MIC *) cur_opcode[1];
-    caller_ctx  = Parrot_pcc_get_caller_ctx(interp, ctx);
-    if (src_pc) {
-        src_pred = (void**) src_pc - Parrot_pcc_get_pred_offset(interp, caller_ctx);
-        sig = (PMC*)(src_pred[1]);
-    }
-    else {
-        sig = NULL;
-        src_pred = NULL;        /* just for gcc */
-    }
-    lru = &mic->lru;
-    if (lru->u.signature == sig) {
-        if (sig) {
-            n = ((arg_pass_f)lru->f.real_function)(interp, sig,
-                    (char*)Parrot_pcc_get_regs_ni(interp, caller_ctx)->regs_i, src_pred,
-                    _reg_base, (void**)cur_opcode);
-        }
-        else
-            n = 2;
-        ccont = Parrot_pcc_get_continuation(interp, ctx);
-        if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL) {
-            PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
-            Parrot_pcc_dec_recursion_depth(interp, ctx);
-            Parrot_pcc_set_caller_ctx(interp, ctx,
-                    Parrot_pcc_get_caller_ctx(interp, caller_ctx));
-            interp->current_args = NULL;
-        }
-
-        goto OFFSET(n);
-    }
-    /* no match redo plain opcode */
-    ((void**)cur_opcode)[0] =
-        parrot_pic_opcode(interp, PARROT_OP_get_params_pc);
-    ((void**)cur_opcode)[1] = mic->m.sig;
-    goto OFFSET(0);
-}
-
-inline op pic_set_returns__(inconst PMC) :pic :flow {
-    Parrot_MIC *mic;
-    Parrot_PIC_lru *lru;
-    PMC *sig, *ccont;
-    opcode_t *dest_pc;
-    void **dest_pred;
-    PMC *caller_ctx, *ctx;
-    Parrot_Continuation_attributes *cc;
-    int n;
-
-    ctx     = CURRENT_CONTEXT(interp);
-    mic     = (Parrot_MIC *) cur_opcode[1];
-    ccont   = Parrot_pcc_get_continuation(interp, ctx);
-    cc      = PMC_cont(ccont);
-    if (!cc->address) {
-        interp->current_returns = CUR_OPCODE;
-        n = VTABLE_get_integer(interp, mic->m.sig);
-        goto OFFSET(n + 2);
-    }
-    caller_ctx = cc->to_ctx;
-    interp->current_args = NULL;
-    dest_pc = Parrot_pcc_get_results(interp, caller_ctx);
-    if (dest_pc) {
-        dest_pred = (void**) dest_pc - Parrot_pcc_get_pred_offset(interp, caller_ctx);
-        sig = (PMC*)(dest_pred[1]);
-    }
-    else {
-        sig = NULL;
-        dest_pred = NULL;
-    }
-    lru = &mic->lru;
-    if (lru->u.signature == sig) {
-        if (sig) {
-            n = ((arg_pass_f)lru->f.real_function)(interp, mic->m.sig,
-                    _reg_base, (void**)cur_opcode,
-                    (char*)Parrot_pcc_get_regs_ni(interp, caller_ctx)->regs_i, dest_pred);
-        }
-        else
-            n = 2;
-        goto OFFSET(n);
-    }
-    /* no match redo plain opcode */
-    ((void**)cur_opcode)[0] =
-        parrot_pic_opcode(interp, PARROT_OP_set_returns_pc);
-    ((void**)cur_opcode)[1] = mic->m.sig;
-    goto OFFSET(0);
-}
-
-=item B<pic_callr__>(inconst PMC)
-
-Call the function $1 as C<pc = func(interp, 0, **args)>. args[0] holds the
-address of the function result, args[1..] are function arguments, both
-according to the C<get_results> and C<set_args> opcodes. The function is
-a C interface function (or NCI) or a JITed PIR function. args[n+1] holds the
-C<pc> of the next opcode and is usually just returned.
-
-=cut
-
-inline op pic_callr__(inconst PMC) :pic :flow {
-    Parrot_MIC *mic;
-    Parrot_PIC_lru *lru;
-    void *args[6];      /* RT#42355 ARG_MAX */
-    PMC *ctx;
-    opcode_t *pc;
-    void **pred_pc;
-    INTVAL i, n_args, *sig_bits;
-    PMC *sig;
-
-    ctx = CURRENT_CONTEXT(interp);
-    mic = (Parrot_MIC *) cur_opcode[1];
-    /* get_results */
-    pc = Parrot_pcc_get_results(interp, ctx);
-    if (pc) {
-        pred_pc = (void**) pc - Parrot_pcc_get_pred_offset(interp, ctx);
-        sig = (PMC*)(pred_pc[1]);
-        ASSERT_SIG_PMC(sig);
-        PARROT_ASSERT(VTABLE_elements(interp, sig) <= 1);
-        args[0] = VTABLE_elements(interp, sig) ?
-            (_reg_base + ((opcode_t*)pred_pc)[2]) : NULL;
-    }
-    else
-        args[0] = NULL;
-    /* set_args */
-    n_args = 0;
-    sig = mic->m.sig;
-    ASSERT_SIG_PMC(sig);
-    n_args = VTABLE_elements(interp, sig);
-    GETATTR_FixedIntegerArray_int_array(interp, sig, sig_bits);
-    for (i = 0; i < n_args; ++i) {
-        switch (sig_bits[i]) {
-            case PARROT_ARG_INTVAL:
-                args[1 + i] = (void*)*(INTVAL*)(_reg_base +
-                        ((opcode_t*)cur_opcode)[2 + i]);
-                break;
-            case PARROT_ARG_INTVAL|PARROT_ARG_CONSTANT:
-            case PARROT_ARG_FLOATVAL|PARROT_ARG_CONSTANT:
-                args[1 + i] = (void**)cur_opcode[2 + i];
-                break;
-            case PARROT_ARG_FLOATVAL:
-                args[1 + i] = (_reg_base +
-                        ((opcode_t*)cur_opcode)[2 + i]);
-                break;
-            default:
-                {
-                    opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
-                        EXCEPTION_INVALID_OPERATION,
-                        "unhandled sig_bits");
-                    goto ADDRESS(handler);
-                }
-        }
-    }
-    /* set_args(); set_p_pc; get_results(1), x; invokecc_p */
-    pc = CUR_OPCODE + 2 + n_args + 3 + 3 + 2;
-    args[1 + n_args] = pc;
-    lru = &mic->lru;
-    /* RT#42356 verify $1 didn't change */
-    (void) ((interface_f)lru->f.real_function)(interp, sig_bits, args);
-    goto ADDRESS(pc);
-}
-
-=back
-
-=cut
-
-###############################################################################
-
-=head1 COPYRIGHT
-
-Copyright (C) 2005-2008, Parrot Foundation.
-
-=head1 LICENSE
-
-This program is free software. It is subject to the same license
-as the Parrot interpreter itself.
-
-=cut
-
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/packfile.c	Wed Sep 16 13:25:57 2009	(r41294)
@@ -583,8 +583,6 @@
             }
             break;
         case PF_UNKNOWN_SEG:
-            if (memcmp(seg->name, "PIC_idx", 7) == 0)
-                pf->cur_cs->pic_index = seg;
             break;
         case PF_DEBUG_SEG:
             pf->cur_cs->debugs       = (PackFile_Debug *)seg;
@@ -1771,9 +1769,6 @@
 
     cur_cs->const_table->code = cur_cs;
 
-    cur_cs->pic_index = create_seg(interp, &pf->directory,
-            PF_UNKNOWN_SEG, "PIC_idx", file_name, add);
-
     return cur_cs;
 }
 
@@ -2572,7 +2567,6 @@
 #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);
         byte_code->prederef.code = NULL;
@@ -2585,7 +2579,6 @@
 
     byte_code->fixups      = NULL;
     byte_code->const_table = NULL;
-    byte_code->pic_index   = NULL;
     byte_code->debugs      = NULL;
 }
 

Modified: trunk/src/parrot_debugger.c
==============================================================================
--- trunk/src/parrot_debugger.c	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/parrot_debugger.c	Wed Sep 16 13:25:57 2009	(r41294)
@@ -145,6 +145,7 @@
 #include "../compilers/imcc/parser.h"
 #include "parrot/embed.h"
 #include "parrot/debugger.h"
+#include "parrot/runcore_api.h"
 
 static void PDB_printwelcome(void);
 static void PDB_run_code(PARROT_INTERP, int argc, char *argv[]);

Modified: trunk/src/pbc_merge.c
==============================================================================
--- trunk/src/pbc_merge.c	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/pbc_merge.c	Wed Sep 16 13:25:57 2009	(r41294)
@@ -140,19 +140,6 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-static void pbc_merge_pic_index(PARROT_INTERP,
-    ARGMOD(pbc_merge_input **inputs),
-    int num_inputs,
-    ARGMOD(PackFile *pf),
-    ARGMOD(PackFile_ByteCode *bc))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        FUNC_MODIFIES(*inputs)
-        FUNC_MODIFIES(*pf)
-        FUNC_MODIFIES(*bc);
-
 static void pbc_merge_write(PARROT_INTERP,
     ARGMOD(PackFile *pf),
     ARGIN(const char *filename))
@@ -192,11 +179,6 @@
 #define ASSERT_ARGS_pbc_merge_loadpbc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(fullname)
-#define ASSERT_ARGS_pbc_merge_pic_index __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(inputs) \
-    || PARROT_ASSERT_ARG(pf) \
-    || PARROT_ASSERT_ARG(bc)
 #define ASSERT_ARGS_pbc_merge_write __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(pf) \
@@ -653,59 +635,6 @@
 
 /*
 
-=item C<static void pbc_merge_pic_index(PARROT_INTERP, pbc_merge_input **inputs,
-int num_inputs, PackFile *pf, PackFile_ByteCode *bc)>
-
-This function merges the pic_index segments from the input PBC files.
-
-=cut
-
-*/
-
-static void
-pbc_merge_pic_index(PARROT_INTERP, ARGMOD(pbc_merge_input **inputs),
-                 int num_inputs, ARGMOD(PackFile *pf), ARGMOD(PackFile_ByteCode *bc))
-{
-    ASSERT_ARGS(pbc_merge_pic_index)
-    int i;
-    PackFile_Segment *pic_index;
-    size_t size;
-    opcode_t cursor = 0;
-    opcode_t start = 0;
-    opcode_t last = 0;
-
-    /* calc needed size */
-    for (i = 0, size = 0; i < num_inputs; i++) {
-        PackFile_Segment * const in_seg  = inputs[i]->pf->cur_cs->pic_index;
-        size   += in_seg->size;
-    }
-    pic_index = PackFile_Segment_new_seg(interp,
-              &pf->directory, PF_UNKNOWN_SEG, "PIC_idx_MERGED", 1);
-    pic_index->data
-        = (opcode_t *)mem_sys_allocate_zeroed(size * sizeof (opcode_t));
-    pic_index->size = size;
-
-    for (i = 0, size = 0; i < num_inputs; i++) {
-        PackFile_Segment * const in_seg = inputs[i]->pf->cur_cs->pic_index;
-        size_t j;
-        /*
-         * pic_index is 0 or an ever increasing (by 1) number
-         */
-        for (j = 0; j < in_seg->size; j++) {
-            const opcode_t k = in_seg->data[j];
-            if (k) {
-                pic_index->data[cursor] = k + start;
-                last = k;
-            }
-            cursor++;
-        }
-        start = last;
-    }
-    bc->pic_index = pic_index;
-}
-
-/*
-
 =item C<static void pbc_merge_ctpointers(PARROT_INTERP, pbc_merge_input
 **inputs, int num_inputs, PackFile_ByteCode *bc)>
 
@@ -822,7 +751,6 @@
 
     pbc_merge_fixups(interp, inputs, num_inputs, merged, bc);
     pbc_merge_debugs(interp, inputs, num_inputs, merged, bc);
-    pbc_merge_pic_index(interp, inputs, num_inputs, merged, bc);
 
     /* Walk bytecode and fix ops that reference the constants table. */
     pbc_merge_ctpointers(interp, inputs, num_inputs, bc);

Deleted: trunk/src/pic.c
==============================================================================
--- trunk/src/pic.c	Wed Sep 16 13:25:57 2009	(r41293)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,954 +0,0 @@
-/*
-Copyright (C) 2004-2009, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/pic.c - Polymorphic Inline Cache
-
-=head1 DESCRIPTION
-
-The PIC supports inline caching for MMD and object method lookups in
-prederefed run cores. Additionally opcodes that do some kind of lookup
-like C<new_p_sc> are changed to faster variants.
-
-For non-prederefed run-cores there's a less efficient variant which
-is basically:
-
- * the bytecode segment has an index per cached opcode (code->pic_index)
- * this index points into pic_store
- * TODO use the cache in opcodes
-
-=head1 OPERATION SCHEME
-
-Given this bytecode:
-
-    0               1              2    3    4                5
-  +--------------+---------------+----+----+-----------------+----------+
-  | infix_ic_p_p | .MMD_SUBTRACT | P5 | P6 | callmethodcc_sc | "method" |
-  +--------------+---------------+----+----+-----------------+----------+
-
-In init_prederef the opcodes are replaced with prederef__, operands
-are replaced with their addresses (&) in the const table or offsets
-(+) in the register frame:
-
-    0               1              2    3    4                5
-  +--------------+---------------+----+----+-----------------+----------+
-  | prederef__   | .MMD_SUBTRACT | +P5| +P6| prederef__      |&"method" |
-  +--------------+---------------+----+----+-----------------+----------+
-
-we have code->pic_index with an index into pic_store - the pic_index is
-half the size of the bytecode and addressed with pc_offset/2:
-
-    0   1   2
-  +---+---+---+
-  | 1 |   | 2 |
-  +---+---+---+
-
-During predereferencing the opcode gets rewritten to the PIC variant,
-the constant infix operation number is replaced with a pointer to the MIC
-in the pic_store at the index pic_index:
-
-    0                    1     2    3
-  +--------------------+-----+----+----+-----------------------+-----+
-  | pic_infix___ic_p_p | MIC1|+P5 |+P6 | pic_callmethodcc___sc | MIC2|
-  +--------------------+-----+----+----+-----------------------+-----+
-
-This can be further optimized due to static inlining:
-
-    0                    1     2    3
-  +--------------------+-----+----+----+-----------------------+-----+
-  | pic_inline_sub_p_p | MIC1|+P5 |+P6 | pic_callmethodcc___sc | MIC2|
-  +--------------------+-----+----+----+-----------------------+-----+
-
-The opcode is an opcode number for the switched core or the actual code address
-for the direct-threaded CGP core. With a little help of the JIT system we could
-also dynamicall create inlined code.
-
-Runcores with r/o (mmapped) bytecode can't be rewritten in this way, the
-lookup of the cache has to be done in the opcode itself.
-
-=head2 Functions
-
-=over 4
-
-=cut
-
-*/
-
-#include "parrot/parrot.h"
-#include "parrot/oplib/ops.h"
-#include "parrot/runcore_api.h"
-#include "pmc/pmc_fixedintegerarray.h"
-#include "pmc/pmc_continuation.h"
-#ifdef HAVE_COMPUTED_GOTO
-#  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" */
-
-/* XXX Define this in a header file */
-extern void Parrot_Integer_i_subtract_Integer(Interp* , PMC* pmc, PMC* value);
-
-/*
- * hack to turn on inlining - just sub_p_p for mops done
- */
-
-#define ENABLE_INLINING 0
-
-/* HEADERIZER HFILE: include/parrot/pic.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-
-static int is_pic_func(PARROT_INTERP,
-    ARGIN(void **pc),
-    ARGOUT(Parrot_MIC *mic),
-    ARGIN(Parrot_runcore_t *runcore))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        FUNC_MODIFIES(*mic);
-
-static int is_pic_param(PARROT_INTERP,
-    ARGIN(void **pc),
-    ARGOUT(Parrot_MIC *mic),
-    opcode_t op)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*mic);
-
-static int pass_int(PARROT_INTERP,
-    ARGIN(PMC *sig),
-    ARGIN(const char *src_base),
-    ARGIN(const void **src),
-    ARGOUT(char *dest_base),
-    ARGIN(void * const *dest))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        __attribute__nonnull__(6)
-        FUNC_MODIFIES(*dest_base);
-
-static int pass_mixed(PARROT_INTERP,
-    ARGIN(PMC *sig),
-    ARGIN(const char *src_base),
-    ARGIN(void * const *src),
-    ARGOUT(char *dest_base),
-    ARGIN(void * const *dest))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        __attribute__nonnull__(6)
-        FUNC_MODIFIES(*dest_base);
-
-static int pass_num(PARROT_INTERP,
-    ARGIN(PMC *sig),
-    ARGIN(const char *src_base),
-    ARGIN(const void **src),
-    ARGOUT(char *dest_base),
-    ARGIN(void * const *dest))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        __attribute__nonnull__(6)
-        FUNC_MODIFIES(*dest_base);
-
-static int pass_pmc(PARROT_INTERP,
-    ARGIN(PMC *sig),
-    ARGIN(const char *src_base),
-    ARGIN(const void **src),
-    ARGOUT(char *dest_base),
-    ARGIN(void * const *dest))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        __attribute__nonnull__(6)
-        FUNC_MODIFIES(*dest_base);
-
-static int pass_str(PARROT_INTERP,
-    ARGIN(PMC *sig),
-    ARGIN(const char *src_base),
-    ARGIN(const void **src),
-    ARGOUT(char *dest_base),
-    ARGIN(void * const *dest))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        __attribute__nonnull__(6)
-        FUNC_MODIFIES(*dest_base);
-
-#define ASSERT_ARGS_is_pic_func __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(pc) \
-    || PARROT_ASSERT_ARG(mic) \
-    || PARROT_ASSERT_ARG(runcore)
-#define ASSERT_ARGS_is_pic_param __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(pc) \
-    || PARROT_ASSERT_ARG(mic)
-#define ASSERT_ARGS_pass_int __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sig) \
-    || PARROT_ASSERT_ARG(src_base) \
-    || PARROT_ASSERT_ARG(src) \
-    || PARROT_ASSERT_ARG(dest_base) \
-    || PARROT_ASSERT_ARG(dest)
-#define ASSERT_ARGS_pass_mixed __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sig) \
-    || PARROT_ASSERT_ARG(src_base) \
-    || PARROT_ASSERT_ARG(src) \
-    || PARROT_ASSERT_ARG(dest_base) \
-    || PARROT_ASSERT_ARG(dest)
-#define ASSERT_ARGS_pass_num __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sig) \
-    || PARROT_ASSERT_ARG(src_base) \
-    || PARROT_ASSERT_ARG(src) \
-    || PARROT_ASSERT_ARG(dest_base) \
-    || PARROT_ASSERT_ARG(dest)
-#define ASSERT_ARGS_pass_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sig) \
-    || PARROT_ASSERT_ARG(src_base) \
-    || PARROT_ASSERT_ARG(src) \
-    || PARROT_ASSERT_ARG(dest_base) \
-    || PARROT_ASSERT_ARG(dest)
-#define ASSERT_ARGS_pass_str __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sig) \
-    || PARROT_ASSERT_ARG(src_base) \
-    || PARROT_ASSERT_ARG(src) \
-    || PARROT_ASSERT_ARG(dest_base) \
-    || PARROT_ASSERT_ARG(dest)
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-/* HEADERIZER END: static */
-
-
-/*
-
-=item C<void parrot_PIC_alloc_store(PackFile_ByteCode *cs, size_t n)>
-
-Initialize the PIC storage for the given code segment with the capacitiy of
-holding at least C<n> MIC entries. The PIC_store itself, room for C<n> MICs and
-some space for PICs is allocated as one piece. MICs are returned from the start
-of usable memory, PICs from the rear.
-
-=cut
-
-*/
-
-void
-parrot_PIC_alloc_store(ARGOUT(PackFile_ByteCode *cs), size_t n)
-{
-    ASSERT_ARGS(parrot_PIC_alloc_store)
-    Parrot_PIC_store *store;
-    size_t size;
-
-    /*
-     * estimated 95% of calls are monomorphic, 5% are polymorphic
-     * we need therefore:
-     */
-#define POLYMORPHIC 0.05
-    size_t poly = (size_t)(n * POLYMORPHIC) * sizeof (Parrot_PIC);
-
-    if (!poly)
-        poly = 2 * sizeof (Parrot_PIC);
-
-    size = n * sizeof (Parrot_MIC) + poly + sizeof (Parrot_PIC_store);
-
-    store         = (Parrot_PIC_store *)mem_sys_allocate_zeroed(size);
-    store->prev   = NULL;
-    cs->pic_store = store;
-    store->pic    = (Parrot_PIC *)((char *)store + size);
-    store->usable = poly;
-    store->mic    = (Parrot_MIC *)((char*)store + sizeof (Parrot_PIC_store));
-    store->n_mics = n;
-}
-
-/*
-
-=item C<void parrot_PIC_destroy(PackFile_ByteCode *cs)>
-
-Free memory for the PIC storage.
-
-=cut
-
-*/
-
-void
-parrot_PIC_destroy(ARGMOD(PackFile_ByteCode *cs))
-{
-    ASSERT_ARGS(parrot_PIC_destroy)
-    Parrot_PIC_store *store = cs->pic_store;
-
-    while (store) {
-        Parrot_PIC_store * const prev = store->prev;
-        mem_sys_free(store);
-        store = prev;
-    }
-
-    cs->pic_store = NULL;
-}
-
-/*
-
-=item C<int parrot_PIC_op_is_cached(int op_code)>
-
-Return true, if the opcode needs a PIC slot.
-
-=cut
-
-*/
-
-PARROT_CONST_FUNCTION
-int
-parrot_PIC_op_is_cached(int op_code)
-{
-    ASSERT_ARGS(parrot_PIC_op_is_cached)
-    switch (op_code) {
-        case PARROT_OP_get_params_pc:
-        case PARROT_OP_set_returns_pc:
-        case PARROT_OP_set_args_pc:
-            return 1;
-        default:
-            return 0;
-    }
-}
-
-/*
-
-=item C<Parrot_MIC* parrot_PIC_alloc_mic(const PARROT_INTERP, size_t n)>
-
-Allocate a new MIC structure for the C<n>th cached opcode in this
-bytecode segement.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-Parrot_MIC*
-parrot_PIC_alloc_mic(const PARROT_INTERP, size_t n)
-{
-    ASSERT_ARGS(parrot_PIC_alloc_mic)
-    Parrot_PIC_store * const store = interp->code->pic_store;
-    PARROT_ASSERT(n < store->n_mics);
-    return store->mic + n;
-}
-
-/*
-
-=item C<Parrot_PIC* parrot_PIC_alloc_pic(PARROT_INTERP)>
-
-Allocate a new PIC structure for the C<n>th cached opcode in this
-bytecode segement.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-Parrot_PIC*
-parrot_PIC_alloc_pic(PARROT_INTERP)
-{
-    ASSERT_ARGS(parrot_PIC_alloc_pic)
-    Parrot_PIC_store *store = interp->code->pic_store;
-    Parrot_PIC_store *new_store;
-
-    if (store->usable < sizeof (Parrot_PIC)) {
-        size_t size =
-            (size_t)(store->n_mics * POLYMORPHIC) * sizeof (Parrot_PIC);
-
-        if (size == 0)
-            size = 2 * sizeof (Parrot_PIC);
-
-        new_store               = (Parrot_PIC_store *)
-                    mem_sys_allocate_zeroed(size + sizeof (Parrot_PIC_store));
-        new_store->prev         = store;
-        interp->code->pic_store = new_store;
-
-        new_store->pic    = (Parrot_PIC *)((char *)new_store + size
-                          + sizeof (Parrot_PIC_store));
-        new_store->usable = size;
-
-        /* the addon store has only poly-morphic slots
-         * point the monomorphic to the old store */
-        new_store->mic    = store->mic;
-        new_store->n_mics = store->n_mics;
-        store             = new_store;
-    }
-    store->usable -= sizeof (Parrot_PIC);
-    return --store->pic;
-}
-
-/*
-
-=item C<void * parrot_pic_opcode(PARROT_INTERP, INTVAL op)>
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void *
-parrot_pic_opcode(PARROT_INTERP, INTVAL op)
-{
-    ASSERT_ARGS(parrot_pic_opcode)
-#ifdef HAVE_COMPUTED_GOTO
-    op_lib_t *cg_lib;
-#endif
-    const Parrot_runcore_t *core = interp->run_core;
-
-    if (PARROT_RUNCORE_PREDEREF_OPS_TEST(core)
-    && !PARROT_RUNCORE_CGOTO_OPS_TEST(core))
-        return (void *)op;
-#ifdef HAVE_COMPUTED_GOTO
-    cg_lib = PARROT_CORE_CGP_OPLIB_INIT(1);
-    return ((void **)cg_lib->op_func_table)[op];
-#else
-    return NULL;
-#endif
-
-}
-
-/*
-
-=item C<static int pass_int(PARROT_INTERP, PMC *sig, const char *src_base, const
-void **src, char *dest_base, void * const *dest)>
-
-=cut
-
-*/
-
-static int
-pass_int(PARROT_INTERP, ARGIN(PMC *sig), ARGIN(const char *src_base),
-        ARGIN(const void **src), ARGOUT(char *dest_base), ARGIN(void * const *dest))
-{
-    ASSERT_ARGS(pass_int)
-    int i;
-    int n = VTABLE_elements(interp, sig);
-
-    for (i = 2; n; ++i, --n) {
-        const INTVAL arg = *(const INTVAL *)(src_base + ((const opcode_t*)src)[i]);
-        *(INTVAL *)(dest_base + ((const opcode_t*)dest)[i]) = arg;
-    }
-    return i;
-}
-
-/*
-
-=item C<static int pass_num(PARROT_INTERP, PMC *sig, const char *src_base, const
-void **src, char *dest_base, void * const *dest)>
-
-=cut
-
-*/
-
-static int
-pass_num(PARROT_INTERP, ARGIN(PMC *sig), ARGIN(const char *src_base),
-        ARGIN(const void **src), ARGOUT(char *dest_base), ARGIN(void * const *dest))
-{
-    ASSERT_ARGS(pass_num)
-    int i;
-    int n = VTABLE_elements(interp, sig);
-
-    for (i = 2; n; ++i, --n) {
-        const FLOATVAL arg = *(const FLOATVAL *)(src_base + ((const opcode_t*)src)[i]);
-        *(FLOATVAL *)(dest_base + ((const opcode_t*)dest)[i]) = arg;
-    }
-    return i;
-}
-
-/*
-
-=item C<static int pass_str(PARROT_INTERP, PMC *sig, const char *src_base, const
-void **src, char *dest_base, void * const *dest)>
-
-=cut
-
-*/
-
-static int
-pass_str(PARROT_INTERP, ARGIN(PMC *sig), ARGIN(const char *src_base),
-        ARGIN(const void **src), ARGOUT(char *dest_base), ARGIN(void * const *dest))
-{
-    ASSERT_ARGS(pass_str)
-    int i;
-    int n = VTABLE_elements(interp, sig);
-
-    for (i = 2; n; ++i, --n) {
-        STRING * const arg = *(STRING* const *)(src_base + ((const opcode_t*)src)[i]);
-        *(STRING* *)(dest_base + ((const opcode_t*)dest)[i]) = arg;
-    }
-
-    return i;
-}
-
-/*
-
-=item C<static int pass_pmc(PARROT_INTERP, PMC *sig, const char *src_base, const
-void **src, char *dest_base, void * const *dest)>
-
-=cut
-
-*/
-
-static int
-pass_pmc(PARROT_INTERP, ARGIN(PMC *sig), ARGIN(const char *src_base),
-        ARGIN(const void **src), ARGOUT(char *dest_base), ARGIN(void * const *dest))
-{
-    ASSERT_ARGS(pass_pmc)
-    int i;
-    int n = VTABLE_elements(interp, sig);
-
-    for (i = 2; n; ++i, --n) {
-        PMC * const arg = *(PMC* const *)(src_base + ((const opcode_t*)src)[i]);
-        *(PMC* *)(dest_base + ((const opcode_t*)dest)[i])= arg;
-    }
-    return i;
-}
-
-/*
-
-=item C<static int pass_mixed(PARROT_INTERP, PMC *sig, const char *src_base,
-void * const *src, char *dest_base, void * const *dest)>
-
-=cut
-
-*/
-
-static int
-pass_mixed(PARROT_INTERP, ARGIN(PMC *sig), ARGIN(const char *src_base),
-        ARGIN(void * const *src), ARGOUT(char *dest_base), ARGIN(void * const *dest))
-{
-    ASSERT_ARGS(pass_mixed)
-    int i;
-    INTVAL *bitp;
-    int n = VTABLE_elements(interp, sig);
-
-    ASSERT_SIG_PMC(sig);
-    GETATTR_FixedIntegerArray_int_array(interp, sig, bitp);
-
-    for (i = 2; n; ++i, --n) {
-        const INTVAL bits = *bitp++;
-        switch (bits) {
-            case PARROT_ARG_INTVAL:
-                {
-                const INTVAL argI = *(const INTVAL *)(src_base + ((const opcode_t*)src)[i]);
-                *(INTVAL *)(dest_base + ((const opcode_t*)dest)[i])= argI;
-                }
-                break;
-            case PARROT_ARG_INTVAL|PARROT_ARG_CONSTANT:
-                *(INTVAL *)(dest_base + ((const opcode_t*)dest)[i]) = (INTVAL)(src)[i];
-                break;
-            case PARROT_ARG_FLOATVAL:
-                {
-                const FLOATVAL argN = *(const FLOATVAL *)(src_base + ((const opcode_t*)src)[i]);
-                *(FLOATVAL *)(dest_base + ((const opcode_t*)dest)[i])= argN;
-                }
-                break;
-            case PARROT_ARG_FLOATVAL|PARROT_ARG_CONSTANT:
-                {
-                const FLOATVAL argN = *(const FLOATVAL*)(src)[i];
-                *(FLOATVAL *)(dest_base + ((const opcode_t*)dest)[i])= argN;
-                }
-                break;
-            case PARROT_ARG_STRING:
-                {
-                STRING *argS = *(STRING * const *)(src_base + ((const opcode_t *)src)[i]);
-
-                if (argS && PObj_constant_TEST(argS))
-                    argS = Parrot_str_new_COW(interp, argS);
-
-                *(STRING **)(dest_base + ((const opcode_t*)dest)[i]) = argS;
-                }
-                break;
-            case PARROT_ARG_STRING|PARROT_ARG_CONSTANT:
-                {
-                STRING *argS = (STRING *)(src)[i];
-                if (argS && PObj_constant_TEST(argS))
-                    argS = Parrot_str_new_COW(interp, argS);
-                *(STRING **)(dest_base + ((const opcode_t *)dest)[i]) = argS;
-                }
-                break;
-            case PARROT_ARG_PMC:
-                {
-                PMC* const argP = *(PMC * const *)(src_base + ((const opcode_t*)src)[i]);
-                *(PMC* *)(dest_base + ((const opcode_t*)dest)[i])= argP;
-                }
-                break;
-            case PARROT_ARG_PMC|PARROT_ARG_CONSTANT:
-                {
-                PMC* const argP = (PMC*)(src)[i];
-                *(PMC* *)(dest_base + ((const opcode_t*)dest)[i])= argP;
-                }
-                break;
-            default:
-                Parrot_ex_throw_from_c_args(interp, NULL, 1,
-                    "bogus signature 0x%x", bits);
-                break;
-        }
-    }
-    return i;
-}
-
-/*
-
-=item C<int parrot_pic_check_sig(PARROT_INTERP, PMC *sig1, PMC *sig2, int
-*type)>
-
-return argument count and type of the signature or -1 if not pic-able
-the type PARROT_ARG_CONSTANT stands for mixed types or constants
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-int
-parrot_pic_check_sig(PARROT_INTERP, ARGIN(PMC *sig1), ARGIN(PMC *sig2),
-        ARGOUT(int *type))
-{
-    ASSERT_ARGS(parrot_pic_check_sig)
-    int i, n, t0;
-
-    ASSERT_SIG_PMC(sig1);
-    ASSERT_SIG_PMC(sig2);
-
-    n = VTABLE_elements(interp, sig1);
-
-    if (n != VTABLE_elements(interp, sig2))
-        return -1;
-
-    if (!n) {
-        *type = 0;
-        return 0;
-    }
-
-    for (i = 0; i < n; ++i) {
-        int t1 = VTABLE_get_integer_keyed_int(interp, sig1, i);
-        int t2 = VTABLE_get_integer_keyed_int(interp, sig2, i);
-
-        if (i) {
-            t0 = 0;
-        }
-        else {
-            t0 = t1 & PARROT_ARG_TYPE_MASK;
-            *type = t0;
-        }
-
-        if (t1 & PARROT_ARG_CONSTANT) {
-            *type =  PARROT_ARG_CONSTANT;
-            t1   &= ~PARROT_ARG_CONSTANT;
-        }
-
-        if (t1 & ~PARROT_ARG_TYPE_MASK)
-            return -1;
-
-        if (t2 & PARROT_ARG_CONSTANT) {
-            *type =  PARROT_ARG_CONSTANT;
-            t2   &= ~PARROT_ARG_CONSTANT;
-        }
-
-        if (t2 & ~PARROT_ARG_TYPE_MASK)
-            return -1;
-
-        if (t2 != t1)
-            return -1;
-
-        if (t1 != t0)
-            *type = PARROT_ARG_CONSTANT;
-    }
-
-    return n;
-}
-
-/*
-
-=item C<static int is_pic_param(PARROT_INTERP, void **pc, Parrot_MIC *mic,
-opcode_t op)>
-
-=cut
-
-*/
-
-static int
-is_pic_param(PARROT_INTERP, ARGIN(void **pc), ARGOUT(Parrot_MIC *mic), opcode_t op)
-{
-    ASSERT_ARGS(is_pic_param)
-    PMC                *sig2;
-    PMC                *caller_ctx;
-    opcode_t           *args;
-    PMC         * const sig1 = (PMC *)(pc[1]);
-    PMC                *ctx  = CURRENT_CONTEXT(interp);
-    int                 type = 0;
-
-    /* check params */
-
-    if (op == PARROT_OP_set_returns_pc) {
-        PMC * const ccont = Parrot_pcc_get_continuation(interp, ctx);
-        if (!PMC_cont(ccont)->address)
-            return 0;
-        caller_ctx = PMC_cont(ccont)->to_ctx;
-        args       = Parrot_pcc_get_results(interp, caller_ctx);
-    }
-    else {
-        caller_ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
-        args       = interp->current_args;
-    }
-
-    if (args) {
-        const INTVAL const_nr = args[1];
-        int          n;
-
-        /* check current_args signature */
-        sig2 = Parrot_pcc_get_pmc_constant(interp, caller_ctx, const_nr);
-        n    = parrot_pic_check_sig(interp, sig1, sig2, &type);
-
-        if (n == -1)
-            return 0;
-    }
-    else {
-        if (VTABLE_elements(interp, sig1) == 0) {
-            sig2 = NULL;
-            type = 0;
-        }
-        else
-            return 0;
-    }
-
-    switch (type) {
-        case PARROT_ARG_INTVAL:
-            mic->lru.f.real_function = (funcptr_t)pass_int;
-            break;
-        case PARROT_ARG_FLOATVAL:
-            mic->lru.f.real_function = (funcptr_t)pass_num;
-            break;
-        case PARROT_ARG_STRING:
-            mic->lru.f.real_function = (funcptr_t)pass_str;
-            break;
-        case PARROT_ARG_PMC:
-            mic->lru.f.real_function = (funcptr_t)pass_pmc;
-            break;
-        case PARROT_ARG_CONSTANT:
-            mic->lru.f.real_function = (funcptr_t)pass_mixed;
-            break;
-        default:
-            return 0;
-    }
-
-    mic->m.sig = sig1;
-
-    /* remember this sig2 - it has to match the other end at call time */
-    mic->lru.u.signature = sig2;
-
-    return 1;
-}
-
-
-/*
-
-=item C<static int is_pic_func(PARROT_INTERP, void **pc, Parrot_MIC *mic,
-Parrot_runcore_t *runcore)>
-
-=cut
-
-*/
-
-static int
-is_pic_func(PARROT_INTERP, ARGIN(void **pc), ARGOUT(Parrot_MIC *mic),
-            ARGIN(Parrot_runcore_t *runcore))
-{
-    ASSERT_ARGS(is_pic_func)
-    /*
-     * if we have these opcodes
-     *
-     *   set_args '..' ...
-     *   set_p_pc Px, PFunx
-     *   get_results '..' ...
-     *   invokecc_p Px
-     *
-     * and all args are matching the called sub and we don't have
-     * too many args, and only INTVAL or FLOATVAL, the
-     * whole sequence is replaced by the C<callr> pic opcode.
-     *
-     * Oh, I forgot to mention - the to-be-called C function is of
-     * course compiled on-the-fly by the JIT compiler ;)
-     *
-     * pc is at set_args
-     */
-
-    PMC *sub, *sig_results;
-    opcode_t *op, n;
-    int flags;
-
-    PMC * const ctx      = CURRENT_CONTEXT(interp);
-    PMC * const sig_args = (PMC *)(pc[1]);
-
-    ASSERT_SIG_PMC(sig_args);
-    n                    = VTABLE_elements(interp, sig_args);
-    interp->current_args = (opcode_t*)pc + Parrot_pcc_get_pred_offset(interp, ctx);
-    pc                  += 2 + n;
-    op                   = (opcode_t*)pc + Parrot_pcc_get_pred_offset(interp, ctx);
-
-    if (*op != PARROT_OP_set_p_pc)
-        return 0;
-
-    do_prederef(pc, interp, runcore);
-    sub = (PMC *)(pc[2]);
-
-    PARROT_ASSERT(PObj_is_PMC_TEST(sub));
-
-    if (sub->vtable->base_type != enum_class_Sub)
-        return 0;
-
-    pc += 3;    /* results */
-    op  = (opcode_t *)pc + Parrot_pcc_get_pred_offset(interp, ctx);
-
-    if (*op != PARROT_OP_get_results_pc)
-        return 0;
-
-    do_prederef(pc, interp, runcore);
-    sig_results = (PMC *)(pc[1]);
-    ASSERT_SIG_PMC(sig_results);
-
-    Parrot_pcc_set_results(interp, ctx, (opcode_t *)pc + Parrot_pcc_get_pred_offset(interp, ctx));
-    if (!parrot_pic_is_safe_to_jit(interp, sub, sig_args, sig_results, &flags))
-        return 0;
-
-    mic->lru.f.real_function = parrot_pic_JIT_sub(interp, sub, flags);
-    mic->m.sig               = sig_args;
-
-    return 1;
-}
-
-/*
-
-=item C<void parrot_PIC_prederef(PARROT_INTERP, opcode_t op, void **pc_pred,
-Parrot_runcore_t *core)>
-
-Define either the normal prederef function or the PIC stub, if PIC for
-this opcode function is available. Called from C<do_prederef>.
-
-=cut
-
-*/
-
-void
-parrot_PIC_prederef(PARROT_INTERP, opcode_t op, ARGOUT(void **pc_pred),
-    ARGIN(Parrot_runcore_t *core))
-{
-    ASSERT_ARGS(parrot_PIC_prederef)
-    op_func_t * const prederef_op_func = interp->op_lib->op_func_table;
-    opcode_t  * const cur_opcode       = (opcode_t *)pc_pred;
-    Parrot_MIC       *mic              = NULL;
-
-    if (parrot_PIC_op_is_cached(op)) {
-        const PackFile_ByteCode * const cs = interp->code;
-        size_t                          n  = cur_opcode
-                                           - (opcode_t *)cs->prederef.code;
-
-        /*
-         * pic_index is half the size of the code
-         * XXX if it's there - pbc_merge needs updates
-         */
-        PARROT_ASSERT(cs->pic_index);
-        n   = cs->pic_index->data[n / 2];
-        mic = parrot_PIC_alloc_mic(interp, n);
-    }
-
-    switch (op) {
-        case PARROT_OP_get_params_pc:
-            if (is_pic_param(interp, pc_pred, mic, op)) {
-                pc_pred[1] = (void *)mic;
-                op         = PARROT_OP_pic_get_params___pc;
-            }
-            break;
-        case PARROT_OP_set_returns_pc:
-            if (is_pic_param(interp, pc_pred, mic, op)) {
-                pc_pred[1] = (void *)mic;
-                op         = PARROT_OP_pic_set_returns___pc;
-            }
-            break;
-        case PARROT_OP_set_args_pc:
-            if (is_pic_func(interp, pc_pred, mic, core)) {
-                pc_pred[1] = (void *)mic;
-                op         = PARROT_OP_pic_callr___pc;
-            }
-            break;
-        default:
-            break;
-    }
-
-    /* rewrite opcode */
-    if (PARROT_RUNCORE_PREDEREF_OPS_TEST(core)
-    && !PARROT_RUNCORE_CGOTO_OPS_TEST(core))
-        *pc_pred = (void **)op;
-    else
-        *pc_pred = ((void **)prederef_op_func)[op];
-}
-
-/*
-
-=item C<void parrot_pic_find_infix_v_pp(PARROT_INTERP, PMC *left, PMC *right,
-Parrot_MIC *mic, opcode_t *cur_opcode)>
-
-=cut
-
-*/
-
-void
-parrot_pic_find_infix_v_pp(PARROT_INTERP, ARGIN(PMC *left), ARGIN(PMC *right),
-                ARGOUT(Parrot_MIC *mic), ARGOUT(opcode_t *cur_opcode))
-{
-    ASSERT_ARGS(parrot_pic_find_infix_v_pp)
-    /* unused; deprecated */
-}
-
-/*
-
-=back
-
-=head1 AUTHOR
-
-Leopold Toetsch with many hints from Ken Fox.
-
-=head1 SEE ALSO
-
-L<src/multidispatch.c>, L<src/object.c>, L<src/interp/interpreter.c>,
-L<ops/core_ops_cgp.c>, L<include/parrot/pic.h>, L<ops/pic.ops>
-
-=cut
-
-*/
-
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Deleted: trunk/src/pic_jit.c
==============================================================================
--- trunk/src/pic_jit.c	Wed Sep 16 13:25:57 2009	(r41293)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,605 +0,0 @@
-/*
-Copyright (C) 2006-2009, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/pic_jit.c - Polymorphic Inline Cache to JIT compilation
-
-=head1 DESCRIPTION
-
-Some statically known and simple subroutines are replaced by
-their JITted variants, if
-
-  - JIT is supported and can JIT subroutines
-  - arguments passing is simple
-  - the code is fully JITtable
-  - and more such checks
-
-TODO:
-
-  - save jit_info in sub
-  - check for multiple calls to the same sub
-    either reuse code or create new
-  - handle void calls/returns
-
-=head2 Functions
-
-=over 4
-
-=cut
-
-*/
-
-#include "parrot/parrot.h"
-#include "parrot/oplib/ops.h"
-#include "pmc/pmc_sub.h"
-#include "parrot/runcore_api.h"
-
-/* HEADERIZER HFILE: include/parrot/pic.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-
-PARROT_WARN_UNUSED_RESULT
-static int args_match_params(PARROT_INTERP,
-    ARGIN(PMC *sig_args),
-    ARGIN(const PackFile_ByteCode *seg),
-    ARGIN(const opcode_t *start))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4);
-
-PARROT_WARN_UNUSED_RESULT
-static int call_is_safe(PARROT_INTERP,
-    ARGIN(PMC *sub_pmc),
-    ARGMOD(opcode_t **set_args))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*set_args);
-
-PARROT_WARN_UNUSED_RESULT
-static int jit_can_compile_sub(PARROT_INTERP, ARGIN(PMC *sub_pmc))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static int ops_jittable(PARROT_INTERP,
-    ARGIN(PMC *sub),
-    ARGIN(PMC *sig_results),
-    ARGIN(const PackFile_ByteCode *seg),
-    ARGIN(opcode_t *pc),
-    ARGIN(const opcode_t *end),
-    ARGOUT(int *flags))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        __attribute__nonnull__(6)
-        __attribute__nonnull__(7)
-        FUNC_MODIFIES(*flags);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-static opcode_t * pic_test_func(PARROT_INTERP,
-    SHIM(INTVAL *sig_bits),
-    ARGOUT(void **args))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*args);
-
-PARROT_WARN_UNUSED_RESULT
-static int returns_match_results(PARROT_INTERP,
-    ARGIN(PMC *sig_ret),
-    ARGIN(PMC *sig_result))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
-
-#define ASSERT_ARGS_args_match_params __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sig_args) \
-    || PARROT_ASSERT_ARG(seg) \
-    || PARROT_ASSERT_ARG(start)
-#define ASSERT_ARGS_call_is_safe __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sub_pmc) \
-    || PARROT_ASSERT_ARG(set_args)
-#define ASSERT_ARGS_jit_can_compile_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sub_pmc)
-#define ASSERT_ARGS_ops_jittable __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sub) \
-    || PARROT_ASSERT_ARG(sig_results) \
-    || PARROT_ASSERT_ARG(seg) \
-    || PARROT_ASSERT_ARG(pc) \
-    || PARROT_ASSERT_ARG(end) \
-    || PARROT_ASSERT_ARG(flags)
-#define ASSERT_ARGS_pic_test_func __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(args)
-#define ASSERT_ARGS_returns_match_results __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(sig_ret) \
-    || PARROT_ASSERT_ARG(sig_result)
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-/* HEADERIZER END: static */
-
-
-#ifdef HAVE_COMPUTED_GOTO
-#  include "parrot/oplib/core_ops_cgp.h"
-#endif
-
-#ifdef HAS_JIT
-#  include "parrot/exec.h"
-#  include "jit.h"
-
-extern const jit_arch_info *
-Parrot_jit_init(PARROT_INTERP);
-
-
-#  ifdef PIC_TEST
-/*
- * just for testing the whole scheme ...
-
-
-.sub main :main
-    .local int i
-    i = 32
-    i = __pic_test(i, 10)
-    print i
-    print "\n"
-.end
-.sub __pic_test
-    .param int i
-    .param int j
-    $I0 = i + j
-    .return ($I0)
-.end
-... prints 42, if PIC_TEST is 1, because the C function is called
-    with cgp and switch runcores.
-*/
-
-/*
-
-=item C<static opcode_t * pic_test_func(PARROT_INTERP, INTVAL *sig_bits, void
-**args)>
-
-Determines whether the given subroutine C<sub> can be JIT'd. Counts the
-number of registers used by the sub, and returns C<0> if more registers
-are used then JIT supports. Returns 1 if it does not use too many registers.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-static opcode_t *
-pic_test_func(PARROT_INTERP, SHIM(INTVAL *sig_bits), ARGOUT(void **args))
-{
-    ASSERT_ARGS(pic_test_func)
-    INTVAL * const result = (INTVAL*) args[0];
-    INTVAL   const i      = (INTVAL) args[1];
-    INTVAL   const j      = (INTVAL) args[2];
-
-    *result = i + j;
-
-    return args[3];
-}
-#  endif
-
-/*
-
-=item C<static int jit_can_compile_sub(PARROT_INTERP, PMC *sub_pmc)>
-
-Determines whether the given subroutine C<sub> can be JIT'd. Counts the
-number of registers used by the sub, and returns C<0> if more registers
-are used then JIT supports. Returns 1 if it does not use too many registers.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static int
-jit_can_compile_sub(PARROT_INTERP, ARGIN(PMC *sub_pmc))
-{
-    ASSERT_ARGS(jit_can_compile_sub)
-    const jit_arch_info * const info = Parrot_jit_init(interp);
-    const jit_arch_regs * const regs = info->regs + JIT_CODE_SUB_REGS_ONLY;
-    INTVAL                     *n_regs_used;
-    Parrot_Sub_attributes      *sub;
-
-    PMC_get_sub(interp, sub_pmc, sub);
-    n_regs_used = sub->n_regs_used;
-
-    /* if the sub is using more regs than the arch has
-     * we don't JIT it at all
-     */
-    if (n_regs_used[REGNO_INT] > regs->n_mapped_I)
-        return 0;
-
-    if (n_regs_used[REGNO_NUM] > regs->n_mapped_F)
-        return 0;
-
-    /* if the Sub is using S regs, we can't JIT it yet */
-    if (n_regs_used[REGNO_STR])
-        return 0;
-
-    /* if the Sub is using more than 1 P reg, we can't JIT it yet
-     * the P reg could be a (recursive) call to a sub
-     */
-    if (n_regs_used[REGNO_PMC] > 1)
-        return 0;
-
-    return 1;
-}
-
-
-/*
-
-=item C<static int args_match_params(PARROT_INTERP, PMC *sig_args, const
-PackFile_ByteCode *seg, const opcode_t *start)>
-
-Returns C<1> if the passed arguments match the subroutine's parameter list.
-Returns C<0> otherwise.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static int
-args_match_params(PARROT_INTERP, ARGIN(PMC *sig_args), ARGIN(const PackFile_ByteCode *seg),
-    ARGIN(const opcode_t *start))
-{
-    ASSERT_ARGS(args_match_params)
-    PMC *sig_params;
-    int  n, type;
-
-    if (*start != PARROT_OP_get_params_pc)
-        return 0;
-
-    sig_params = seg->const_table->constants[start[1]]->u.key;
-
-    /* verify that we actually can pass arguments */
-    ASSERT_SIG_PMC(sig_params);
-
-    n = parrot_pic_check_sig(interp, sig_args, sig_params, &type);
-
-    /* arg count mismatch */
-    if (n == -1)
-        return 0;
-
-    /* no args - this would be safe, if the JIT code could already
-    * deal with no args
-    * TODO
-    */
-    if (!n)
-        return 0;
-
-    switch (type & ~PARROT_ARG_CONSTANT) {
-        case PARROT_ARG_INTVAL:
-        case PARROT_ARG_FLOATVAL:
-            return 1;
-        default:
-            return 0;
-    }
-}
-
-/*
-
-=item C<static int returns_match_results(PARROT_INTERP, PMC *sig_ret, PMC
-*sig_result)>
-
-Returns 1 if the return values match the returned results. Returns C<0>
-otherwise.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static int
-returns_match_results(PARROT_INTERP, ARGIN(PMC *sig_ret), ARGIN(PMC *sig_result))
-{
-    ASSERT_ARGS(returns_match_results)
-    int type;
-    const int n = parrot_pic_check_sig(interp, sig_ret, sig_result, &type);
-
-    /* arg count mismatch */
-    if (n == -1)
-        return 0;
-
-    /* no args - this would be safe, if the JIT code could already
-     * deal with no args
-     * TODO
-     */
-    if (!n)
-        return 0;
-
-    switch (type & ~PARROT_ARG_CONSTANT) {
-        case PARROT_ARG_INTVAL:
-        case PARROT_ARG_FLOATVAL:
-            return 1;
-        default:
-            return 0;
-    }
-}
-
-/*
-
-=item C<static int call_is_safe(PARROT_INTERP, PMC *sub_pmc, opcode_t
-**set_args)>
-
-Returns C<1> if the passed arguments match the subroutine's parameter list.
-Returns C<0> otherwise.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static int
-call_is_safe(PARROT_INTERP, ARGIN(PMC *sub_pmc), ARGMOD(opcode_t **set_args))
-{
-    ASSERT_ARGS(call_is_safe)
-    PMC        *called, *sig_results;
-    Parrot_Sub_attributes *sub;
-    PMC        *sig_args;
-    opcode_t   *pc  = *set_args;
-
-    PMC_get_sub(interp, sub_pmc, sub);
-    sig_args = sub->seg->const_table->constants[pc[1]]->u.key;
-
-    /* ignore the signature for now */
-    pc += 2 + VTABLE_elements(interp, sig_args);
-
-    if (*pc != PARROT_OP_set_p_pc)
-       return 0;
-
-    called = sub->seg->const_table->constants[pc[2]]->u.key;
-
-    /* we can JIT just recursive subs for now */
-    if (called != sub_pmc)
-        return 0;
-
-    pc += 3;
-
-    if (*pc != PARROT_OP_get_results_pc)
-        return 0;
-
-    sig_results  = sub->seg->const_table->constants[pc[1]]->u.key;
-    pc          += 2 + VTABLE_elements(interp, sig_results);
-
-    if (*pc != PARROT_OP_invokecc_p)
-        return 0;
-
-    pc        += 2;
-    *set_args  = pc;
-
-    return 1;
-}
-
-/*
-
-=item C<static int ops_jittable(PARROT_INTERP, PMC *sub, PMC *sig_results, const
-PackFile_ByteCode *seg, opcode_t *pc, const opcode_t *end, int *flags)>
-
-Returns 1 if the return values match the returned results. Returns C<0>
-otherwise.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static int
-ops_jittable(PARROT_INTERP, ARGIN(PMC *sub), ARGIN(PMC *sig_results),
-        ARGIN(const PackFile_ByteCode *seg), ARGIN(opcode_t *pc),
-        ARGIN(const opcode_t *end), ARGOUT(int *flags))
-{
-    ASSERT_ARGS(ops_jittable)
-    while (pc < end) {
-        /* special opcodes which are handled, but not marked as JITtable */
-        int i;
-
-        const int               op      = *pc;
-        const op_info_t * const op_info = interp->op_info_table + op;
-        int                     n       = op_info->op_count;
-
-        switch (op) {
-            case PARROT_OP_returncc:
-            case PARROT_OP_get_params_pc:
-                goto op_is_ok;
-                break;
-            case PARROT_OP_set_returns_pc:
-                {
-                PMC * const sig_ret = seg->const_table->constants[pc[1]]->u.key;
-                if (!returns_match_results(interp, sig_ret, sig_results))
-                    return 0;
-                }
-                goto op_is_ok;
-                break;
-            case PARROT_OP_set_args_pc:
-                /* verify call, return address after the call */
-                if (!call_is_safe(interp, sub, &pc))
-                    return 0;
-                *flags |= JIT_CODE_RECURSIVE;
-                continue;
-            default:
-                /* non-jitted or JITted vtable */
-                if (op_jit[op].extcall != 0)
-                    return 0;
-                break;
-        }
-        /*
-         * there are some JITted opcodes like set_s_s, which we can't
-         * handle (yet)
-         */
-        for (i = 1; i < n; i++) {
-            const int type = op_info->types[i - 1];
-            switch (type) {
-                case PARROT_ARG_I:
-                case PARROT_ARG_N:
-                case PARROT_ARG_IC:
-                case PARROT_ARG_NC:
-                    break;
-                default:
-                    return 0;
-            }
-        }
-op_is_ok:
-        ADD_OP_VAR_PART(interp, seg, pc, n);
-        pc += n;
-    }
-    return 1;
-}
-
-#endif     /* HAS_JIT */
-
-
-/*
-
-=item C<int parrot_pic_is_safe_to_jit(PARROT_INTERP, PMC *sub_pmc, PMC
-*sig_args, PMC *sig_results, int *flags)>
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-int
-parrot_pic_is_safe_to_jit(PARROT_INTERP, ARGIN(PMC *sub_pmc), ARGIN(PMC *sig_args),
-        ARGIN(PMC *sig_results), ARGOUT(int *flags))
-{
-    ASSERT_ARGS(parrot_pic_is_safe_to_jit)
-#ifdef HAS_JIT
-    opcode_t   *base, *start, *end;
-    Parrot_Sub_attributes *sub;
-
-    *flags = 0;
-
-    /*
-     * 0) if runcore setting doesn't contain JIT
-     *    forget it
-     */
-    if (!(PARROT_RUNCORE_JIT_OPS_TEST(interp->run_core)))
-        return 0;
-
-    /* 1) if the JIT system can't JIT_CODE_SUB_REGS_ONLY
-     *    or the sub is using too many registers
-     */
-    if (!jit_can_compile_sub(interp, sub_pmc))
-        return 0;
-
-    /*
-     * 2) check if get_params is matching set_args
-     */
-
-    PMC_get_sub(interp, sub_pmc, sub);
-    base  = sub->seg->base.data;
-    start = base + sub->start_offs;
-    end   = base + sub->end_offs;
-
-    if (!args_match_params(interp, sig_args, sub->seg, start))
-        return 0;
-
-    /*
-     * 3) verify if all opcodes are JITtable, also check set_returns
-     *   if it's reached
-     */
-    if (!ops_jittable(interp, sub_pmc, sig_results, sub->seg, start, end, flags))
-        return 0;
-
-    return 1;
-#else
-    UNUSED(interp);
-    UNUSED(sub_pmc);
-    UNUSED(sig_args);
-    UNUSED(sig_results);
-    UNUSED(flags);
-
-    return 0;
-#endif
-}
-
-/*
-
-=item C<funcptr_t parrot_pic_JIT_sub(PARROT_INTERP, PMC *sub_pmc, int flags)>
-
-=cut
-
-*/
-
-funcptr_t
-parrot_pic_JIT_sub(PARROT_INTERP, ARGIN(PMC *sub_pmc), int flags)
-{
-    ASSERT_ARGS(parrot_pic_JIT_sub)
-#ifdef HAS_JIT
-#  ifdef PIC_TEST
-    UNUSED(interp);
-    UNUSED(sub_pmc);
-    return (funcptr_t) pic_test_func;
-#  else
-    /*
-     * create JIT code - just a test
-     */
-    Parrot_Sub_attributes *sub;
-    opcode_t              *base;
-    opcode_t              *start;
-    opcode_t              *end;
-    Parrot_jit_info_t     *jit_info;
-
-    PMC_get_sub(interp, sub_pmc, sub);
-    base  = sub->seg->base.data;
-    start = base + sub->start_offs;
-    end   = base + sub->end_offs;
-    /* TODO pass Sub */
-
-    jit_info = parrot_build_asm(interp,
-                         start, end, NULL, JIT_CODE_SUB_REGS_ONLY | flags);
-
-    if (!jit_info)
-        return NULLfunc;
-
-    return (funcptr_t) jit_info->arena.start;
-#  endif
-#else
-    UNUSED(interp);
-    UNUSED(sub_pmc);
-    UNUSED(flags);
-
-    return NULLfunc;
-#endif
-}
-
-
-/*
-
-=back
-
-=head1 AUTHOR
-
-Leopold Toetsch
-
-=head1 SEE ALSO
-
-F<src/pic.c>, F<src/jit.c>, F<ops/core_ops_cgp.c>,
-F<include/parrot/pic.h>, F<ops/pic.ops>
-
-=cut
-
-*/
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Modified: trunk/src/pmc/eval.pmc
==============================================================================
--- trunk/src/pmc/eval.pmc	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/pmc/eval.pmc	Wed Sep 16 13:25:57 2009	(r41294)
@@ -211,12 +211,6 @@
             cur_cs->fixups = NULL;
         }
 
-        seg = cur_cs->pic_index;
-        if (seg) {
-            PackFile_Segment_destroy(INTERP, seg);
-            cur_cs->pic_index = NULL;
-        }
-
 /* XXX Commenting out this to fix TT #995 and related problems.
  * May leak some memory, need further revision.
 
@@ -271,10 +265,6 @@
             PackFile_add_segment(INTERP, &pf->directory,
                     (PackFile_Segment *)seg->fixups);
 
-        if (seg->pic_index)
-            PackFile_add_segment(INTERP, &pf->directory,
-                    (PackFile_Segment *)seg->pic_index);
-
         size = PackFile_pack_size(INTERP, pf) * sizeof (opcode_t);
 
         /*

Modified: trunk/src/runcore/cores.c
==============================================================================
--- trunk/src/runcore/cores.c	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/runcore/cores.c	Wed Sep 16 13:25:57 2009	(r41294)
@@ -1030,19 +1030,11 @@
 
             ADD_OP_VAR_PART(interp, interp->code, pc, n);
 
-            /* count ops that need a PIC */
-            if (parrot_PIC_op_is_cached(*pc))
-                n_pics++;
-
             pc += n;
             i  += n;
         }
 
         interp->code->prederef.code = temp;
-
-        /* allocate pic store, which starts from 1 */
-        if (n_pics)
-            parrot_PIC_alloc_store(interp->code, n_pics + 1);
     }
 
     return NULL;

Modified: trunk/src/runcore/main.c
==============================================================================
--- trunk/src/runcore/main.c	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/src/runcore/main.c	Wed Sep 16 13:25:57 2009	(r41294)
@@ -365,8 +365,11 @@
 
     prederef_args(pc_prederef, interp, pc, opinfo);
 
-    if (PARROT_RUNCORE_PREDEREF_OPS_TEST(runcore))
-        parrot_PIC_prederef(interp, *pc, pc_prederef, interp->run_core);
+    if (PARROT_RUNCORE_PREDEREF_OPS_TEST(runcore)) {
+        *pc_prederef = PARROT_RUNCORE_CGOTO_OPS_TEST(runcore)
+            ? ((void **)interp->op_lib->op_func_table)[*pc]
+            : (void**)*pc;
+    }
     else
         Parrot_ex_throw_from_c_args(interp, NULL, 1,
             "Tried to prederef wrong core");

Modified: trunk/t/tools/pbc_dump.t
==============================================================================
--- trunk/t/tools/pbc_dump.t	Wed Sep 16 13:10:51 2009	(r41293)
+++ trunk/t/tools/pbc_dump.t	Wed Sep 16 13:25:57 2009	(r41294)
@@ -46,10 +46,10 @@
         plan skip_all => "pbc_dump hasn't been built. Run make parrot_utils";
         exit(0);
     }
-    plan tests => 7;
+    plan tests => 6;
 }
 
-dump_output_like( <<PIR, "pir", [qr/FIXUP_t/, qr/PIC_idx/, qr/CONSTANT_t/, qr/BYTECODE_t/], 'pbc_dump basic sanity');
+dump_output_like( <<PIR, "pir", [qr/FIXUP_t/, qr/CONSTANT_t/, qr/BYTECODE_t/], 'pbc_dump basic sanity');
 .sub main :main
     \$I0 = 42
 .end


More information about the parrot-commits mailing list