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

Unified Diff: test/cctest/test-asm-validator.cc

Issue 1718083004: Allow constant multiply both ways. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fi 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 | « src/typing-asm.cc ('k') | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-asm-validator.cc
diff --git a/test/cctest/test-asm-validator.cc b/test/cctest/test-asm-validator.cc
index 207b915378320c032f2012e93c3921ab4b519ff0..2eaaa55ed17109afe46d72f68eef21f3d7d28ea0 100644
--- a/test/cctest/test-asm-validator.cc
+++ b/test/cctest/test-asm-validator.cc
@@ -1171,6 +1171,12 @@ TEST(TernaryBadCondition) {
"asm: line 39: condition must be of type int\n");
}
+TEST(BadIntishMultiply) {
+ CHECK_FUNC_ERROR(
+ "function bar() { var x = 1; return ((x + x) * 4) | 0; }\n"
+ "function foo() { bar(); }",
+ "asm: line 39: intish not allowed in multiply\n");
+}
TEST(FroundFloat32) {
CHECK_FUNC_TYPES_BEGIN(
@@ -1229,7 +1235,7 @@ TEST(Multiplication2) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2; return (x*y)|0; }\n"
"function foo() { bar(); }",
- "asm: line 39: direct integer multiply forbidden\n");
+ "asm: line 39: multiply must be by an integer literal\n");
}
« no previous file with comments | « src/typing-asm.cc ('k') | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698