summaryrefslogtreecommitdiff
path: root/src/ir
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir')
-rw-r--r--src/ir/literal-utils.h3
-rw-r--r--src/ir/memory-utils.h2
-rw-r--r--src/ir/utils.h4
3 files changed, 4 insertions, 5 deletions
diff --git a/src/ir/literal-utils.h b/src/ir/literal-utils.h
index a7ba10926..8b00ddcbf 100644
--- a/src/ir/literal-utils.h
+++ b/src/ir/literal-utils.h
@@ -36,8 +36,7 @@ inline Expression* makeZero(Type type, Module& wasm) {
// (https://bugs.chromium.org/p/v8/issues/detail?id=8460)
Builder builder(wasm);
if (type == Type::v128) {
- return builder.makeUnary(SplatVecI32x4,
- builder.makeConst(Literal(int32_t(0))));
+ return builder.makeUnary(SplatVecI32x4, builder.makeConst(int32_t(0)));
}
return builder.makeConstantExpression(Literal::makeZero(type));
}
diff --git a/src/ir/memory-utils.h b/src/ir/memory-utils.h
index 13b356ba8..432fed0aa 100644
--- a/src/ir/memory-utils.h
+++ b/src/ir/memory-utils.h
@@ -40,7 +40,7 @@ inline bool flatten(Memory& memory,
if (ensuredSegmentSize > 0) {
assert(module); // must provide a module if ensuring a size.
Builder builder(*module);
- memory.segments.emplace_back(builder.makeConst(Literal(int32_t(0))));
+ memory.segments.emplace_back(builder.makeConst(int32_t(0)));
memory.segments[0].data.resize(ensuredSegmentSize);
}
return true;
diff --git a/src/ir/utils.h b/src/ir/utils.h
index a06598095..a7f6f59bf 100644
--- a/src/ir/utils.h
+++ b/src/ir/utils.h
@@ -335,7 +335,7 @@ struct I64Utilities {
builder.makeUnary(ExtendUInt32, low),
builder.makeBinary(ShlInt64,
builder.makeUnary(ExtendUInt32, high),
- builder.makeConst(Literal(int64_t(32)))));
+ builder.makeConst(int64_t(32))));
};
static Expression* recreateI64(Builder& builder, Index low, Index high) {
@@ -349,7 +349,7 @@ struct I64Utilities {
WrapInt64,
builder.makeBinary(ShrUInt64,
builder.makeLocalGet(index, Type::i64),
- builder.makeConst(Literal(int64_t(32)))));
+ builder.makeConst(int64_t(32))));
}
static Expression* getI64Low(Builder& builder, Index index) {