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

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

Issue 11931012: Fix arguments materialization for inlined apply(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « src/hydrogen-instructions.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-2489.js
diff --git a/test/mjsunit/regress/regress-sqrt.js b/test/mjsunit/regress/regress-2489.js
similarity index 83%
copy from test/mjsunit/regress/regress-sqrt.js
copy to test/mjsunit/regress/regress-2489.js
index f2a7e55242cbcdfb281f8e05c465000c98b5a8bc..882c4f794a88e24d1d64e86a466b27c39f51e625 100644
--- a/test/mjsunit/regress/regress-sqrt.js
+++ b/test/mjsunit/regress/regress-2489.js
@@ -1,4 +1,4 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
+// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -27,21 +27,24 @@
// Flags: --allow-natives-syntax
-// Check that Math.sqrt returns the same value regardless of being
-// optimized or not.
+"use strict";
-function f(x) {
- return Math.sqrt(x);
+function f(a, b) {
+ return g("c", "d");
}
-var x = 7.0506280066499245e-233;
+function g(a, b) {
+ g.constructor.apply(this, arguments);
+}
-var a = f(x);
+g.constructor = function(a, b) {
+ assertEquals("c", a);
+ assertEquals("d", b);
+}
-f(0.1);
-f(0.2);
+f("a", "b");
+f("a", "b");
%OptimizeFunctionOnNextCall(f);
-
-var b = f(x);
-
-assertEquals(a, b);
+f("a", "b");
+g.x = "deopt";
+f("a", "b");
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698