From 6b05f000e8b9249afd0838774b6bdaf64fcaf90a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 2 Feb 2018 18:47:10 -0800 Subject: Rename WasmType => Type (#1398) * rename WasmType to Type. it's in the wasm:: namespace anyhow, and without Wasm- it fits in better alongside Index, Address, Expression, Module, etc. --- src/ir/utils.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ir/utils.h') diff --git a/src/ir/utils.h b/src/ir/utils.h index 786e04e45..fa08122b5 100644 --- a/src/ir/utils.h +++ b/src/ir/utils.h @@ -86,7 +86,7 @@ struct ReFinalize : public WalkerPass breakValues; + std::map breakValues; void visitBlock(Block *curr) { if (curr->list.size() == 0) { @@ -99,7 +99,7 @@ struct ReFinalize : public WalkerPasstype = curr->list.back()->type; // if concrete, it doesn't matter if we have an unreachable child, and we // don't need to look at breaks - if (isConcreteWasmType(curr->type)) return; + if (isConcreteType(curr->type)) return; // otherwise, we have no final fallthrough element to determine the type, // could be determined by breaks if (curr->name.is()) { @@ -111,7 +111,7 @@ struct ReFinalize : public WalkerPasstype = old; - assert(isConcreteWasmType(curr->type)); + assert(isConcreteType(curr->type)); } else { curr->type = type; } @@ -183,11 +183,11 @@ struct ReFinalize : public WalkerPasstype : none; } - void updateBreakValueType(Name name, WasmType type) { + void updateBreakValueType(Name name, Type type) { if (type != unreachable || breakValues.count(name) == 0) { breakValues[name] = type; } @@ -256,7 +256,7 @@ struct AutoDrop : public WalkerPass> { bool maybeDrop(Expression*& child) { bool acted = false; - if (isConcreteWasmType(child->type)) { + if (isConcreteType(child->type)) { expressionStack.push_back(child); if (!ExpressionAnalyzer::isResultUsed(expressionStack, getFunction()) && !ExpressionAnalyzer::isResultDropped(expressionStack)) { child = Builder(*getModule()).makeDrop(child); @@ -275,7 +275,7 @@ struct AutoDrop : public WalkerPass> { if (curr->list.size() == 0) return; for (Index i = 0; i < curr->list.size() - 1; i++) { auto* child = curr->list[i]; - if (isConcreteWasmType(child->type)) { + if (isConcreteType(child->type)) { curr->list[i] = Builder(*getModule()).makeDrop(child); } } @@ -300,7 +300,7 @@ struct AutoDrop : public WalkerPass> { void doWalkFunction(Function* curr) { ReFinalize().walkFunctionInModule(curr, getModule()); walk(curr->body); - if (curr->result == none && isConcreteWasmType(curr->body->type)) { + if (curr->result == none && isConcreteType(curr->body->type)) { curr->body = Builder(*getModule()).makeDrop(curr->body); } ReFinalize().walkFunctionInModule(curr, getModule()); -- cgit v1.2.3