Skip to content

Commit

Permalink
Fix state, START.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jul 14, 2012
1 parent 39bd6cf commit e08c1dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/QPerl6/Actions.pm
Expand Up @@ -1417,7 +1417,7 @@ class QPerl6::Actions is HLL::Actions {
}
if $*SCOPE eq 'state' {
$past := QAST::Op.new( :op('if'),
PAST::Op.new( :pirop('perl6_state_needs_init I') ),
QAST::Op.new( :op('p6stateinit') ),
$past,
$orig_past);
}
Expand Down Expand Up @@ -1461,7 +1461,7 @@ class QPerl6::Actions is HLL::Actions {
}
if $*SCOPE eq 'state' {
$list := QAST::Op.new( :op('if'),
PAST::Op.new( :pirop('perl6_state_needs_init I') ),
QAST::Op.new( :op('p6stateinit') ),
$list, $orig_list);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/QPerl6/Ops.pm
Expand Up @@ -33,6 +33,7 @@ $ops.add_hll_pirop_mapping('perl6', 'p6capturelex', 'perl6_capture_lex', '0P');
$ops.add_hll_pirop_mapping('perl6', 'p6vmcodetoobj', 'perl6_code_object_from_parrot_sub', 'PP');
$ops.add_hll_pirop_mapping('perl6', 'p6bindassert', 'perl6_assert_bind_ok', '0PP');
$ops.add_hll_pirop_mapping('perl6', 'p6getpackage', 'perl6_get_package_through_who', 'PPs');
$ops.add_hll_pirop_mapping('perl6', 'p6stateinit', 'perl6_state_needs_init', 'I');

# Boxing and unboxing configuration.
QAST::Operations.add_hll_box('perl6', 'i', -> $qastcomp, $post {
Expand Down
2 changes: 1 addition & 1 deletion src/QPerl6/World.pm
Expand Up @@ -1356,7 +1356,7 @@ class QPerl6::World is HLL::World {
# in other cases.
make QAST::Op.new(
:op('if'),
PAST::Op.new( :pirop('perl6_state_needs_init I') ),
QAST::Op.new( :op('p6stateinit') ),
QAST::Op.new(
:op('p6store'),
QAST::Var.new( :name($sym), :scope('lexical') ),
Expand Down

0 comments on commit e08c1dd

Please sign in to comment.