Skip to content

Commit 36cf9ca

Browse files
committed
Use normal compilation chain when doing dynamic compilation, which means we don't miss adding various directives we need to get .const thingies. Fixes serialization of QRegex, though all the tests fail.
1 parent abd4d49 commit 36cf9ca

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/NQP/World.pm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,11 @@ class NQP::World is HLL::World {
193193
my $stub_code := sub (*@args, *%named) {
194194
# Do the compilation.
195195
self.set_nqp_language_defaults($past);
196-
my $compiled := PAST::Compiler.compile($past);
197-
196+
my $nqpcomp := pir::compreg__Ps('nqp');
197+
my $post := $nqpcomp.post($past);
198+
my $pir := $nqpcomp.pir($post);
199+
my $compiled := $nqpcomp.evalpmc($pir);
200+
198201
# Fix up any code objects holding stubs with the real compiled thing.
199202
my $c := nqp::elems($compiled);
200203
my $i := 0;

0 commit comments

Comments
 (0)