summaryrefslogtreecommitdiff
path: root/src/abi/stack.h
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2020-01-07 11:16:44 -0800
committerGitHub <noreply@github.com>2020-01-07 11:16:44 -0800
commite8f9d207427bda2f6e22c28ff0210b294b1f70e1 (patch)
tree503b20fb06274e38af7e25e3a1a4106827c52693 /src/abi/stack.h
parentf73b40c7873dbd2dd46a962f3afe5b97a7fc8b0a (diff)
downloadbinaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.tar.gz
binaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.tar.bz2
binaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.zip
[NFC] Enforce use of `Type::` on type names (#2434)
Diffstat (limited to 'src/abi/stack.h')
-rw-r--r--src/abi/stack.h8
1 files changed, 4 insertions, 4 deletions
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<Return> finder(func->body);
for (auto** ptr : finder.list) {
auto* ret = (*ptr)->cast<Return>();
- 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 {