Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replace remaining perl6ize_type uses with hllize.
  • Loading branch information
jnthn committed Apr 9, 2013
1 parent 5de401d commit 879a068
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/Perl6/Actions.pm
Expand Up @@ -81,7 +81,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
'if', 1,
'unless', 1,
'handle', 1,
'p6type', 1,
'hllize', 1,
);
sub autosink($past) {
nqp::istype($past, QAST::Op) && %sinkable{$past.op} && !$past<nosink>
Expand Down Expand Up @@ -3690,7 +3690,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
method term:sym<dotty>($/) {
my $past := $<dotty>.ast;
$past.unshift(QAST::Var.new( :name('$_'), :scope('lexical') ) );
make QAST::Op.new( :op('p6type'), $past);
make QAST::Op.new( :op('hllize'), $past);
}

sub find_macro_routine(@symbol) {
Expand Down Expand Up @@ -4244,7 +4244,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
# If may be an adverb.
if $<colonpair> {
my $target := $past := $/[0].ast;
if nqp::istype($target, QAST::Op) && $target.op eq 'p6type' {
if nqp::istype($target, QAST::Op) && $target.op eq 'hllize' {
$target := $target[0];
}
unless nqp::istype($target, QAST::Op) && ($target.op eq 'call' || $target.op eq 'callmethod') {
Expand Down Expand Up @@ -4274,7 +4274,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
$past := whatever_curry($/, (my $orig := $past), $key eq 'INFIX' ?? 2 !! 1);
if $return_map && $orig =:= $past {
$past := QAST::Op.new($past,
:op('p6type'), :returns($past.returns()));
:op('hllize'), :returns($past.returns()));
}
}
make $past;
Expand Down Expand Up @@ -4450,7 +4450,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
# Finally, just need to make a bind.
make QAST::Op.new( :op('bind'), $target, $source );
}
elsif $target.isa(QAST::Op) && $target.op eq 'p6type' &&
elsif $target.isa(QAST::Op) && $target.op eq 'hllize' &&
$target[0].isa(QAST::Op) && $target[0].op eq 'callmethod' &&
($target[0].name eq 'postcircumfix:<[ ]>' || $target[0].name eq 'postcircumfix:<{ }>') {
$source.named('BIND');
Expand Down
1 change: 0 additions & 1 deletion src/Perl6/Ops.pm
Expand Up @@ -12,7 +12,6 @@ $ops.add_hll_pirop_mapping('perl6', 'p6listitems', 'perl6_listitems', 'PP', :inl
$ops.add_hll_pirop_mapping('perl6', 'p6decont', 'perl6_decontainerize', 'PP', :inlinable(1));
$ops.add_hll_pirop_mapping('perl6', 'p6recont_ro', 'perl6_recontainerize_to_ro', 'PP', :inlinable(1));
$ops.add_hll_pirop_mapping('perl6', 'p6store', 'perl6_container_store', '0PP', :inlinable(1));
$ops.add_hll_pirop_mapping('perl6', 'p6type', 'perl6ize_type', 'PP', :inlinable(1));
$ops.add_hll_pirop_mapping('perl6', 'p6takedisp', 'perl6_take_dispatcher', 'v');
$ops.add_hll_pirop_mapping('perl6', 'p6var', 'perl6_var', 'PP', :inlinable(1));
$ops.add_hll_pirop_mapping('perl6', 'p6reprname', 'perl6_repr_name', 'PP', :inlinable(1));
Expand Down
2 changes: 1 addition & 1 deletion src/core/Cursor.pm
Expand Up @@ -20,7 +20,7 @@ my class Cursor does NQPCursorRole {
my Mu $capiter := nqp::iterator($caphash);
while $capiter {
my str $key = nqp::shift_s($capiter);
my Mu $value := nqp::p6type(nqp::atkey($caphash, $key));
my Mu $value := nqp::hllize(nqp::atkey($caphash, $key));
if $key eq '$!from' || $key eq '$!to' {
nqp::bindattr_i($match, Match, $key, $value.from);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Exception.pm
Expand Up @@ -209,7 +209,7 @@ do {
$err.print: $ex;
$err.print: "\n";
}
$_() for nqp::p6type(@*END_PHASERS);
$_() for nqp::hllize(@*END_PHASERS);
}
if $! {
pir::perl6_based_rethrow__0PP(nqp::getattr(nqp::p6decont($!), Exception, '$!ex'), $ex);
Expand Down
4 changes: 2 additions & 2 deletions src/core/Parameter.pm
Expand Up @@ -23,12 +23,12 @@ my class Parameter {

method constraint_list() {
nqp::isnull($!post_constraints) ?? () !!
nqp::p6type($!post_constraints)
nqp::hllize($!post_constraints)
}

method constraints() {
all(nqp::isnull($!post_constraints) ?? () !!
nqp::p6type($!post_constraints))
nqp::hllize($!post_constraints))
}

method type() {
Expand Down
4 changes: 2 additions & 2 deletions src/core/Routine.pm
Expand Up @@ -21,7 +21,7 @@ my class Routine {

method candidates() {
self.is_dispatcher ??
nqp::p6type($!dispatchees) !!
nqp::hllize($!dispatchees) !!
(self,)
}

Expand All @@ -37,7 +37,7 @@ my class Routine {
# Call this lexical sub to get rid of 'self' in the signature.
sub checker(|) {
my Mu $cap := pir::find_lex__Ps('call_sig');
nqp::p6type($disp.find_best_dispatchee($cap, 1))
nqp::hllize($disp.find_best_dispatchee($cap, 1))
}
checker(|$c);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/control.pm
Expand Up @@ -158,7 +158,7 @@ multi sub eval(Str $code, :$lang = 'perl6', PseudoStash :$context) {


sub exit($status = 0) {
$_() for nqp::p6type(@*END_PHASERS);
$_() for nqp::hllize(@*END_PHASERS);
nqp::exit(nqp::unbox_i($status.Int));
$status;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/terms.pm
Expand Up @@ -43,7 +43,7 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }

my $VM = {
name => 'parrot', # XXX: should be made dynamical
config => nqp::p6type(
config => nqp::hllize(
nqp::atpos(pir::getinterp__P, pir::const::IGLOBALS_CONFIG_HASH))
}
nqp::bindkey(nqp::who(PROCESS), '$VM', $VM);
Expand Down
2 changes: 1 addition & 1 deletion src/core/traits.pm
Expand Up @@ -144,7 +144,7 @@ multi trait_mod:<is>(Parameter:D $param, :$parcel!) {

sub EXPORT_SYMBOL(\exp_name, @tags, Mu \sym) {
my @export_packages = $*EXPORT;
for nqp::p6type(@*PACKAGES) {
for nqp::hllize(@*PACKAGES) {
unless .WHO.exists('EXPORT') {
.WHO<EXPORT> := Metamodel::PackageHOW.new_type(:name('EXPORT'));
.WHO<EXPORT>.^compose;
Expand Down

0 comments on commit 879a068

Please sign in to comment.