Skip to content
This repository
Browse code

Replace one use of nqp_get_package_through_who.

This op really needs to go away.
  • Loading branch information...
commit da26f1c22f0dea4beb895956837f84eac3e8d6a9 1 parent 28961ee
Jonathan Worthington jnthn authored

Showing 1 changed file with 11 additions and 1 deletion. Show diff stats Hide diff stats

  1. +11 1 src/NQP/World.pm
12 src/NQP/World.pm
@@ -173,7 +173,17 @@ class NQP::World is HLL::World {
173 173 # Install symbol immediately.
174 174 my $target := $package;
175 175 for @sym {
176   - $target := pir::nqp_get_package_through_who__PPs($target, $_);
  176 + if nqp::existskey($target.WHO, $_) {
  177 + $target := nqp::atkey($target.WHO, $_);
  178 + }
  179 + else {
  180 + my $pkgtype := nqp::existskey(%*HOW, 'package')
  181 + ?? nqp::atkey(%*HOW, 'package')
  182 + !! nqp::atkey(%*HOW, 'knowhow');
  183 + my $pkg := $pkgtype.new_type(:name($_));
  184 + $pkg.HOW.compose($pkg);
  185 + $target := nqp::bindkey($target.WHO, $_, $pkg);
  186 + }
177 187 }
178 188 ($target.WHO){$name} := $obj;
179 189 }

0 comments on commit da26f1c

Please sign in to comment.
Something went wrong with that request. Please try again.