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

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

Issue 15861028: Implement MethodMirror.metadata. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments and deal with private members of BoundClosure Created 7 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
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 part of dart2js; 5 part of dart2js;
6 6
7 class EnqueueTask extends CompilerTask { 7 class EnqueueTask extends CompilerTask {
8 final ResolutionEnqueuer resolution; 8 final ResolutionEnqueuer resolution;
9 final CodegenEnqueuer codegen; 9 final CodegenEnqueuer codegen;
10 10
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 if (universe.hasInvokedSetter(member, compiler)) { 225 if (universe.hasInvokedSetter(member, compiler)) {
226 nativeEnqueuer.registerFieldStore(member); 226 nativeEnqueuer.registerFieldStore(member);
227 // See comment after registerFieldLoad above. 227 // See comment after registerFieldLoad above.
228 nativeEnqueuer.registerFieldLoad(member); 228 nativeEnqueuer.registerFieldLoad(member);
229 return; 229 return;
230 } 230 }
231 // Native fields need to go into instanceMembersByName as they 231 // Native fields need to go into instanceMembersByName as they
232 // are virtual instantiation points and escape points. 232 // are virtual instantiation points and escape points.
233 } else { 233 } else {
234 // The codegen inlines instance fields initialization, so it
235 // does not need to add individual fields in the work list.
236 if (isResolutionQueue) { 234 if (isResolutionQueue) {
235 // All field initializers must be resolved as they could
236 // have an observable side-effect (and cannot be tree-shaken
237 // away). However, codegen inlines field initializers, so
238 // it does not need to add individual fields in the work
239 // list.
237 addToWorkList(member); 240 addToWorkList(member);
238 } 241 }
239 return; 242 return;
240 } 243 }
241 } else if (member.kind == ElementKind.FUNCTION) { 244 } else if (member.kind == ElementKind.FUNCTION) {
242 if (member.name == Compiler.NO_SUCH_METHOD) { 245 if (member.name == Compiler.NO_SUCH_METHOD) {
243 enableNoSuchMethod(member); 246 enableNoSuchMethod(member);
244 } 247 }
245 // If there is a property access with the same name as a method we 248 // If there is a property access with the same name as a method we
246 // need to emit the method. 249 // need to emit the method.
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 while(!queue.isEmpty) { 759 while(!queue.isEmpty) {
757 // TODO(johnniwinther): Find an optimal process order for codegen. 760 // TODO(johnniwinther): Find an optimal process order for codegen.
758 f(queue.removeLast()); 761 f(queue.removeLast());
759 } 762 }
760 } 763 }
761 764
762 void _logSpecificSummary(log(message)) { 765 void _logSpecificSummary(log(message)) {
763 log('Compiled ${generatedCode.length} methods.'); 766 log('Compiled ${generatedCode.length} methods.');
764 } 767 }
765 } 768 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698