Skip to content

Instantly share code, notes, and snippets.

@timo

timo/nqp.patch Secret

Created October 1, 2013 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timo/0432e2d7abbcf4c3dce9 to your computer and use it in GitHub Desktop.
Save timo/0432e2d7abbcf4c3dce9 to your computer and use it in GitHub Desktop.
diff --git a/src/HLL/Compiler.nqp b/src/HLL/Compiler.nqp
index 436e2e8..32f96f8 100644
--- a/src/HLL/Compiler.nqp
+++ b/src/HLL/Compiler.nqp
@@ -347,9 +347,9 @@ class HLL::Compiler does HLL::Backend::Default {
return 0;
}
- method compile($source, :$from, *%adverbs) {
+ method compile($source, :$from, :$lpcache, *%adverbs) {
my %*COMPILING<%?OPTIONS> := %adverbs;
- my $*LINEPOSCACHE;
+ my $*LINEPOSCACHE := $lpcache;
my $target := nqp::lc(%adverbs<target>);
my $result := $source;
diff --git a/src/Perl6/World.nqp b/src/Perl6/World.nqp
index 63aba15..4736e26 100644
--- a/src/Perl6/World.nqp
+++ b/src/Perl6/World.nqp
@@ -1276,7 +1276,7 @@ class Perl6::World is HLL::World {
$wrapper
);
my $comp := nqp::getcomp('perl6');
- my $precomp := $comp.compile($compunit, :from<optimize>, :compunit_ok(1));
+ my $precomp := $comp.compile($compunit, :from<optimize>, :lpcache($*LINEPOSCACHE), :compunit_ok(1));
my $mainline := $comp.backend.compunit_mainline($precomp);
$mainline();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment