From 884b9f8a688766e08907431cd6759bfaa89399dc Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 18 Dec 2015 14:30:46 -0800 Subject: remove Label, which was removed from the spec --- src/pass.h | 1 - src/passes/NameManager.cpp | 3 --- src/wasm-interpreter.h | 6 ----- src/wasm-s-parser.h | 16 ------------- src/wasm.h | 59 +++++++++++++++------------------------------- src/wasm2asm.h | 6 ----- 6 files changed, 19 insertions(+), 72 deletions(-) (limited to 'src') diff --git a/src/pass.h b/src/pass.h index de22e7daa..6af9e83e1 100644 --- a/src/pass.h +++ b/src/pass.h @@ -92,7 +92,6 @@ struct NameManager : public Pass { // visitors void visitBlock(Block* curr) override; void visitLoop(Loop* curr) override; - void visitLabel(Label* curr) override; void visitBreak(Break* curr) override; void visitSwitch(Switch* curr) override; void visitCall(Call* curr) override; diff --git a/src/passes/NameManager.cpp b/src/passes/NameManager.cpp index 73a09262b..34ea6adac 100644 --- a/src/passes/NameManager.cpp +++ b/src/passes/NameManager.cpp @@ -24,9 +24,6 @@ void NameManager::visitLoop(Loop* curr) { names.insert(curr->out); names.insert(curr->in); } -void NameManager::visitLabel(Label* curr) { - names.insert(curr->name); -} void NameManager::visitBreak(Break* curr) { names.insert(curr->name); } diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 83d974d47..4a04c6912 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -207,12 +207,6 @@ private: return flow; // loop does not loop automatically, only continue achieves that } } - Flow visitLabel(Label *curr) override { - NOTE_ENTER("Label"); - Flow flow = visit(curr->body); - flow.clearIf(curr->name); - return flow; - } Flow visitBreak(Break *curr) override { NOTE_ENTER("Break"); bool condition = true; diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 7f1d9bf6c..deeaba155 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -555,7 +555,6 @@ public: abort_on(str); } case 'l': { - if (str[1] == 'a') return makeLabel(s); if (str[1] == 'o') return makeLoop(s); abort_on(str); } @@ -770,21 +769,6 @@ private: return ret; } - Expression* makeLabel(Element& s) { - auto ret = allocator.alloc