[svn:parrot] r45844 - trunk/src/pmc
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Wed Apr 21 07:33:48 UTC 2010
Author: plobsing
Date: Wed Apr 21 07:33:47 2010
New Revision: 45844
URL: https://trac.parrot.org/parrot/changeset/45844
Log:
eliminate LexInfo.thaw that was almost an exact duplicate of Hash.thaw
Modified:
trunk/src/pmc/lexinfo.pmc
Modified: trunk/src/pmc/lexinfo.pmc
==============================================================================
--- trunk/src/pmc/lexinfo.pmc Wed Apr 21 07:12:43 2010 (r45843)
+++ trunk/src/pmc/lexinfo.pmc Wed Apr 21 07:33:47 2010 (r45844)
@@ -56,11 +56,6 @@
}
VTABLE void init() {
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
- "Cannot create a LexInfo PMC without an initializer");
- }
-
- VTABLE void init_pmc(PMC *sub) {
PARROT_ASSERT(PObj_constant_TEST(SELF));
/* Set value type to INTVAL */
@@ -68,6 +63,11 @@
PObj_custom_mark_destroy_SETALL(SELF);
}
+ VTABLE void init_pmc(PMC *sub) {
+ UNUSED(sub);
+ SELF.init();
+ }
+
/*
=item C<void declare_lex_preg(STRING *name, INTVAL preg)>
@@ -125,41 +125,6 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"Unknown introspection value '%S'", what);
}
-
-/*
-
-=item C<void visit(PMC *info)>
-
-=item C<void freeze(PMC *info)>
-
-=item C<void thaw(PMC *info)>
-
-Freeze/thaw interface used during freeze/thaw of the Sub PMC.
-The implementation of the Hash PMC is called.
-
-=cut
-
-*/
-
-
- VTABLE void thaw(PMC *info) {
- const INTVAL elems = VTABLE_shift_integer(INTERP, info);
- const INTVAL k_type = VTABLE_shift_integer(INTERP, info);
- const INTVAL v_type = VTABLE_shift_integer(INTERP, info);
- Hash *hash;
-
- UNUSED(k_type);
- UNUSED(v_type);
-
- PARROT_ASSERT(v_type == enum_hash_int);
- /* TODO make a better interface for hash creation
- * TODO create hash with needed types in the first place
- */
-
- SELF.init_pmc(NULL);
- hash = (Hash *)SELF.get_pointer();
- hash->entries = elems;
- }
}
@@ -169,7 +134,7 @@
=head1 SEE ALSO
-F<docs/pdds/pdd20_lexical_vars.pod>, F<src/classes/lexpad.pmc>.
+F<docs/pdds/pdd20_lexical_vars.pod>, F<src/pmc/lexpad.pmc>.
=cut
More information about the parrot-commits
mailing list