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

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

Powered by Google App Engine
This is Rietveld 408576698