diff options
Diffstat (limited to 'src/passes/Asyncify.cpp')
-rw-r--r-- | src/passes/Asyncify.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/passes/Asyncify.cpp b/src/passes/Asyncify.cpp index d4a788adb..61c1f0ff4 100644 --- a/src/passes/Asyncify.cpp +++ b/src/passes/Asyncify.cpp @@ -998,7 +998,7 @@ private: // avoid saving/restoring that local later) curr = builder->makeIf( builder->makeIf(builder->makeStateCheck(State::Normal), - builder->makeConst(Literal(int32_t(1))), + builder->makeConst(int32_t(1)), makeCallIndexPeek(index)), builder->makeSequence(curr, makePossibleUnwind(index, set))); return curr; @@ -1011,9 +1011,8 @@ private: // it when we add its contents, later.) return builder->makeIf( builder->makeStateCheck(State::Unwinding), - builder->makeCall(ASYNCIFY_UNWIND, - {builder->makeConst(Literal(int32_t(index)))}, - Type::none), + builder->makeCall( + ASYNCIFY_UNWIND, {builder->makeConst(int32_t(index))}, Type::none), ifNotUnwinding); } @@ -1021,7 +1020,7 @@ private: // Emit an intrinsic for this, as we store the index into a local, and // don't want it to be seen by asyncify itself. return builder->makeCall(ASYNCIFY_CHECK_CALL_INDEX, - {builder->makeConst(Literal(int32_t(index)))}, + {builder->makeConst(int32_t(index))}, Type::i32); } @@ -1489,11 +1488,11 @@ private: Builder builder(*module); module->addGlobal(builder.makeGlobal(ASYNCIFY_STATE, Type::i32, - builder.makeConst(Literal(int32_t(0))), + builder.makeConst(int32_t(0)), Builder::Mutable)); module->addGlobal(builder.makeGlobal(ASYNCIFY_DATA, Type::i32, - builder.makeConst(Literal(int32_t(0))), + builder.makeConst(int32_t(0)), Builder::Mutable)); } @@ -1506,7 +1505,7 @@ private: } auto* body = builder.makeBlock(); body->list.push_back(builder.makeGlobalSet( - ASYNCIFY_STATE, builder.makeConst(Literal(int32_t(state))))); + ASYNCIFY_STATE, builder.makeConst(int32_t(state)))); if (setData) { body->list.push_back(builder.makeGlobalSet( ASYNCIFY_DATA, builder.makeLocalGet(0, Type::i32))); @@ -1617,7 +1616,7 @@ struct ModAsyncify value = 1 - value; } Builder builder(*this->getModule()); - this->replaceCurrent(builder.makeConst(Literal(int32_t(value)))); + this->replaceCurrent(builder.makeConst(int32_t(value))); } void visitSelect(Select* curr) { @@ -1630,7 +1629,7 @@ struct ModAsyncify // we know we'll never rewind, we can optimize this. if (neverRewind) { Builder builder(*this->getModule()); - curr->condition = builder.makeConst(Literal(int32_t(0))); + curr->condition = builder.makeConst(int32_t(0)); } } |