From e8f9d207427bda2f6e22c28ff0210b294b1f70e1 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Tue, 7 Jan 2020 11:16:44 -0800 Subject: [NFC] Enforce use of `Type::` on type names (#2434) --- src/abi/stack.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/abi/stack.h') diff --git a/src/abi/stack.h b/src/abi/stack.h index 265a7af6e..c06caa2d0 100644 --- a/src/abi/stack.h +++ b/src/abi/stack.h @@ -88,7 +88,7 @@ getStackSpace(Index local, Function* func, Index size, Module& wasm) { local, builder.makeGlobalGet(stackPointer->name, PointerType))); // TODO: add stack max check Expression* added; - if (PointerType == i32) { + if (PointerType == Type::i32) { added = builder.makeBinary(AddInt32, builder.makeLocalGet(local, PointerType), builder.makeConst(Literal(int32_t(size)))); @@ -104,7 +104,7 @@ getStackSpace(Index local, Function* func, Index size, Module& wasm) { FindAllPointers finder(func->body); for (auto** ptr : finder.list) { auto* ret = (*ptr)->cast(); - if (ret->value && ret->value->type != unreachable) { + if (ret->value && ret->value->type != Type::unreachable) { // handle the returned value auto* block = builder.makeBlock(); auto temp = builder.addVar(func, ret->value->type); @@ -120,10 +120,10 @@ getStackSpace(Index local, Function* func, Index size, Module& wasm) { } } // add stack restores to the body - if (func->body->type == none) { + if (func->body->type == Type::none) { block->list.push_back(func->body); block->list.push_back(makeStackRestore()); - } else if (func->body->type == unreachable) { + } else if (func->body->type == Type::unreachable) { block->list.push_back(func->body); // no need to restore the old stack value, we're gone anyhow } else { -- cgit v1.2.3