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

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

Issue 1756693003: Allow negation of doubles in asm typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 | « src/typing-asm.cc ('k') | no next file » | 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 967d0b10f3b1a156b1cf6e5324d62df3d7fc5772..bec68d6b7bdbc37c50e49341eb65662ee10b4c73 100644
--- a/test/cctest/test-asm-validator.cc
+++ b/test/cctest/test-asm-validator.cc
@@ -2366,3 +2366,25 @@ TEST(StoreFloatFromDouble) {
}
CHECK_FUNC_TYPES_END
}
+
+TEST(NegateDouble) {
+ CHECK_FUNC_TYPES_BEGIN(
+ "function bar() { var x = 0.0; x = -x; }\n"
+ "function foo() { bar(); }") {
+ CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) {
+ CHECK_EXPR(Assignment, Bounds(cache.kAsmDouble)) {
+ CHECK_VAR(x, Bounds(cache.kAsmDouble));
+ CHECK_EXPR(Literal, Bounds(cache.kAsmDouble));
+ }
+ CHECK_EXPR(Assignment, Bounds(cache.kAsmDouble)) {
+ CHECK_VAR(x, Bounds(cache.kAsmDouble));
+ CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) {
+ CHECK_VAR(x, Bounds(cache.kAsmDouble));
+ CHECK_EXPR(Literal, Bounds(cache.kAsmDouble));
+ }
+ }
+ }
+ CHECK_SKIP();
+ }
+ CHECK_FUNC_TYPES_END
+}
« no previous file with comments | « src/typing-asm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698