[svn:parrot] r43085 - in branches/pmc_freeze_cleanup: include/parrot src
darbelo at svn.parrot.org
darbelo at svn.parrot.org
Wed Dec 16 05:20:59 UTC 2009
Author: darbelo
Date: Wed Dec 16 05:20:58 2009
New Revision: 43085
URL: https://trac.parrot.org/parrot/changeset/43085
Log:
Remove the last_type member from the visit_info structure.
This sligtly increases the size of 'frozen' agregates with many PMCs of the same type.
Modified:
branches/pmc_freeze_cleanup/include/parrot/pmc_freeze.h
branches/pmc_freeze_cleanup/src/pmc_freeze.c
Modified: branches/pmc_freeze_cleanup/include/parrot/pmc_freeze.h
==============================================================================
--- branches/pmc_freeze_cleanup/include/parrot/pmc_freeze.h Wed Dec 16 04:43:37 2009 (r43084)
+++ branches/pmc_freeze_cleanup/include/parrot/pmc_freeze.h Wed Dec 16 05:20:58 2009 (r43085)
@@ -64,7 +64,6 @@
size_t input_length; /* */
INTVAL what;
PMC **thaw_ptr; /* where to thaw a new PMC */
- INTVAL last_type;
PMC *seen; /* seen hash */
PMC *todo; /* todo list */
PMC *id_list; /* seen list used by thaw */
Modified: branches/pmc_freeze_cleanup/src/pmc_freeze.c
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc_freeze.c Wed Dec 16 04:43:37 2009 (r43084)
+++ branches/pmc_freeze_cleanup/src/pmc_freeze.c Wed Dec 16 05:20:58 2009 (r43085)
@@ -274,7 +274,6 @@
enum {
enum_PackID_normal = 0,
enum_PackID_seen = 1,
- enum_PackID_prev_type = 2,
enum_PackID_extra_info = 3
};
@@ -450,7 +449,6 @@
static void
push_opcode_pmc(PARROT_INTERP, ARGIN(visit_info *io), ARGIN(PMC *v)) {
- ASSERT_ARGS(push_opcode_pmc)
io->thaw_ptr = &v;
(io->visit_pmc_now)(interp, v, io);
}
@@ -531,7 +529,6 @@
PARROT_CANNOT_RETURN_NULL
static PMC *
shift_opcode_pmc(PARROT_INTERP, ARGIN(visit_info *io)) {
- ASSERT_ARGS(shift_opcode_pmc)
PMC *result;
io->thaw_ptr = &result;
(io->visit_pmc_now)(interp, NULL, io);
@@ -582,7 +579,6 @@
static void
todo_list_init(PARROT_INTERP, ARGOUT(visit_info *info), ARGIN(STRING *input))
{
- ASSERT_ARGS(todo_list_init)
/* We want to store a 16-byte aligned header, but the actual
* header may be shorter. */
const unsigned int header_length = PACKFILE_HEADER_BYTES +
@@ -633,7 +629,6 @@
info->pos += header_length;
}
- info->last_type = -1;
info->id_list = pmc_new(interp, enum_class_Array);
info->id = 0;
info->extra_flags = EXTRA_IS_NULL;
@@ -681,15 +676,12 @@
PackID_set_FLAGS(id, enum_PackID_seen);
}
- else if (type == info->last_type)
- PackID_set_FLAGS(id, enum_PackID_prev_type);
VTABLE_push_integer(interp, info, id);
if (PackID_get_FLAGS(id) == enum_PackID_normal) {
/* write type */
VTABLE_push_integer(interp, info, type);
- info->last_type = type;
}
}
@@ -736,15 +728,10 @@
case enum_PackID_seen:
seen = 1;
break;
- case enum_PackID_prev_type:
- /* prev PMC was same type */
- *type = info->last_type;
- break;
default:
/* type follows */
{
*type = VTABLE_shift_integer(interp, info);
- info->last_type = *type;
if (*type <= 0)
Parrot_ex_throw_from_c_args(interp, NULL, 1,
More information about the parrot-commits
mailing list