[svn:parrot] r43255 - in branches/pmc_freeze_cleanup/src: . pmc
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Sat Dec 26 23:07:23 UTC 2009
Author: plobsing
Date: Sat Dec 26 23:07:22 2009
New Revision: 43255
URL: https://trac.parrot.org/parrot/changeset/43255
Log:
inline thawing property hashes into pmc_freeze.c + eliminate handling prophashes in PMCs
Modified:
branches/pmc_freeze_cleanup/src/pmc/class.pmc
branches/pmc_freeze_cleanup/src/pmc/default.pmc
branches/pmc_freeze_cleanup/src/pmc/object.pmc
branches/pmc_freeze_cleanup/src/pmc/parrotinterpreter.pmc
branches/pmc_freeze_cleanup/src/pmc_freeze.c
Modified: branches/pmc_freeze_cleanup/src/pmc/class.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/class.pmc Sat Dec 26 22:06:47 2009 (r43254)
+++ branches/pmc_freeze_cleanup/src/pmc/class.pmc Sat Dec 26 23:07:22 2009 (r43255)
@@ -1496,10 +1496,7 @@
* anonymous class and later decide whether to link it into the
* namespace. */
- if (info->extra_flags == EXTRA_IS_PROP_HASH) {
- SUPER(info);
- }
- else if (info->extra_flags == EXTRA_IS_NULL) {
+ if (info->extra_flags == EXTRA_IS_NULL) {
/* 1) thaw class id */
const INTVAL id = VTABLE_shift_integer(INTERP, info);
Modified: branches/pmc_freeze_cleanup/src/pmc/default.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/default.pmc Sat Dec 26 22:06:47 2009 (r43254)
+++ branches/pmc_freeze_cleanup/src/pmc/default.pmc Sat Dec 26 23:07:22 2009 (r43255)
@@ -1110,12 +1110,7 @@
VTABLE void thaw(visit_info *info) {
/* default - initialize the PMC */
- if (info->extra_flags == EXTRA_IS_PROP_HASH) {
- info->thaw_ptr = &PMC_metadata(SELF);
- (info->visit_pmc_now)(INTERP, PMC_metadata(SELF), info);
- }
- else
- SELF.init();
+ SELF.init();
}
/*
Modified: branches/pmc_freeze_cleanup/src/pmc/object.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/object.pmc Sat Dec 26 22:06:47 2009 (r43254)
+++ branches/pmc_freeze_cleanup/src/pmc/object.pmc Sat Dec 26 23:07:22 2009 (r43255)
@@ -761,9 +761,7 @@
*/
VTABLE void thaw(visit_info *info) {
- if (info->extra_flags == EXTRA_IS_PROP_HASH) {
- SUPER(info);
- }
+ return;
}
/*
Modified: branches/pmc_freeze_cleanup/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc/parrotinterpreter.pmc Sat Dec 26 22:06:47 2009 (r43254)
+++ branches/pmc_freeze_cleanup/src/pmc/parrotinterpreter.pmc Sat Dec 26 23:07:22 2009 (r43255)
@@ -720,10 +720,7 @@
}
VTABLE void thaw(visit_info *info) {
- if (info->extra_flags == EXTRA_IS_PROP_HASH) {
- SUPER(info);
- }
- else if (info->extra_flags == EXTRA_IS_NULL) {
+ if (info->extra_flags == EXTRA_IS_NULL) {
if (!PMC_data(SELF)) {
Parrot_ParrotInterpreter_attributes *attrs =
Modified: branches/pmc_freeze_cleanup/src/pmc_freeze.c
==============================================================================
--- branches/pmc_freeze_cleanup/src/pmc_freeze.c Sat Dec 26 22:06:47 2009 (r43254)
+++ branches/pmc_freeze_cleanup/src/pmc_freeze.c Sat Dec 26 23:07:22 2009 (r43255)
@@ -782,15 +782,14 @@
}
if (pos) {
+ PARROT_ASSERT(must_have_seen);
+
if (info->extra_flags == EXTRA_IS_PROP_HASH) {
- interp->vtables[enum_class_default]->thaw(interp, pmc, info);
+ info->thaw_ptr = &PMC_metadata(pmc);
+ (info->visit_pmc_now)(interp, PMC_metadata(pmc), info);
return;
}
- /* else maybe VTABLE_thaw ... but there is no other extra stuff */
-
- PARROT_ASSERT(must_have_seen);
-
*info->thaw_ptr = pmc;
return;
}
More information about the parrot-commits
mailing list