Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support --javaclass option on selfhost.
  • Loading branch information
jnthn committed Apr 15, 2013
1 parent 39e3a72 commit d8d3f2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nqp-src/NQP.pm
Expand Up @@ -3423,6 +3423,7 @@ $nqpcomp.language('nqp');
$nqpcomp.parsegrammar(NQP::Grammar);
$nqpcomp.parseactions(NQP::Actions);
hll-config($nqpcomp.config);
$nqpcomp.addstage('classname', :after<start>);

# Add extra command line options.
my @clo := $nqpcomp.commandline_options();
Expand All @@ -3434,6 +3435,7 @@ my @clo := $nqpcomp.commandline_options();
@clo.push('no-regex-lib');
@clo.push('dynext=s');
@clo.push('stable-sc');
@clo.push('javaclass=s');

sub MAIN(*@ARGS) {
# Enter the compiler.
Expand Down
3 changes: 2 additions & 1 deletion nqp-src/NQPHLL.pm
Expand Up @@ -910,7 +910,8 @@ class HLL::Backend::JVM {
}

method jast($qast, *%adverbs) {
nqp::getcomp('qast').jast($qast, :classname(nqp::sha1('eval-at-' ~ nqp::time_n())));
my $classname := %*COMPILING<%?OPTIONS><javaclass> || nqp::sha1('eval-at-' ~ nqp::time_n());
nqp::getcomp('qast').jast($qast, :$classname);
}

method classfile($jast, *%adverbs) {
Expand Down

0 comments on commit d8d3f2f

Please sign in to comment.