Skip to content

Commit

Permalink
Fix get_frame_index not finding frame created by BEGIN time EVAL
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Sep 21, 2018
1 parent 40cec30 commit 488bbd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vm/moar/QAST/QASTCompilerMAST.nqp
Expand Up @@ -3129,6 +3129,10 @@ class MoarVM::BytecodeWriter {
}
method get_frame_index(MAST::Frame $f) {
my $idx := 0;
if nqp::getattr($f, MAST::Frame, '$!flags') +& 32768 { # FRAME_FLAG_HAS_INDEX
return nqp::getattr($f, MAST::Frame, '$!frame_idx');
}
note("Need to iterate");
for nqp::getattr($!compunit, MAST::CompUnit, '@!frames') {
return $idx if nqp::objectid($_) eq nqp::objectid($f);
$idx++;
Expand Down

0 comments on commit 488bbd4

Please sign in to comment.