Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
jstuder-gh committed Jul 23, 2018
1 parent fe34477 commit 938c192
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/vm/moar/QAST/QASTCompilerMAST.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,17 @@ my class MASTCompilerInstance {
if $is_static || $is_cont || $is_state {
my int $flags := $is_static ?? 0 !!
$is_cont ?? 1 !! 2;
my $val := $var.value;
my $sc := nqp::getobjsc($val);
if nqp::isnull($sc) {
nqp::die("Object of type " ~ $val.HOW.name($val) ~
" in QAST::Var value, but not in SC");
if $kind == $MVM_reg_obj {
my $val := $var.value;
my $sc := nqp::getobjsc($val);
if nqp::isnull($sc) {
nqp::die("Object of type " ~ $val.HOW.name($val) ~
" in QAST::Var value, but not in SC");
}
my int $idx := nqp::scgetobjidx($sc, $val);
my int $sc_idx := $!compiler.mast_compunit.sc_idx($sc);
$mf.add_static_lex_value($index, $flags, $sc_idx, $idx);
}
my int $idx := nqp::scgetobjidx($sc, $val);
my int $sc_idx := $!compiler.mast_compunit.sc_idx($sc);
$mf.add_static_lex_value($index, $flags, $sc_idx, $idx);
}
$kind;
}
Expand Down

0 comments on commit 938c192

Please sign in to comment.