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

Unified Diff: test/mjsunit/compiler/generic-add.js

Issue 1071473003: Fix maybe_string_add for adds that have no type feedback where --always-opt is on. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge status file. Created 5 years, 8 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/hydrogen.cc ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/generic-add.js
diff --git a/test/mjsunit/compiler/generic-add.js b/test/mjsunit/compiler/generic-add.js
new file mode 100644
index 0000000000000000000000000000000000000000..f61cd10842c54f48ded83f407e73570410d34a5b
--- /dev/null
+++ b/test/mjsunit/compiler/generic-add.js
@@ -0,0 +1,26 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function dateL() {
+ var date = new Date();
+ return (date + true) == date.toString() + true;
+}
+
+function dateR() {
+ var date = new Date();
+ return (true + date) == true + date.toString();
+}
+
+function strL() {
+ return (new String(1) + true) == "1true";
+}
+
+function strR() {
+ return (true + new String(1)) == "true1";
+}
+
+assertTrue(dateL());
+assertTrue(dateR());
+assertTrue(strL());
+assertTrue(strR());
« no previous file with comments | « src/hydrogen.cc ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698