Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into new_make
  • Loading branch information
bacek committed Mar 11, 2012
2 parents e916eda + f2d0311 commit 607cd33
Show file tree
Hide file tree
Showing 14 changed files with 59,870 additions and 56,381 deletions.
6 changes: 6 additions & 0 deletions src/6model/serialization.c
Expand Up @@ -53,6 +53,7 @@
static INTVAL smo_id = 0;
static INTVAL nqp_lexpad_id = 0;
static INTVAL perl6_lexpad_id = 0;
static INTVAL ctmthunk_id = 0;

/* ***************************************************************************
* Serialization (writing related)
Expand Down Expand Up @@ -420,6 +421,10 @@ void write_ref_func(PARROT_INTERP, SerializationWriter *writer, PMC *ref) {
* we just drop it. */
discrim = REFVAR_VM_NULL;
}
else if (ref->vtable->base_type == ctmthunk_id) {
/* Another example of a generated cache/thunk that we should not serialize. */
discrim = REFVAR_VM_NULL;
}
else if (ref->vtable->base_type == enum_class_CallContext) {
/* XXX This is a hack for Rakudo's sake; it keeps a CallContext around in
* the lexpad, for no really good reason. */
Expand Down Expand Up @@ -960,6 +965,7 @@ STRING * Serialization_serialize(PARROT_INTERP, PMC *sc, PMC *empty_string_heap)
smo_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "SixModelObject", 0));
nqp_lexpad_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "NQPLexInfo", 0));
perl6_lexpad_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "Perl6LexInfo", 0));
ctmthunk_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "CTMThunk", 0));

/* Initialize string heap so first entry is the NULL string. */
VTABLE_push_string(interp, empty_string_heap, STRINGNULL);
Expand Down
2 changes: 1 addition & 1 deletion src/HLL/Compiler.pm
Expand Up @@ -617,7 +617,7 @@ class HLL::Compiler {
# If we've previously cached C<linepos> for target, we use it.
unless cache goto linepos_build
linepos = getprop '!linepos', target
linepos = getprop target, '!linepos'
unless null linepos goto linepos_done
# calculate a new linepos array.
Expand Down
4 changes: 2 additions & 2 deletions src/NQPQ/World.pm
Expand Up @@ -250,7 +250,7 @@ class NQP::World is HLL::World {
$fixups.push(PAST::Op.new(
:pirop('assign vPP'),
self.get_slot_past_for_object($clone),
PAST::Val.new( :value(pir::getprop__PsP('PAST', $orig)) )
PAST::Val.new( :value(pir::getprop__PPs($orig, 'PAST')) )
));
});
}
Expand Down Expand Up @@ -340,7 +340,7 @@ class NQP::World is HLL::World {
$fixups.push(PAST::Op.new(
:pirop('assign vPP'),
self.get_slot_past_for_object($clone),
PAST::Val.new( :value(pir::getprop__PsP('PAST', $meth)) )
PAST::Val.new( :value(pir::getprop__PPs($meth, 'PAST')) )
));

# Result is the cloned method that will be fixed up.
Expand Down
4 changes: 2 additions & 2 deletions src/Regex/Cursor-protoregex-peek.pir
Expand Up @@ -158,9 +158,9 @@ create a new one and return it.
# new one.
.local pmc type_obj, prototable
type_obj = get_what self
prototable = getprop '%!prototable', type_obj
prototable = getprop type_obj, '%!prototable'
if null prototable goto make_prototable
$P0 = getprop '$!generation', prototable
$P0 = getprop prototable, '$!generation'
$I0 = issame $P0, generation
if $I0 goto have_prototable
make_prototable:
Expand Down
4 changes: 2 additions & 2 deletions src/core/NQPRoutine.pm
Expand Up @@ -20,7 +20,7 @@ my knowhow NQPRoutine {
pir::set_sub_code_object__vPP($do, $der);

# If needed, arrange for a fixup of the cloned code-ref.
my $clone_callback := pir::getprop__PsP('CLONE_CALLBACK', $!do);
my $clone_callback := pir::getprop__PPs($!do, 'CLONE_CALLBACK');
if pir::defined($clone_callback) {
$clone_callback($!do, $do, $der);
}
Expand All @@ -37,7 +37,7 @@ my knowhow NQPRoutine {
pir::set_sub_code_object__vPP($do, $der);

# If needed, arrange for a fixup of the cloned code-ref.
my $clone_callback := pir::getprop__PsP('CLONE_CALLBACK', $!do);
my $clone_callback := pir::getprop__PPs($!do, 'CLONE_CALLBACK');
if pir::defined($clone_callback) {
$clone_callback($!do, $do, $der);
}
Expand Down
2 changes: 1 addition & 1 deletion src/how/NQPClassHOW.pm
Expand Up @@ -233,7 +233,7 @@ knowhow NQPClassHOW {
my @new_dispatchees;
@new_dispatchees[0] := $code;
my $new_disp := pir::create_dispatch_and_add_candidates__PPP($dispatcher, @new_dispatchees);
my $clone_callback := pir::getprop__PsP('CLONE_CALLBACK', $dispatcher);
my $clone_callback := pir::getprop__PPs($dispatcher, 'CLONE_CALLBACK');
if pir::defined($clone_callback) {
$clone_callback($dispatcher, $new_disp);
}
Expand Down

0 comments on commit 607cd33

Please sign in to comment.