Skip to content

Instantly share code, notes, and snippets.

nine@sphinx:~/test/resources> cat META6.json
{
"name": "Foo",
"provides": {"Foo": "Foo.pm6"},
"resources": ["foo.txt"]
}
nine@sphinx:~/test/resources> cat Foo.pm6
unit module Foo;
sub get-resources() is export { %?RESOURCES }
nine@sphinx:~/test/resources> perl6 -I. -e 'use Foo; dd get-resources'
diff --git a/src/core/CompUnit/PrecompilationRepository.pm b/src/core/CompUnit/PrecompilationRepository.pm
index 8fb1ee4..f911b3e 100644
--- a/src/core/CompUnit/PrecompilationRepository.pm
+++ b/src/core/CompUnit/PrecompilationRepository.pm
@@ -209,7 +209,7 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
"--source-name=$source-name",
$path,
:out,
- :err,
+ #:err,
diff --git a/src/core/CompUnit/PrecompilationRepository.pm b/src/core/CompUnit/PrecompilationRepository.pm
index 8fb1ee4..f911b3e 100644
--- a/src/core/CompUnit/PrecompilationRepository.pm
+++ b/src/core/CompUnit/PrecompilationRepository.pm
@@ -209,7 +209,7 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
"--source-name=$source-name",
$path,
:out,
- :err,
+ #:err,
diff --git a/src/vm/jvm/HLL/Backend.nqp b/src/vm/jvm/HLL/Backend.nqp
index 4c32e70..18dae14 100644
--- a/src/vm/jvm/HLL/Backend.nqp
+++ b/src/vm/jvm/HLL/Backend.nqp
@@ -61,7 +61,7 @@ class HLL::Backend::JVM {
method jast($qast, *%adverbs) {
my $classname := %*COMPILING<%?OPTIONS><javaclass> || nqp::sha1('eval-at-' ~ nqp::time_n() ~ $compile_count++);
- nqp::getcomp('QAST').jast($qast, :$classname);
+ nqp::getcomp('QAST').jast($qast, :$classname, |%adverbs);
- QAST::CompUnit :UNIT<?> :W<?>
[post_deserialize]
- QAST::Stmts
- QAST::Op(bind)
- QAST::Var(attribute $!do)
- QAST::WVal(Block)
- QAST::WVal(Code)
- QAST::BVal(8)
- QAST::Op(bindcurhllsym)
- QAST::SVal(GLOBAL)
diff --git a/src/core/control.pm b/src/core/control.pm
index ff4980f..b1d915f 100644
--- a/src/core/control.pm
+++ b/src/core/control.pm
@@ -218,6 +218,14 @@ proto sub EVAL(Cool $code, Str() :$lang = 'perl6', PseudoStash :$context, *%n) {
:global(GLOBAL),
:mast_frames(mast_frames),
);
+ note $compiler.compile(
+ $code.Stringy,
diff --git a/src/core/CompUnit/PrecompilationRepository.pm b/src/core/CompUnit/PrecompilationRepository.pm
index d6df7f6..751d04e 100644
--- a/src/core/CompUnit/PrecompilationRepository.pm
+++ b/src/core/CompUnit/PrecompilationRepository.pm
@@ -206,7 +206,7 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
"--source-name=$source-name",
$path,
:out,
- :err,
+ #:err,
diff --git a/src/vm/jvm/QAST/Compiler.nqp b/src/vm/jvm/QAST/Compiler.nqp
index bcf1ac3..3a095e3 100644
--- a/src/vm/jvm/QAST/Compiler.nqp
+++ b/src/vm/jvm/QAST/Compiler.nqp
@@ -3366,7 +3366,9 @@ class QAST::CompilerJAST {
}
# If we need to do deserialization, emit code for that.
+ nqp::sayfh(nqp::getstderr(), $*COMP_MODE || "no comp mode");
if $*COMP_MODE {
45 16303 RMD: Loading precompiled
/home/nine/rakudo/lib/.precomp/19F2AA1829F3C8518AA81732068262A8B72201A1.1.463304534528E9/80/800617FCD1541F247DDCF31618EC0009477E7CD1
u8 loadPrecompiled() 807534
loadClass()[B@75074aac
62 16303 RMD: Performing imports for 'Test'
13 16303 RMD: Imports for 'Test' done
no comp mode
deserializeQbid: 2
have a desCodeRef!
loadbytecode(ModuleLoader.class)
Program received signal SIGSEGV, Segmentation fault.
MVM_gc_root_temp_push_slow (tc=tc@entry=0x6037c0, obj_ref=obj_ref@entry=0x7fffffffd158) at src/gc/roots.c:187
187 tc->temproots[tc->num_temproots] = obj_ref;
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.22-7.2.x86_64 perl-base-debuginfo-5.22.1-1.2.x86_64 perl-debuginfo-5.22.1-1.2.x86_64
(gdb) bt
#0 MVM_gc_root_temp_push_slow (tc=tc@entry=0x6037c0, obj_ref=obj_ref@entry=0x7fffffffd158) at src/gc/roots.c:187
#1 0x00007ffff78de6dd in MVM_gc_root_temp_push (obj_ref=0x7fffffffd158, tc=0x6037c0) at src/gc/roots.h:27
#2 MVM_frame_invoke (tc=<optimized out>, static_frame=<optimized out>, callsite=0x7ffff7dca760 <inv_arg_callsite>, args=0x7311a8, outer=<optimized out>, code_ref=<optimized out>, spesh_cand=-1) at src/core/frame.c:557
#3 0x00007ffff791df63 in invoke_handler (tc=<optimized out>, invokee=<optimized out>, callsite=<optimized out>, args=<optimized out>) at src/6model/reprs/MVMCode.c:10
#4 0x00007ffff78d6506 in MVM_interp