Skip to content

Remove duplicate Type:: prefixes (NFC) #2753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/asm2wasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
conv->op = isUnsignedCoercion(ast[2]) ? ConvertUInt32ToFloat64
: ConvertSInt32ToFloat64;
conv->value = ret;
conv->type = Type::Type::f64;
conv->type = Type::f64;
return conv;
}
if (ret->type == Type::f32) {
Expand Down
12 changes: 6 additions & 6 deletions src/tools/fuzzing.h
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ class TranslateToFuzzReader {
case 0:
return makeBlock(Type::unreachable);
case 1:
return makeIf(Type::Type::unreachable);
return makeIf(Type::unreachable);
case 2:
return makeLoop(Type::unreachable);
case 3:
Expand Down Expand Up @@ -1161,7 +1161,7 @@ class TranslateToFuzzReader {
hangStack.pop_back();
return ret;
} else if (type == Type::none) {
if (valueType != Type::Type::none) {
if (valueType != Type::none) {
// we need to break to a proper place
continue;
}
Expand All @@ -1170,7 +1170,7 @@ class TranslateToFuzzReader {
return ret;
} else {
assert(type == Type::unreachable);
if (valueType != Type::Type::none) {
if (valueType != Type::none) {
// we need to break to a proper place
continue;
}
Expand Down Expand Up @@ -1326,7 +1326,7 @@ class TranslateToFuzzReader {
type = getConcreteType();
auto& globals = globalsByType[type];
if (globals.empty()) {
return makeTrivial(Type::Type::none);
return makeTrivial(Type::none);
}
auto* value = make(type);
return builder.makeGlobalSet(pick(globals), value);
Expand Down Expand Up @@ -2261,7 +2261,7 @@ class TranslateToFuzzReader {
// we need to find proper targets to break to; try a bunch
int tries = TRIES;
std::vector<Name> names;
Type valueType = Type::Type::unreachable;
Type valueType = Type::unreachable;
while (tries-- > 0) {
auto* target = pick(breakableStack);
auto name = getTargetName(target);
Expand Down Expand Up @@ -2550,7 +2550,7 @@ class TranslateToFuzzReader {
ShrSVecI64x2,
ShrUVecI64x2);
Expression* vec = make(Type::v128);
Expression* shift = make(Type::Type::i32);
Expression* shift = make(Type::i32);
return builder.makeSIMDShift(op, vec, shift);
}

Expand Down
8 changes: 4 additions & 4 deletions src/wasm2js.h
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,8 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
continueLabels.insert(asmLabel);
Ref body = visit(curr->body, result);
// if we can reach the end of the block, we must leave the while (1) loop
if (curr->body->type != Type::Type::unreachable) {
assert(curr->body->type == Type::Type::none); // flat IR
if (curr->body->type != Type::unreachable) {
assert(curr->body->type == Type::none); // flat IR
body = blockify(body);
flattenAppend(
body, ValueBuilder::makeBreak(fromName(asmLabel, NameScope::Label)));
Expand Down Expand Up @@ -1049,7 +1049,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
for (auto* c : code) {
ValueBuilder::appendCodeToSwitch(
theSwitch, blockify(visit(c, NO_RESULT)), false);
hoistedEndsWithUnreachable = c->type == Type::Type::unreachable;
hoistedEndsWithUnreachable = c->type == Type::unreachable;
}
}
// After the hoisted cases, if any remain we must make sure not to
Expand Down Expand Up @@ -1270,7 +1270,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,

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