Skip to content

Commit

Permalink
Start to use nqp::execname on the JVM backend
Browse files Browse the repository at this point in the history
The op is now available in Rakudo. (It's only NQP on the
JVM backend that still needs a bootstrap.)
  • Loading branch information
usev6 committed Aug 14, 2020
1 parent a84952f commit 3ba803d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/Perl6/SysConfig.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ class Perl6::SysConfig is HLL::SysConfig {
%!rakudo-build-config := nqp::hash();

# Determine Rakudo home.
#?if jvm
# TODO could be replaced by nqp::execname() after the next bootstrap for JVM
my $execname := nqp::atkey(nqp::jvmgetproperties,'perl6.execname') // '';
#?endif
#?if !jvm
my $execname := nqp::execname();
#?endif
my $install-dir := $execname eq ''
?? %!rakudo-build-config<prefix>
!! nqp::substr($execname, 0, nqp::rindex($execname, self.path-sep, nqp::rindex($execname, self.path-sep) - 1));
Expand Down
6 changes: 2 additions & 4 deletions src/core.c/Process.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ Rakudo::Internals.REGISTER-DYNAMIC: '$*RAKUDO_MODULE_DEBUG', {

Rakudo::Internals.REGISTER-DYNAMIC: '$*EXECUTABLE', {
PROCESS::<$EXECUTABLE> := IO::Path.new(:CWD(INIT nqp::cwd()),
nqp::execname()
#?if jvm
$*VM.properties<perl6.execname>
// $*VM.properties<perl6.prefix> ~ '/bin/perl6-j'
|| $*VM.properties<perl6.prefix> ~ '/bin/perl6-j'
#?endif
#?if moar
nqp::execname()
|| ($*VM.config<prefix> ~ '/bin/'
~ ($*VM.config<osname> eq 'MSWin32' ?? 'perl6-m.exe' !! 'perl6-m'))
#?endif
#?if js
nqp::execname()
// ($*VM.config<prefix> ~ '/bin/'
~ ($*VM.config<osname> eq 'MSWin32' ?? 'perl6-js.bat' !! 'perl6-js'))
#?endif
Expand Down

0 comments on commit 3ba803d

Please sign in to comment.