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

Side by Side Diff: tests/lib/mirrors/accessor_cache_overflow_test.dart

Issue 2997283003: Migrated test lock 217 to Dart 2.0. (Closed)
Patch Set: Addressed comments Created 3 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 unified diff | Download patch
« no previous file with comments | « tests/lib/mirrors/abstract_test.dart ('k') | tests/lib/mirrors/array_tracing2_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // This test runs invokes getField and setField enough times to get cached
6 // closures generated and with enough different field names to trip the path
7 // that flushes the closure cache.
8
9 library test.hot_get_field;
10
11 @MirrorsUsed(targets: "test.hot_get_field")
12 import 'dart:mirrors';
13 import 'package:expect/expect.dart';
14
15 const int optimizationThreshold = 20;
16
17 main() {
18 var digits = [
19 '0',
20 '1',
21 '2',
22 '3',
23 '4',
24 '5',
25 '6',
26 '7',
27 '8',
28 '9',
29 'A',
30 'B',
31 'C',
32 'D',
33 'E',
34 'F'
35 ];
36 var symbols = new List();
37 for (var high in digits) {
38 for (var low in digits) {
39 symbols.add(MirrorSystem.getSymbol("v$high$low"));
40 }
41 }
42
43 var im = reflect(new C());
44 for (var i = 0; i < optimizationThreshold * 2; i++) {
45 for (var fieldName in symbols) {
46 im.getField(fieldName);
47 im.setField(fieldName, 'foo');
48 }
49 }
50 }
51
52 class C {
53 var v00;
54 var v01;
55 var v02;
56 var v03;
57 var v04;
58 var v05;
59 var v06;
60 var v07;
61 var v08;
62 var v09;
63 var v0A;
64 var v0B;
65 var v0C;
66 var v0D;
67 var v0E;
68 var v0F;
69 var v10;
70 var v11;
71 var v12;
72 var v13;
73 var v14;
74 var v15;
75 var v16;
76 var v17;
77 var v18;
78 var v19;
79 var v1A;
80 var v1B;
81 var v1C;
82 var v1D;
83 var v1E;
84 var v1F;
85 var v20;
86 var v21;
87 var v22;
88 var v23;
89 var v24;
90 var v25;
91 var v26;
92 var v27;
93 var v28;
94 var v29;
95 var v2A;
96 var v2B;
97 var v2C;
98 var v2D;
99 var v2E;
100 var v2F;
101 var v30;
102 var v31;
103 var v32;
104 var v33;
105 var v34;
106 var v35;
107 var v36;
108 var v37;
109 var v38;
110 var v39;
111 var v3A;
112 var v3B;
113 var v3C;
114 var v3D;
115 var v3E;
116 var v3F;
117 var v40;
118 var v41;
119 var v42;
120 var v43;
121 var v44;
122 var v45;
123 var v46;
124 var v47;
125 var v48;
126 var v49;
127 var v4A;
128 var v4B;
129 var v4C;
130 var v4D;
131 var v4E;
132 var v4F;
133 var v50;
134 var v51;
135 var v52;
136 var v53;
137 var v54;
138 var v55;
139 var v56;
140 var v57;
141 var v58;
142 var v59;
143 var v5A;
144 var v5B;
145 var v5C;
146 var v5D;
147 var v5E;
148 var v5F;
149 var v60;
150 var v61;
151 var v62;
152 var v63;
153 var v64;
154 var v65;
155 var v66;
156 var v67;
157 var v68;
158 var v69;
159 var v6A;
160 var v6B;
161 var v6C;
162 var v6D;
163 var v6E;
164 var v6F;
165 var v70;
166 var v71;
167 var v72;
168 var v73;
169 var v74;
170 var v75;
171 var v76;
172 var v77;
173 var v78;
174 var v79;
175 var v7A;
176 var v7B;
177 var v7C;
178 var v7D;
179 var v7E;
180 var v7F;
181 var v80;
182 var v81;
183 var v82;
184 var v83;
185 var v84;
186 var v85;
187 var v86;
188 var v87;
189 var v88;
190 var v89;
191 var v8A;
192 var v8B;
193 var v8C;
194 var v8D;
195 var v8E;
196 var v8F;
197 var v90;
198 var v91;
199 var v92;
200 var v93;
201 var v94;
202 var v95;
203 var v96;
204 var v97;
205 var v98;
206 var v99;
207 var v9A;
208 var v9B;
209 var v9C;
210 var v9D;
211 var v9E;
212 var v9F;
213 var vA0;
214 var vA1;
215 var vA2;
216 var vA3;
217 var vA4;
218 var vA5;
219 var vA6;
220 var vA7;
221 var vA8;
222 var vA9;
223 var vAA;
224 var vAB;
225 var vAC;
226 var vAD;
227 var vAE;
228 var vAF;
229 var vB0;
230 var vB1;
231 var vB2;
232 var vB3;
233 var vB4;
234 var vB5;
235 var vB6;
236 var vB7;
237 var vB8;
238 var vB9;
239 var vBA;
240 var vBB;
241 var vBC;
242 var vBD;
243 var vBE;
244 var vBF;
245 var vC0;
246 var vC1;
247 var vC2;
248 var vC3;
249 var vC4;
250 var vC5;
251 var vC6;
252 var vC7;
253 var vC8;
254 var vC9;
255 var vCA;
256 var vCB;
257 var vCC;
258 var vCD;
259 var vCE;
260 var vCF;
261 var vD0;
262 var vD1;
263 var vD2;
264 var vD3;
265 var vD4;
266 var vD5;
267 var vD6;
268 var vD7;
269 var vD8;
270 var vD9;
271 var vDA;
272 var vDB;
273 var vDC;
274 var vDD;
275 var vDE;
276 var vDF;
277 var vE0;
278 var vE1;
279 var vE2;
280 var vE3;
281 var vE4;
282 var vE5;
283 var vE6;
284 var vE7;
285 var vE8;
286 var vE9;
287 var vEA;
288 var vEB;
289 var vEC;
290 var vED;
291 var vEE;
292 var vEF;
293 var vF0;
294 var vF1;
295 var vF2;
296 var vF3;
297 var vF4;
298 var vF5;
299 var vF6;
300 var vF7;
301 var vF8;
302 var vF9;
303 var vFA;
304 var vFB;
305 var vFC;
306 var vFD;
307 var vFE;
308 var vFF;
309 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/abstract_test.dart ('k') | tests/lib/mirrors/array_tracing2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698