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

Unified Diff: test/mjsunit/regress/regress-2855.js

Issue 151163005: A64: Synchronize with r16356. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « test/mjsunit/regress/regress-2829.js ('k') | test/mjsunit/regress/regress-debug-deopt-while-recompile.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-2855.js
diff --git a/test/mjsunit/elements-transition-and-store.js b/test/mjsunit/regress/regress-2855.js
similarity index 85%
copy from test/mjsunit/elements-transition-and-store.js
copy to test/mjsunit/regress/regress-2855.js
index 7a07b3eeca312c7a68df14c054bb069ed0a1c421..ac721af73bf4c91ecc751fc31a3db91cf6942c93 100644
--- a/test/mjsunit/elements-transition-and-store.js
+++ b/test/mjsunit/regress/regress-2855.js
@@ -25,17 +25,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --notrack-allocation-sites
-
-function foo(a, v) {
- a[0] = v;
+function foo(a) {
+ for (var i = 0; i < 100; ++i)
+ a = new String(a);
return a;
}
-for (var i = 0; i < 3; ++i) {
- var a = Array();
- a = foo(a, 1.5);
- assertEquals(a[0], 1.5);
- a = foo(a, 2);
- assertEquals(a[0], 2);
+var expected = "hello";
+for (var i = 0; i < 4; ++i) {
+ if (i == 2) {
+ String.prototype.valueOf = function() { return 42; }
+ expected = "42";
+ }
+ assertEquals(expected, "" + foo("hello"));
}
« no previous file with comments | « test/mjsunit/regress/regress-2829.js ('k') | test/mjsunit/regress/regress-debug-deopt-while-recompile.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698