Skip to content

Commit

Permalink
added QAST::VM variants for moar idential to jvm
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed Oct 28, 2013
1 parent 6838abf commit 753af50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/Perl6/Actions.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,8 @@ class Perl6::Actions is HLL::Actions does STDActions {
QAST::Op.new( :op('null') ),
QAST::Op.new( :op('exception') )
)),
:jvm(QAST::Op.new( :op('null') ))
:jvm(QAST::Op.new( :op('null') )),
:moar(QAST::Op.new( :op('null') ))
),
QAST::WVal.new(
:value( $*W.find_symbol(['Nil']) ),
Expand Down Expand Up @@ -5778,7 +5779,8 @@ class Perl6::Actions is HLL::Actions does STDActions {
:pirop('perl6_skip_handlers_in_rethrow__0Pi'),
$ex,
QAST::IVal.new( :value(1) ))),
:jvm($ex));
:jvm($ex),
:moar($ex));
}
else {
my $prev_content := QAST::Stmts.new();
Expand All @@ -5797,6 +5799,10 @@ class Perl6::Actions is HLL::Actions does STDActions {
:jvm(QAST::Op.new(
:op('rethrow'),
QAST::Op.new( :op('exception') )
)),
:moar(QAST::Op.new(
:op('rethrow'),
QAST::Op.new( :op('exception') )
)))));

# rethrow the exception if we reach the end of the handler
Expand Down
9 changes: 6 additions & 3 deletions src/Perl6/World.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ class Perl6::World is HLL::World {
:op('loadbytecode'),
QAST::VM.new(
:parrot(QAST::SVal.new( :value('ModuleLoader.pbc') )),
:jvm(QAST::SVal.new( :value('ModuleLoader.class') ))
:jvm(QAST::SVal.new( :value('ModuleLoader.class') )),
:moar(QAST::SVal.new( :value('ModuleLoader.moarvm') ))
)),
QAST::Op.new(
:op('callmethod'), :name('load_module'),
Expand Down Expand Up @@ -1787,7 +1788,8 @@ class Perl6::World is HLL::World {
'bit_ops', 'math_ops', 'trans_ops', 'io_ops',
'obscure_ops', 'os', 'file', 'sys_ops',
'nqp_bigint_ops', 'nqp_dyncall_ops' ],
jvm => QAST::Op.new( :op('null') )));
jvm => QAST::Op.new( :op('null') ),
moar => QAST::Op.new( :op('null') )));
}

# Represents a longname after having parsed it.
Expand Down Expand Up @@ -2392,7 +2394,8 @@ class Perl6::World is HLL::World {
QAST::VM.new( :pirop('get_class Ps'), QAST::SVal.new( :value('NQPLexPad') ) )
)
)),
:jvm(QAST::Op.new( :op('null') ))
:jvm(QAST::Op.new( :op('null') )),
:moar(QAST::Op.new( :op('null') ))
)));
}
}
Expand Down

0 comments on commit 753af50

Please sign in to comment.