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

Unified Diff: test/mjsunit/compare-known-objects.js

Issue 25009003: Inline some more compare operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add tests Created 7 years, 3 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
Index: test/mjsunit/compare-known-objects.js
diff --git a/test/mjsunit/compare-known-objects-slow.js b/test/mjsunit/compare-known-objects.js
similarity index 87%
copy from test/mjsunit/compare-known-objects-slow.js
copy to test/mjsunit/compare-known-objects.js
index afa198fcb352ea7f186a285146a61fd1ab70d51b..afffc07014f67312589a9b1ba46397b484ac0402 100644
--- a/test/mjsunit/compare-known-objects-slow.js
+++ b/test/mjsunit/compare-known-objects.js
@@ -50,9 +50,11 @@ function test(a, b) {
assertFalse(eq_strict(a, b));
}
-// Prepare two objects in slow mode that have the same map.
-var obj1 = %OptimizeObjectForAddingMultipleProperties({}, 1);
-var obj2 = %OptimizeObjectForAddingMultipleProperties({}, 1);
+function O(){};
+O.prototype.t = function() {}
+
+var obj1 = new O;
+var obj2 = new O;
// Test original objects.
assertTrue(%HaveSameMap(obj1, obj2));
@@ -60,10 +62,4 @@ test(obj1, obj2);
// Test after adding property to first object.
obj1.x = 1;
-assertTrue(%HaveSameMap(obj1, obj2));
-test(obj1, obj2);
-
-// Test after adding property to second object.
-obj2.y = 2;
-assertTrue(%HaveSameMap(obj1, obj2));
test(obj1, obj2);

Powered by Google App Engine
This is Rietveld 408576698