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

Unified Diff: test/mjsunit/regress/regress-crbug-320922.js

Issue 67103003: Fix register trashing in Emit*ByteSeqStringSetChar (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-320922.js
diff --git a/test/mjsunit/elide-double-hole-check-9.js b/test/mjsunit/regress/regress-crbug-320922.js
similarity index 78%
copy from test/mjsunit/elide-double-hole-check-9.js
copy to test/mjsunit/regress/regress-crbug-320922.js
index 88bbc7eaaa2955cf726fda76fca080e8663b1a96..4a5b5813e025b74b7e48e37c7894d5546e0ae909 100644
--- a/test/mjsunit/elide-double-hole-check-9.js
+++ b/test/mjsunit/regress/regress-crbug-320922.js
@@ -27,23 +27,22 @@
// Flags: --allow-natives-syntax
-var do_set = false;
-
-%NeverOptimizeFunction(set_proto_elements);
-function set_proto_elements() {
- if (do_set) Array.prototype[1] = 1.5;
-}
-
-function f(a, i) {
- set_proto_elements();
- return a[i] + 0.5;
+var string = "hello world";
+var expected = "Hello " + "world";
+function Capitalize() {
+ %_OneByteSeqStringSetChar(string, 0, 0x48);
}
+Capitalize();
+assertEquals(expected, string);
+Capitalize();
+assertEquals(expected, string);
-var arr = [0.0,,2.5];
-assertEquals(0.5, f(arr, 0));
-assertEquals(0.5, f(arr, 0));
-%OptimizeFunctionOnNextCall(f);
-assertEquals(0.5, f(arr, 0));
-do_set = true;
-assertEquals(2, f(arr, 1));
+var twobyte = "\u20ACello world";
+function TwoByteCapitalize() {
+ %_TwoByteSeqStringSetChar(twobyte, 0, 0x48);
+}
+TwoByteCapitalize();
+assertEquals(expected, twobyte);
+TwoByteCapitalize();
+assertEquals(expected, twobyte);
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698