Skip to content

Commit

Permalink
Remove some unnecessary details from LexInfo. Hash.init_int sets the …
Browse files Browse the repository at this point in the history
…destroy and mark flags, so no need to re-set them. Don't do the gymnastics for making LexInfo const, the flag is worthless now
  • Loading branch information
Whiteknight committed Jun 26, 2011
1 parent 8a9654e commit 796766d
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/pmc/lexinfo.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ pmclass LexInfo extends Hash provides hash no_ro auto_attrs {

/*

=item C<void class_init()>

Manipulate vtable->flags so that constant PMCs are created.
If your inherited LexInfo is not so constant, then don't
do that and provide a mark() method and set the custom_mark flag.

=item C<init_pmc(PMC *sub)>

Initialize the LexInfo PMC and remember the associate
Expand All @@ -47,23 +41,14 @@ subroutine.

*/

void class_init() {

/* there is no pmclass const_pmc flag yet */
INTERP->vtables[entry]->flags |= VTABLE_IS_CONST_PMC_FLAG;

}

VTABLE void init() {
SELF.init_pmc(PMCNULL);
/* Set value type to INTVAL */
SELF.init_int((INTVAL)enum_type_INTVAL);
}

VTABLE void init_pmc(PMC *sub) {
PARROT_ASSERT(PObj_constant_TEST(SELF));

/* Set value type to INTVAL */
SELF.init_int((INTVAL)enum_type_INTVAL);
PObj_custom_mark_destroy_SETALL(SELF);
}

/*
Expand Down

0 comments on commit 796766d

Please sign in to comment.