From: erik.corry@gmail.com Date: Thu, 7 Jun 2012 20:12:50 +0000 (+0000) Subject: More tests for r11732 syntax based fast-mode heuristics. X-Git-Tag: upstream/4.7.83~16594 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15ecbe0f93711960c61829a0f8b7b7f58fd25ded;p=platform%2Fupstream%2Fv8.git More tests for r11732 syntax based fast-mode heuristics. Review URL: https://chromiumcodereview.appspot.com/10539046 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/test/mjsunit/fast-non-keyed.js b/test/mjsunit/fast-non-keyed.js index ea996aa..c2f7fc7 100644 --- a/test/mjsunit/fast-non-keyed.js +++ b/test/mjsunit/fast-non-keyed.js @@ -66,6 +66,35 @@ function AddPropsNonKeyed(obj) { 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); @@ -74,3 +103,11 @@ assertFalse(%HasFastProperties(keyed)); 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));