Add some asserts to WasmCodeTransform

This commit is contained in:
Alex Beregszaszi 2020-05-12 16:28:26 +01:00
parent e872b1b51e
commit fdf68a9525

View File

@ -275,11 +275,13 @@ wasm::Expression WasmCodeTransform::operator()(ForLoop const& _for)
wasm::Expression WasmCodeTransform::operator()(Break const&) wasm::Expression WasmCodeTransform::operator()(Break const&)
{ {
yulAssert(m_breakContinueLabelNames.size() > 0, "");
return wasm::Branch{wasm::Label{m_breakContinueLabelNames.top().first}}; return wasm::Branch{wasm::Label{m_breakContinueLabelNames.top().first}};
} }
wasm::Expression WasmCodeTransform::operator()(Continue const&) wasm::Expression WasmCodeTransform::operator()(Continue const&)
{ {
yulAssert(m_breakContinueLabelNames.size() > 0, "");
return wasm::Branch{wasm::Label{m_breakContinueLabelNames.top().second}}; return wasm::Branch{wasm::Label{m_breakContinueLabelNames.top().second}};
} }