Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1183)

Unified Diff: src/wasm/asm-wasm-builder.cc

Issue 1675903002: fix int type coercion in asm to wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@indirectFunctions
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/asm-wasm-builder.cc
diff --git a/src/wasm/asm-wasm-builder.cc b/src/wasm/asm-wasm-builder.cc
index 1d5e674e1c8b59e8c23e0ab8dcbccc847da92c51..691cc374694e0773ac4791b7c0b145698c0d9fc7 100644
--- a/src/wasm/asm-wasm-builder.cc
+++ b/src/wasm/asm-wasm-builder.cc
@@ -782,9 +782,11 @@ class AsmWasmBuilderImpl : public AstVisitor {
enum ConvertOperation { kNone, kAsIs, kToInt, kToDouble };
ConvertOperation MatchOr(BinaryOperation* expr) {
- if (MatchIntBinaryOperation(expr, Token::BIT_OR, 0)) {
- return (TypeOf(expr->left()) == kAstI32) ? kAsIs : kToInt;
+ if (MatchIntBinaryOperation(expr, Token::BIT_OR, 0) &&
+ (TypeOf(expr->left()) == kAstI32)) {
+ return kAsIs;
} else {
+ UNREACHABLE();
return kNone;
}
}
« no previous file with comments | « no previous file | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698