Remove continue from wasm.

This commit is contained in:
chriseth 2019-10-17 12:56:01 +02:00
parent 9ec8bcda4f
commit 0657aff937
4 changed files with 2 additions and 10 deletions

View File

@ -42,11 +42,10 @@ struct Block;
struct If;
struct Loop;
struct Break;
struct Continue;
using Expression = boost::variant<
Literal, StringLiteral, LocalVariable, GlobalVariable, Label,
FunctionCall, BuiltinCall, LocalAssignment, GlobalAssignment,
Block, If, Loop, Break, Continue
Block, If, Loop, Break
>;
struct Literal { uint64_t value; };
@ -66,7 +65,6 @@ struct If {
};
struct Loop { std::string labelName; std::vector<Expression> statements; };
struct Break { Label label; };
struct Continue { Label label; };
struct VariableDeclaration { std::string variableName; };
struct GlobalVariableDeclaration { std::string variableName; };

View File

@ -267,7 +267,7 @@ wasm::Expression EWasmCodeTransform::operator()(Break const&)
wasm::Expression EWasmCodeTransform::operator()(Continue const&)
{
return wasm::Continue{wasm::Label{m_breakContinueLabelNames.top().second}};
return wasm::Break{wasm::Label{m_breakContinueLabelNames.top().second}};
}
wasm::Expression EWasmCodeTransform::operator()(Block const& _block)

View File

@ -128,11 +128,6 @@ string EWasmToText::operator()(wasm::Break const& _break)
return "(break $" + _break.label.name + ")\n";
}
string EWasmToText::operator()(wasm::Continue const& _continue)
{
return "(continue $" + _continue.label.name + ")\n";
}
string EWasmToText::operator()(wasm::Block const& _block)
{
string label = _block.labelName.empty() ? "" : " $" + _block.labelName;

View File

@ -50,7 +50,6 @@ public:
std::string operator()(wasm::If const& _if);
std::string operator()(wasm::Loop const& _loop);
std::string operator()(wasm::Break const& _break);
std::string operator()(wasm::Continue const& _continue);
std::string operator()(wasm::Block const& _block);
private: