[svn:parrot] r43698 - in branches/pmc_freeze_with_pmcs: include/parrot src

darbelo at svn.parrot.org darbelo at svn.parrot.org
Mon Feb 1 23:32:39 UTC 2010


Author: darbelo
Date: Mon Feb  1 23:32:39 2010
New Revision: 43698
URL: https://trac.parrot.org/parrot/changeset/43698

Log:
Remove unnecessary definitions and headers. This code lives in the PMC now.

Modified:
   branches/pmc_freeze_with_pmcs/include/parrot/pmc_freeze.h
   branches/pmc_freeze_with_pmcs/src/pmc_freeze.c

Modified: branches/pmc_freeze_with_pmcs/include/parrot/pmc_freeze.h
==============================================================================
--- branches/pmc_freeze_with_pmcs/include/parrot/pmc_freeze.h	Mon Feb  1 23:21:43 2010	(r43697)
+++ branches/pmc_freeze_with_pmcs/include/parrot/pmc_freeze.h	Mon Feb  1 23:32:39 2010	(r43698)
@@ -40,53 +40,11 @@
 #define VISIT_THAW_NORMAL    (VISIT_HOW_VISITOR_TO_PMC | VISIT_WHAT_PMC)
 #define VISIT_THAW_CONSTANTS VISIT_THAW_NORMAL
 
-struct _visit_info;
-typedef INTVAL   (*get_integer_f)   (PARROT_INTERP, struct _visit_info*);
-typedef void     (*push_integer_f)  (PARROT_INTERP, struct _visit_info*, INTVAL);
-typedef void     (*push_string_f)   (PARROT_INTERP, struct _visit_info*, STRING*);
-typedef void     (*push_number_f)   (PARROT_INTERP, struct _visit_info*, FLOATVAL);
-typedef void     (*push_pmc_f)      (PARROT_INTERP, struct _visit_info*, PMC*);
-typedef INTVAL   (*shift_integer_f) (PARROT_INTERP, struct _visit_info*);
-typedef STRING*  (*shift_string_f)  (PARROT_INTERP, struct _visit_info*);
-typedef FLOATVAL (*shift_number_f)  (PARROT_INTERP, struct _visit_info*);
-typedef PMC*     (*shift_pmc_f)     (PARROT_INTERP, struct _visit_info*);
-
-typedef struct _image_funcs {
-    get_integer_f       get_integer;
-    push_integer_f      push_integer;
-    push_string_f       push_string;
-    push_number_f       push_float;
-    push_pmc_f          push_pmc;
-    shift_integer_f     shift_integer;
-    shift_string_f      shift_string;
-    shift_number_f      shift_float;
-    shift_pmc_f         shift_pmc;
-} image_funcs;
-
 typedef enum {
     EXTRA_IS_NULL,
     EXTRA_IS_PROP_HASH,
 } extra_flags_enum;
 
-typedef struct _visit_info {
-    visit_f             visit_pmc_now;
-    size_t              pos;            /* current read/write position in buffer */
-    Buffer             *buffer;
-    size_t              input_length;   /* */
-    INTVAL              what;
-    PMC               **thaw_ptr;       /* where to thaw a new PMC */
-    PMC                *seen;           /* seen hash */
-    PMC                *todo;           /* todo list */
-    PMC                *id_list;        /* seen list used by thaw */
-    UINTVAL             id;             /* freze ID of PMC */
-    INTVAL              extra_flags;    /* concerning to extra */
-    struct PackFile    *pf;
-    const image_funcs  *vtable;
-    struct _visit_info *image_io;       /* dummy backwards-compat pointer. */
-} visit_info;
-
-#define IMAGE_IO visit_info
-
 #define VISIT_PMC(interp, visit, pmc) do {\
     const INTVAL _visit_pmc_flags = VTABLE_get_integer((interp), (visit)); \
     if (_visit_pmc_flags & VISIT_WHAT_PMC) { \

Modified: branches/pmc_freeze_with_pmcs/src/pmc_freeze.c
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc_freeze.c	Mon Feb  1 23:21:43 2010	(r43697)
+++ branches/pmc_freeze_with_pmcs/src/pmc_freeze.c	Mon Feb  1 23:32:39 2010	(r43698)
@@ -18,10 +18,6 @@
 Container PMCs call a "todo-callback" for all contained PMCs. The
 individual action vtable (freeze/thaw) is then called for all todo-PMCs.
 
-In the current implementation C<visit_info> is a stand-in for some kind of
-serializer PMC which will eventually be written. It associates a Parrot
-C<STRING> with a vtable.
-
 =cut
 
 */
@@ -30,144 +26,6 @@
 #include "pmc/pmc_callcontext.h"
 #include "pmc_freeze.str"
 
-/* HEADERIZER HFILE: include/parrot/pmc_freeze.h */
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-
-static void create_buffer(PARROT_INTERP,
-    ARGIN_NULLOK(PMC *pmc),
-    ARGMOD(visit_info *info))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*info);
-
-PARROT_INLINE
-static void ensure_buffer_size(PARROT_INTERP,
-    ARGIN(visit_info *io),
-    size_t len)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-static INTVAL get_visit_integer(PARROT_INTERP, ARGIN(visit_info *io))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-PARROT_INLINE
-static INTVAL INFO_HAS_DATA(ARGIN(visit_info *io))
-        __attribute__nonnull__(1);
-
-PARROT_INLINE
-static INTVAL OUTPUT_LENGTH(ARGIN(visit_info *io))
-        __attribute__nonnull__(1);
-
-static void push_opcode_integer(PARROT_INTERP,
-    ARGIN(visit_info *io),
-    INTVAL v)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-static void push_opcode_number(PARROT_INTERP,
-    ARGIN(visit_info *io),
-    FLOATVAL v)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-static void push_opcode_string(PARROT_INTERP,
-    ARGIN(visit_info *io),
-    ARGIN(STRING *v))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
-
-static INTVAL shift_opcode_integer(SHIM_INTERP, ARGIN(visit_info *io))
-        __attribute__nonnull__(2);
-
-static FLOATVAL shift_opcode_number(SHIM_INTERP, ARGIN(visit_info *io))
-        __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING* shift_opcode_string(PARROT_INTERP, ARGIN(visit_info *io))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-static void visit_info_init(PARROT_INTERP,
-    ARGOUT(visit_info *info),
-    visit_enum_type what,
-    ARGIN(STRING *input),
-    ARGIN(PMC *pmc))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(4)
-        __attribute__nonnull__(5)
-        FUNC_MODIFIES(*info);
-
-static void visit_loop_todo_list(PARROT_INTERP,
-    ARGIN_NULLOK(PMC *current),
-    ARGIN(visit_info *info))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3);
-
-static void visit_todo_list_freeze(PARROT_INTERP,
-    ARGIN_NULLOK(PMC* pmc),
-    ARGIN(visit_info* info))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3);
-
-PARROT_INLINE
-static void visit_todo_list_thaw(PARROT_INTERP,
-    SHIM(PMC* pmc_not_used),
-    ARGIN(visit_info* info))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3);
-
-#define ASSERT_ARGS_create_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_ensure_buffer_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_get_visit_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_INFO_HAS_DATA __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_OUTPUT_LENGTH __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_push_opcode_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_push_opcode_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_push_opcode_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(io) \
-    , PARROT_ASSERT_ARG(v))
-#define ASSERT_ARGS_shift_opcode_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_shift_opcode_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_shift_opcode_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_visit_info_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info) \
-    , PARROT_ASSERT_ARG(input) \
-    , PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_visit_loop_todo_list __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_visit_todo_list_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_visit_todo_list_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-/* HEADERIZER END: static */
-
 /* when thawing a string longer then this size, we first do a GC run and then
  * block GC - the system can't give us more headers */
 


More information about the parrot-commits mailing list