Skip to content

Commit 4ed8005

Browse files
committed
[js] Adapt to evaling of JavaScript changes
1 parent 9c6178d commit 4ed8005

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/HLL/Compiler.nqp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,12 @@ class HLL::Compiler does HLL::Backend::Default {
264264

265265
my $*LIBPATH;
266266
if %adverbs<libpath> {
267-
$*LIBPATH := nqp::split('|||', %adverbs<libpath>);
268-
nqp::getcomp('JavaScript').eval('(function(paths) {nqp.libpath(paths.array)})')($*LIBPATH);
267+
my $split := nqp::split('|||', %adverbs<libpath>);
268+
$*LIBPATH := nqp::list_s();
269+
for $split -> $str {
270+
nqp::push_s($*LIBPATH, $str);
271+
}
272+
nqp::getcomp('JavaScript').eval('return (function(paths) {nqp.libpath(paths)})')($*LIBPATH);
269273
}
270274

271275
my $*EXECNAME;

src/vm/js/HLL/Backend.nqp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class JavaScriptBackend {
277277
nqp::unlink($tmp_file);
278278
}
279279
} else {
280-
my $sourcemap := nqp::getcomp('JavaScript').eval('nqp.buildSourceMap')(
280+
my $sourcemap := nqp::getcomp('JavaScript').eval('return nqp.buildSourceMap')(
281281
$sourcemap_and_js.js,
282282
$sourcemap_and_js.p6-source,
283283
$sourcemap_and_js.mapping,

0 commit comments

Comments
 (0)