Skip to content

Commit

Permalink
Fixes PushBlock in nested block context
Browse files Browse the repository at this point in the history
Issue: #17
Issue: #92
  • Loading branch information
0x7CFE committed Aug 2, 2016
1 parent fc6d1dd commit 878db08
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TypeAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,11 @@ void TypeAnalyzer::doPushBlock(const InstructionNode& instruction) {
blockType.pushSubType(origin); // [Type::bstOrigin]
blockType.pushSubType(Type(TInteger(offset))); // [Type::bstOffset]
blockType.pushSubType(Type(TInteger(argIndex))); // [Type::bstArgIndex]
blockType.pushSubType(Type(TInteger(m_context.getIndex()))); // [Type::bstContextIndex]

if (m_blockType)
blockType.pushSubType((*m_blockType)[Type::bstContextIndex]);
else
blockType.pushSubType(Type(TInteger(m_context.getIndex()))); // [Type::bstContextIndex]

ControlGraph* const blockGraph = m_system.getBlockGraph(pushBlock->getParsedBlock());
assert(blockGraph);
Expand Down

0 comments on commit 878db08

Please sign in to comment.