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

Unified Diff: test/mjsunit/fast-non-keyed.js

Issue 10539046: More tests for r11732 syntax based fast-mode heuristics. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/fast-non-keyed.js
===================================================================
--- test/mjsunit/fast-non-keyed.js (revision 11732)
+++ test/mjsunit/fast-non-keyed.js (working copy)
@@ -66,7 +66,36 @@
obj.x25 = 0;
}
+function AddProps3(obj) {
+ obj["x0"] = 0;
+ obj["x1"] = 0;
+ obj["x2"] = 0;
+ obj["x3"] = 0;
+ obj["x4"] = 0;
+ obj["x5"] = 0;
+ obj["x6"] = 0;
+ obj["x7"] = 0;
+ obj["x8"] = 0;
+ obj["x9"] = 0;
+ obj["x10"] = 0;
+ obj["x11"] = 0;
+ obj["x12"] = 0;
+ obj["x13"] = 0;
+ obj["x14"] = 0;
+ obj["x15"] = 0;
+ obj["x16"] = 0;
+ obj["x17"] = 0;
+ obj["x18"] = 0;
+ obj["x19"] = 0;
+ obj["x20"] = 0;
+ obj["x21"] = 0;
+ obj["x22"] = 0;
+ obj["x23"] = 0;
+ obj["x24"] = 0;
+ obj["x25"] = 0;
+}
+
var keyed = {};
AddProps(keyed);
assertFalse(%HasFastProperties(keyed));
@@ -74,3 +103,11 @@
var non_keyed = {};
AddPropsNonKeyed(non_keyed);
assertTrue(%HasFastProperties(non_keyed));
+
+var obj3 = {};
+AddProps3(obj3);
+assertTrue(%HasFastProperties(obj3));
+
+var bad_name = {};
+bad_name[".foo"] = 0;
+assertFalse(%HasFastProperties(bad_name));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698