mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove continue from wasm.
This commit is contained in:
parent
9ec8bcda4f
commit
0657aff937
@ -42,11 +42,10 @@ struct Block;
|
|||||||
struct If;
|
struct If;
|
||||||
struct Loop;
|
struct Loop;
|
||||||
struct Break;
|
struct Break;
|
||||||
struct Continue;
|
|
||||||
using Expression = boost::variant<
|
using Expression = boost::variant<
|
||||||
Literal, StringLiteral, LocalVariable, GlobalVariable, Label,
|
Literal, StringLiteral, LocalVariable, GlobalVariable, Label,
|
||||||
FunctionCall, BuiltinCall, LocalAssignment, GlobalAssignment,
|
FunctionCall, BuiltinCall, LocalAssignment, GlobalAssignment,
|
||||||
Block, If, Loop, Break, Continue
|
Block, If, Loop, Break
|
||||||
>;
|
>;
|
||||||
|
|
||||||
struct Literal { uint64_t value; };
|
struct Literal { uint64_t value; };
|
||||||
@ -66,7 +65,6 @@ struct If {
|
|||||||
};
|
};
|
||||||
struct Loop { std::string labelName; std::vector<Expression> statements; };
|
struct Loop { std::string labelName; std::vector<Expression> statements; };
|
||||||
struct Break { Label label; };
|
struct Break { Label label; };
|
||||||
struct Continue { Label label; };
|
|
||||||
|
|
||||||
struct VariableDeclaration { std::string variableName; };
|
struct VariableDeclaration { std::string variableName; };
|
||||||
struct GlobalVariableDeclaration { std::string variableName; };
|
struct GlobalVariableDeclaration { std::string variableName; };
|
||||||
|
@ -267,7 +267,7 @@ wasm::Expression EWasmCodeTransform::operator()(Break const&)
|
|||||||
|
|
||||||
wasm::Expression EWasmCodeTransform::operator()(Continue 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)
|
wasm::Expression EWasmCodeTransform::operator()(Block const& _block)
|
||||||
|
@ -128,11 +128,6 @@ string EWasmToText::operator()(wasm::Break const& _break)
|
|||||||
return "(break $" + _break.label.name + ")\n";
|
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 EWasmToText::operator()(wasm::Block const& _block)
|
||||||
{
|
{
|
||||||
string label = _block.labelName.empty() ? "" : " $" + _block.labelName;
|
string label = _block.labelName.empty() ? "" : " $" + _block.labelName;
|
||||||
|
@ -50,7 +50,6 @@ public:
|
|||||||
std::string operator()(wasm::If const& _if);
|
std::string operator()(wasm::If const& _if);
|
||||||
std::string operator()(wasm::Loop const& _loop);
|
std::string operator()(wasm::Loop const& _loop);
|
||||||
std::string operator()(wasm::Break const& _break);
|
std::string operator()(wasm::Break const& _break);
|
||||||
std::string operator()(wasm::Continue const& _continue);
|
|
||||||
std::string operator()(wasm::Block const& _block);
|
std::string operator()(wasm::Block const& _block);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user