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

Side by Side Diff: lib/compiler/implementation/enqueue.dart

Issue 10539156: Track fields which are known to be always set to integer constants (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed second round of comments 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 | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/ssa/bailout.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class EnqueueTask extends CompilerTask { 5 class EnqueueTask extends CompilerTask {
6 final Enqueuer codegen; 6 final Enqueuer codegen;
7 final Enqueuer resolution; 7 final Enqueuer resolution;
8 8
9 String get name() => 'Enqueue'; 9 String get name() => 'Enqueue';
10 10
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 void registerDynamicInvocation(SourceString methodName, Selector selector) { 283 void registerDynamicInvocation(SourceString methodName, Selector selector) {
284 assert(selector !== null); 284 assert(selector !== null);
285 registerInvocation(methodName, selector); 285 registerInvocation(methodName, selector);
286 } 286 }
287 287
288 void registerDynamicInvocationOf(Element element) { 288 void registerDynamicInvocationOf(Element element) {
289 addToWorkList(element); 289 addToWorkList(element);
290 } 290 }
291 291
292 void registerFieldInitializer(SourceString name, Type type, bool isInteger) {
293 task.measure(() {
294 universe.updateFieldIntegerInitializers(type, name, isInteger);
295 });
296 }
297
292 void registerDynamicGetter(SourceString methodName, Selector selector) { 298 void registerDynamicGetter(SourceString methodName, Selector selector) {
293 registerInvokedGetter(methodName, selector); 299 registerInvokedGetter(methodName, selector);
294 } 300 }
295 301
296 void registerDynamicSetter(SourceString methodName, Selector selector) { 302 void registerDynamicSetter(SourceString methodName, Selector selector) {
297 registerInvokedSetter(methodName, selector); 303 registerInvokedSetter(methodName, selector);
298 } 304 }
299 305
300 void registerFieldGetter(SourceString getterName, Type type) { 306 void registerFieldGetter(SourceString getterName, Type type) {
301 task.measure(() { 307 task.measure(() {
302 registerNewSelector(getterName, 308 registerNewSelector(getterName,
303 new TypedSelector(type, Selector.GETTER), 309 new TypedSelector(type, Selector.GETTER),
304 universe.fieldGetters); 310 universe.fieldGetters);
305 }); 311 });
306 } 312 }
307 313
308 void registerFieldSetter(SourceString setterName, Type type) { 314 void registerFieldSetter(SourceString setterName, Type type, bool isInteger) {
309 task.measure(() { 315 task.measure(() {
310 registerNewSelector(setterName, 316 registerNewSelector(setterName,
311 new TypedSelector(type, Selector.SETTER), 317 new TypedSelector(type, Selector.SETTER),
312 universe.fieldSetters); 318 universe.fieldSetters);
319 universe.updateFieldIntegerSetters(type, setterName, isInteger);
313 }); 320 });
314 } 321 }
315 322
316 // TODO(ngeoffray): This should get a type. 323 // TODO(ngeoffray): This should get a type.
317 void registerIsCheck(Element element) { 324 void registerIsCheck(Element element) {
318 universe.isChecks.add(element); 325 universe.isChecks.add(element);
319 } 326 }
320 327
321 void forEach(f(WorkItem work)) { 328 void forEach(f(WorkItem work)) {
322 while (!queue.isEmpty()) { 329 while (!queue.isEmpty()) {
323 f(queue.removeLast()); 330 f(queue.removeLast());
324 } 331 }
325 } 332 }
326 } 333 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/ssa/bailout.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698