Skip to content

Commit bde6231

Browse files
committed
Use some nqp:: ops in ModuleLoader.
Some bits of it will want to be backend-specific, but may as well make the rest easier to share.
1 parent 8e78004 commit bde6231

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ModuleLoader.pm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ knowhow ModuleLoader {
5555
else {
5656
my $*CTXSAVE := self;
5757
my $*MAIN_CTX := ModuleLoader;
58-
my $preserve_global := pir::get_hll_global__Ps('GLOBAL');
59-
pir::load_bytecode__vs($path);
60-
pir::set_hll_global__vsP('GLOBAL', $preserve_global);
58+
my $preserve_global := nqp::getcurhllsym('GLOBAL');
59+
nqp::loadbytecode($path);
60+
nqp::bindcurhllsym('GLOBAL', $preserve_global);
6161
%modules_loaded{$path} := $module_ctx := $*MAIN_CTX;
6262
}
6363

@@ -151,9 +151,9 @@ knowhow ModuleLoader {
151151
unless nqp::existskey(%settings_loaded, $path) {
152152
my $*CTXSAVE := self;
153153
my $*MAIN_CTX := ModuleLoader;
154-
my $preserve_global := pir::get_hll_global__Ps('GLOBAL');
155-
pir::load_bytecode__vs($path);
156-
pir::set_hll_global__vsP('GLOBAL', $preserve_global);
154+
my $preserve_global := nqp::getcurhllsym('GLOBAL');
155+
nqp::loadbytecode($path);
156+
nqp::bindcurhllsym('GLOBAL', $preserve_global);
157157
unless nqp::defined($*MAIN_CTX) {
158158
nqp::die("Unable to load setting $setting_name; maybe it is missing a YOU_ARE_HERE?");
159159
}
@@ -169,4 +169,4 @@ knowhow ModuleLoader {
169169

170170
# Since this *is* the module loader, we can't locate it the normal way by
171171
# GLOBAL merging. So instead we stash it away in the Parrot namespace tree.
172-
pir::set_hll_global__vsP('ModuleLoader', ModuleLoader);
172+
nqp::bindcurhllsym('ModuleLoader', ModuleLoader);

0 commit comments

Comments
 (0)