Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement CompUnit::Loader.load-precompilation
Needs an NQP bump
  • Loading branch information
niner committed May 9, 2016
1 parent df4eb8d commit 2699601
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/CompUnit/Loader.pm
Expand Up @@ -41,7 +41,11 @@ class CompUnit::Loader is repr('Uninstantiable') {
# Load the specified byte buffer as if it was the contents of a
# precompiled file
method load-precompilation(Buf:D $bytes) returns CompUnit::Handle {
... # XXX this one needs MoarVM/JVM backends to expose a new API
my $*CTXSAVE := self;
my %*COMPILING := nqp::hash();
my Mu $*MAIN_CTX;
nqp::loadbytecodebuffer($bytes);
CompUnit::Handle.new($*MAIN_CTX)
}

method ctxsave() {
Expand Down

0 comments on commit 2699601

Please sign in to comment.