Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
First round of pir::perl6ize_type => nqp::hllize.
  • Loading branch information
jnthn committed Apr 9, 2013
1 parent 78665ec commit 5de401d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/Perl6/Metamodel/BOOTSTRAP.pm
Expand Up @@ -995,8 +995,9 @@ BEGIN {
else {
my $param;
if $got_prim == $BIND_VAL_OBJ {
$param := pir::perl6ize_type__PP(
nqp::captureposarg($capture, $i));
$param := nqp::hllizefor(
nqp::captureposarg($capture, $i),
'perl6');
}
else {
$param := $got_prim == $BIND_VAL_INT ?? Int !!
Expand Down
2 changes: 1 addition & 1 deletion src/Perl6/Metamodel/ClassHOW.pm
Expand Up @@ -234,7 +234,7 @@ class Perl6::Metamodel::ClassHOW
method find_method_fallback($obj, $name) {
# If the object is a junction, need to do a junction dispatch.
if $obj.WHAT =:= $junction_type && $junction_autothreader {
my $p6name := pir::perl6ize_type__PP($name);
my $p6name := nqp::hllizefor($name, 'perl6');
return -> *@pos_args, *%named_args {
$junction_autothreader($p6name, |@pos_args, |%named_args)
};
Expand Down
4 changes: 2 additions & 2 deletions src/Perl6/Metamodel/MultipleInheritance.pm
Expand Up @@ -45,9 +45,9 @@ role Perl6::Metamodel::MultipleInheritance {
for @!parents {
my @pt := [$_];
@pt.push($_.HOW.parents($_, :tree(1)));
@result.push(pir::perl6ize_type__PP(@pt).Array.item);
@result.push(nqp::hllizefor(@pt, 'perl6').Array.item);
}
return pir::perl6ize_type__PP(@result);
return nqp::hllizefor(@result, 'perl6');
}
else {
# All parents is MRO minus the first thing (which is us).
Expand Down
12 changes: 6 additions & 6 deletions src/Perl6/World.pm
Expand Up @@ -35,16 +35,16 @@ sub p6ize_recursive($x) {
for $x {
nqp::push(@copy, p6ize_recursive($_));
}
return pir::perl6ize_type__PP(@copy);
return nqp::hllizefor(@copy, 'perl6');
}
elsif nqp::ishash($x) {
my %copy := nqp::hash();
for $x {
%copy{$_.key} := p6ize_recursive($_.value);
}
return pir::perl6ize_type__PP(%copy).item;
return nqp::hllizefor(%copy, 'perl6').item;
}
pir::perl6ize_type__PP($x);
nqp::hllizefor($x, 'perl6');
}

# this levenshtein implementation is used to suggest good alternatives
Expand Down Expand Up @@ -2425,12 +2425,12 @@ class Perl6::World is HLL::World {
if nqp::islist($p.value) {
my @a := [];
for $p.value {
nqp::push(@a, pir::perl6ize_type__PP($_));
nqp::push(@a, nqp::hllizefor($_, 'perl6'));
}
%opts{$p.key} := pir::perl6ize_type__PP(@a);
%opts{$p.key} := nqp::hllizefor(@a, 'perl6');
}
else {
%opts{$p.key} := pir::perl6ize_type__PP($p.value);
%opts{$p.key} := nqp::hllizefor($p.value, 'perl6');
}
}
my $file := nqp::getlexdyn('$?FILES');
Expand Down
2 changes: 1 addition & 1 deletion src/core/CallFrame.pm
Expand Up @@ -18,7 +18,7 @@ my class CallFrame {
level = repr_unbox_int $P0
annon = interp["annotations"; level]
%r = perl6ize_type annon
%r = nqp_hllize annon
}
);
Expand Down

0 comments on commit 5de401d

Please sign in to comment.