Skip to content

Commit

Permalink
Store both nqp::jvmgetproperties and nqp::backendconfig in $*VM on JVM.
Browse files Browse the repository at this point in the history
This exposes information needed by NativeCall in $*VM.
  • Loading branch information
arnsholt committed Mar 13, 2014
1 parent 22a53c2 commit eebf846
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/terms.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }
$key = nqp::p6box_s(nqp::iterkey_s($envelem));
%PROPS{$key} = nqp::p6box_s(nqp::iterval($envelem));
}
my %CONFIG;
$jenv := nqp::backendconfig();
$enviter := nqp::iterator($jenv);
while $enviter {
$envelem := nqp::shift($enviter);
$key = nqp::p6box_s(nqp::iterkey_s($envelem));
%CONFIG{$key} = nqp::p6box_s(nqp::iterval($envelem));
}
my $VM = {
name => 'jvm',
properties => %PROPS,
config => %CONFIG,
}
#?endif
#?if moar
Expand Down

0 comments on commit eebf846

Please sign in to comment.