Skip to content

Commit 49d5e0c

Browse files
committed
Compiler: Add null values for unsupported reporter blocks
1 parent 452c7ab commit 49d5e0c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/engine/compiler.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ void Compiler::addInput(int id)
132132
assert(m_block);
133133
if (m_block->compileFunction())
134134
m_block->compile(this);
135-
else
135+
else {
136136
std::cout << "warning: unsupported reporter block: " << m_block->opcode() << std::endl;
137+
addInstruction(OP_NULL);
138+
}
137139
m_block = previousBlock;
138140
break;
139141
}
@@ -144,8 +146,10 @@ void Compiler::addInput(int id)
144146
if (m_block) {
145147
if (m_block->compileFunction())
146148
m_block->compile(this);
147-
else
149+
else {
148150
std::cout << "warning: unsupported reporter block: " << m_block->opcode() << std::endl;
151+
addInstruction(OP_NULL);
152+
}
149153
} else
150154
in->primaryValue()->compile(this);
151155
m_block = previousBlock;

0 commit comments

Comments
 (0)