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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 obj.x18 = 0; 59 obj.x18 = 0;
60 obj.x19 = 0; 60 obj.x19 = 0;
61 obj.x20 = 0; 61 obj.x20 = 0;
62 obj.x21 = 0; 62 obj.x21 = 0;
63 obj.x22 = 0; 63 obj.x22 = 0;
64 obj.x23 = 0; 64 obj.x23 = 0;
65 obj.x24 = 0; 65 obj.x24 = 0;
66 obj.x25 = 0; 66 obj.x25 = 0;
67 } 67 }
68 68
69 function AddProps3(obj) {
70 obj["x0"] = 0;
71 obj["x1"] = 0;
72 obj["x2"] = 0;
73 obj["x3"] = 0;
74 obj["x4"] = 0;
75 obj["x5"] = 0;
76 obj["x6"] = 0;
77 obj["x7"] = 0;
78 obj["x8"] = 0;
79 obj["x9"] = 0;
80 obj["x10"] = 0;
81 obj["x11"] = 0;
82 obj["x12"] = 0;
83 obj["x13"] = 0;
84 obj["x14"] = 0;
85 obj["x15"] = 0;
86 obj["x16"] = 0;
87 obj["x17"] = 0;
88 obj["x18"] = 0;
89 obj["x19"] = 0;
90 obj["x20"] = 0;
91 obj["x21"] = 0;
92 obj["x22"] = 0;
93 obj["x23"] = 0;
94 obj["x24"] = 0;
95 obj["x25"] = 0;
96 }
97
69 98
70 var keyed = {}; 99 var keyed = {};
71 AddProps(keyed); 100 AddProps(keyed);
72 assertFalse(%HasFastProperties(keyed)); 101 assertFalse(%HasFastProperties(keyed));
73 102
74 var non_keyed = {}; 103 var non_keyed = {};
75 AddPropsNonKeyed(non_keyed); 104 AddPropsNonKeyed(non_keyed);
76 assertTrue(%HasFastProperties(non_keyed)); 105 assertTrue(%HasFastProperties(non_keyed));
106
107 var obj3 = {};
108 AddProps3(obj3);
109 assertTrue(%HasFastProperties(obj3));
110
111 var bad_name = {};
112 bad_name[".foo"] = 0;
113 assertFalse(%HasFastProperties(bad_name));
OLDNEW
« 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