Skip to content

Commit 69aa389

Browse files
authored
Remove duplicate Type:: prefixes (NFC) (#2753)
These seem to be accidentally introduced in when we enforced use of `Type::` on type names in #2434. By the way TIL this actually compiles, and don't know why: ``` Type::Type::Type::Type::Type::Type::Type::Type::none ```
1 parent 3f3e177 commit 69aa389

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/asm2wasm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
20282028
conv->op = isUnsignedCoercion(ast[2]) ? ConvertUInt32ToFloat64
20292029
: ConvertSInt32ToFloat64;
20302030
conv->value = ret;
2031-
conv->type = Type::Type::f64;
2031+
conv->type = Type::f64;
20322032
return conv;
20332033
}
20342034
if (ret->type == Type::f32) {

src/tools/fuzzing.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ class TranslateToFuzzReader {
983983
case 0:
984984
return makeBlock(Type::unreachable);
985985
case 1:
986-
return makeIf(Type::Type::unreachable);
986+
return makeIf(Type::unreachable);
987987
case 2:
988988
return makeLoop(Type::unreachable);
989989
case 3:
@@ -1161,7 +1161,7 @@ class TranslateToFuzzReader {
11611161
hangStack.pop_back();
11621162
return ret;
11631163
} else if (type == Type::none) {
1164-
if (valueType != Type::Type::none) {
1164+
if (valueType != Type::none) {
11651165
// we need to break to a proper place
11661166
continue;
11671167
}
@@ -1170,7 +1170,7 @@ class TranslateToFuzzReader {
11701170
return ret;
11711171
} else {
11721172
assert(type == Type::unreachable);
1173-
if (valueType != Type::Type::none) {
1173+
if (valueType != Type::none) {
11741174
// we need to break to a proper place
11751175
continue;
11761176
}
@@ -1326,7 +1326,7 @@ class TranslateToFuzzReader {
13261326
type = getConcreteType();
13271327
auto& globals = globalsByType[type];
13281328
if (globals.empty()) {
1329-
return makeTrivial(Type::Type::none);
1329+
return makeTrivial(Type::none);
13301330
}
13311331
auto* value = make(type);
13321332
return builder.makeGlobalSet(pick(globals), value);
@@ -2261,7 +2261,7 @@ class TranslateToFuzzReader {
22612261
// we need to find proper targets to break to; try a bunch
22622262
int tries = TRIES;
22632263
std::vector<Name> names;
2264-
Type valueType = Type::Type::unreachable;
2264+
Type valueType = Type::unreachable;
22652265
while (tries-- > 0) {
22662266
auto* target = pick(breakableStack);
22672267
auto name = getTargetName(target);
@@ -2550,7 +2550,7 @@ class TranslateToFuzzReader {
25502550
ShrSVecI64x2,
25512551
ShrUVecI64x2);
25522552
Expression* vec = make(Type::v128);
2553-
Expression* shift = make(Type::Type::i32);
2553+
Expression* shift = make(Type::i32);
25542554
return builder.makeSIMDShift(op, vec, shift);
25552555
}
25562556

src/wasm2js.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,8 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
984984
continueLabels.insert(asmLabel);
985985
Ref body = visit(curr->body, result);
986986
// if we can reach the end of the block, we must leave the while (1) loop
987-
if (curr->body->type != Type::Type::unreachable) {
988-
assert(curr->body->type == Type::Type::none); // flat IR
987+
if (curr->body->type != Type::unreachable) {
988+
assert(curr->body->type == Type::none); // flat IR
989989
body = blockify(body);
990990
flattenAppend(
991991
body, ValueBuilder::makeBreak(fromName(asmLabel, NameScope::Label)));
@@ -1049,7 +1049,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
10491049
for (auto* c : code) {
10501050
ValueBuilder::appendCodeToSwitch(
10511051
theSwitch, blockify(visit(c, NO_RESULT)), false);
1052-
hoistedEndsWithUnreachable = c->type == Type::Type::unreachable;
1052+
hoistedEndsWithUnreachable = c->type == Type::unreachable;
10531053
}
10541054
}
10551055
// After the hoisted cases, if any remain we must make sure not to
@@ -1270,7 +1270,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
12701270

12711271
Ref visitStore(Store* curr) {
12721272
if (module->memory.initial < module->memory.max &&
1273-
curr->type != Type::Type::unreachable) {
1273+
curr->type != Type::unreachable) {
12741274
// In JS, if memory grows then it is dangerous to write
12751275
// HEAP[f()] = ..
12761276
// or

0 commit comments

Comments
 (0)