Skip to content

Commit

Permalink
Remove obsolete CompUnit::precomp
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Nov 15, 2015
1 parent 6f4b5b5 commit ce27a92
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/core/CompUnit.pm
Expand Up @@ -73,43 +73,6 @@ class CompUnit {
$!has-precomp ?? $*VM.precomp-ext !! $!extension;
}

method precomp(CompUnit:D:
$out = self.precomp-path,
:$INC = @*INC,
:$force,
) {

my $io = $out.IO;
die "Cannot pre-compile over a newer existing file: $out"
if $io.e && !$force && $io.modified > $!path.modified;

my Mu $opts := nqp::atkey(%*COMPILING, '%?OPTIONS');
my $lle = !nqp::isnull($opts) && !nqp::isnull(nqp::atkey($opts, 'll-exception'))
?? ' --ll-exception'
!! '';
%*ENV<RAKUDO_PRECOMP_WITH> = CREATE-INCLUDE-SPECS(@$INC);

RAKUDO_MODULE_DEBUG("Precomping with %*ENV<RAKUDO_PRECOMP_WITH>")
if $*RAKUDO_MODULE_DEBUG;

my $cmd = "$*EXECUTABLE$lle --target={$*VM.precomp-target} --output=$out $!path";
my $proc = shell("$cmd 2>&1", :out, :!chomp);
%*ENV<RAKUDO_PRECOMP_WITH>:delete;

my $result = '';
$result ~= $_ for $proc.out.lines;
$proc.out.close;
if $proc.status -> $status { # something wrong
$result ~= "Return status $status\n";
fail $result if $result;
}
note $result if $result;


$!has-precomp = True if $out eq self.precomp-path;
True;
}

method load(CompUnit:D: :$line) {
$global.protect( {
my int $DEBUG = $*RAKUDO_MODULE_DEBUG;
Expand Down

0 comments on commit ce27a92

Please sign in to comment.