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

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

Issue 13552003: Add extra flag for load-ic stubs in code cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/stub-cache.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-2593.js
diff --git a/test/mjsunit/regress/regress-2489.js b/test/mjsunit/regress/regress-2593.js
similarity index 76%
copy from test/mjsunit/regress/regress-2489.js
copy to test/mjsunit/regress/regress-2593.js
index 882c4f794a88e24d1d64e86a466b27c39f51e625..fd158d5181ecfe1e60744a872b422af2f16b7855 100644
--- a/test/mjsunit/regress/regress-2489.js
+++ b/test/mjsunit/regress/regress-2593.js
@@ -25,26 +25,37 @@
// (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: --allow-natives-syntax
+// Flags: --expose_gc
-"use strict";
+p1 = { };
+p2 = { };
+p3 = { x : 1 };
+p2.__proto__ = p3
+p1.__proto__ = p2
-function f(a, b) {
- return g("c", "d");
-}
+// Normalize p1.
+p1.some_random_property2 = 1
+delete p1.some_random_property2
+
+// Make sure all objects are in old space.
+for (var i = 0; i < 10; i++) gc();
-function g(a, b) {
- g.constructor.apply(this, arguments);
+function f2() {
+ p2.x;
}
-g.constructor = function(a, b) {
- assertEquals("c", a);
- assertEquals("d", b);
+function f1() {
+ return p1.x;
}
-f("a", "b");
-f("a", "b");
-%OptimizeFunctionOnNextCall(f);
-f("a", "b");
-g.x = "deopt";
-f("a", "b");
+// Create load stub in p2.
+for (var i = 0; i < 10; i++) f2();
+
+// Create load stub in p2 for p1.
+for (var i = 0; i < 10; i++) f1();
+
+assertEquals(1, f1());
+
+p2.x = 2;
+
+assertEquals(2, f1());
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698