Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make nqp::backendconfig available for all backends
  • Loading branch information
FROGGS committed Oct 28, 2013
1 parent 0d34a3e commit ffcebf9
Show file tree
Hide file tree
Showing 24 changed files with 91,597 additions and 91,373 deletions.
4 changes: 3 additions & 1 deletion src/vm/jvm/HLL/Backend.nqp
@@ -1,11 +1,13 @@
# Backend class for the JVM.
class HLL::Backend::JVM {
our %jvm_config := nqp::backendconfig();

method apply_transcodings($s, $transcode) {
$s
}

method config() {
nqp::jvmgetconfig()
%jvm_config
}

method force_gc() {
Expand Down
2 changes: 1 addition & 1 deletion src/vm/jvm/QAST/Compiler.nqp
Expand Up @@ -2477,7 +2477,7 @@ QAST::OperationsJAST.map_classlib_core_op('continuationinvoke', $TYPE_OPS, 'cont
QAST::OperationsJAST.map_classlib_core_op('jvmeqaddr', $TYPE_OPS, 'jvmeqaddr', [$RT_OBJ, $RT_OBJ], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('jvmisnull', $TYPE_OPS, 'jvmisnull', [$RT_OBJ], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('jvmbootinterop', $TYPE_OPS, 'jvmbootinterop', [], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('jvmgetconfig', $TYPE_OPS, 'jvmgetconfig', [], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('backendconfig', $TYPE_OPS, 'jvmgetconfig', [], $RT_OBJ, :tc);

# Native call ops
QAST::OperationsJAST.map_classlib_core_op('initnativecall', $TYPE_NATIVE_OPS, 'init', [], $RT_INT);
Expand Down
Binary file modified src/vm/jvm/stage0/JASTNodes.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/ModuleLoader.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/NQPCORE.setting.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/NQPHLL.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/NQPP6QRegex.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/QAST.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/QASTNode.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/QRegex.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/nqp.jar
Binary file not shown.
Binary file modified src/vm/jvm/stage0/nqpmo.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/vm/parrot/HLL/Backend.nqp
@@ -1,6 +1,6 @@
# Backend class for Parrot.
class HLL::Backend::Parrot {
our %parrot_config := pir::getinterp__P()[pir::const::IGLOBALS_CONFIG_HASH];
our %parrot_config := nqp::backendconfig();

method apply_transcodings($s, $transcode) {
for nqp::split(' ', $transcode) {
Expand Down
2 changes: 1 addition & 1 deletion src/vm/parrot/ModuleLoader.nqp
Expand Up @@ -24,7 +24,7 @@ knowhow ModuleLoader {
nqp::push(@search_paths, 'blib');

# Add NQP langauge directory.
my %conf := pir::getinterp__P()[pir::const::IGLOBALS_CONFIG_HASH];
my %conf := nqp::backendconfig();
nqp::push(@search_paths, %conf<libdir> ~ %conf<versiondir> ~
'/languages/nqp/lib');

Expand Down
11 changes: 11 additions & 0 deletions src/vm/parrot/NQP/Ops.nqp
Expand Up @@ -101,3 +101,14 @@ $ops.add_hll_op('nqp', 'falsey', -> $qastcomp, $op {
}
$ops
});

# pir::getinterp__P()[pir::const::IGLOBALS_CONFIG_HASH];
$ops.add_hll_op('nqp', 'backendconfig', -> $qastcomp, $op {
$qastcomp.as_post(
QAST::VarWithFallback.new(
:scope('positional'), :fallback(QAST::Op.new( :op('list') )),
QAST::VM.new( :pirop('getinterp__P') ),
QAST::VM.new( :pirconst('IGLOBALS_CONFIG_HASH') )
)
)
});
30,659 changes: 15,293 additions & 15,366 deletions src/vm/parrot/stage0/HLL-s0.pir

Large diffs are not rendered by default.

0 comments on commit ffcebf9

Please sign in to comment.