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

Side by Side Diff: pkg/compiler/lib/src/js_backend/mirrors_analysis.dart

Issue 2935663002: Remove Compiler.commonElements (Closed)
Patch Set: Remove Compiler._commonElements Created 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library dart2js.mirrors_handler; 5 library dart2js.mirrors_handler;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart'; 8 import '../common/resolution.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 _enqueueReflectiveMember(member.element, includeClass); 382 _enqueueReflectiveMember(member.element, includeClass);
383 }); 383 });
384 } 384 }
385 } 385 }
386 386
387 /// Set of classes that need to be considered for reflection although not 387 /// Set of classes that need to be considered for reflection although not
388 /// otherwise visible during resolution. 388 /// otherwise visible during resolution.
389 Iterable<ClassEntity> get _classesRequiredForReflection { 389 Iterable<ClassEntity> get _classesRequiredForReflection {
390 // TODO(herhut): Clean this up when classes needed for rti are tracked. 390 // TODO(herhut): Clean this up when classes needed for rti are tracked.
391 return [ 391 return [
392 _backend.compiler.commonElements.closureClass, 392 _resolution.commonElements.closureClass,
393 _backend.compiler.commonElements.jsIndexableClass 393 _resolution.commonElements.jsIndexableClass
394 ]; 394 ];
395 } 395 }
396 396
397 /// Enqueue special classes that might not be visible by normal means or that 397 /// Enqueue special classes that might not be visible by normal means or that
398 /// would not normally be enqueued: 398 /// would not normally be enqueued:
399 /// 399 ///
400 /// [Closure] is treated specially as it is the superclass of all closures. 400 /// [Closure] is treated specially as it is the superclass of all closures.
401 /// Although it is in an internal library, we mark it as reflectable. Note 401 /// Although it is in an internal library, we mark it as reflectable. Note
402 /// that none of its methods are reflectable, unless reflectable by 402 /// that none of its methods are reflectable, unless reflectable by
403 /// inheritance. 403 /// inheritance.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 489
490 /// Records that [constant] is used by the element behind [registry]. 490 /// Records that [constant] is used by the element behind [registry].
491 class Dependency { 491 class Dependency {
492 final ConstantValue constant; 492 final ConstantValue constant;
493 final Element annotatedElement; 493 final Element annotatedElement;
494 494
495 const Dependency(this.constant, this.annotatedElement); 495 const Dependency(this.constant, this.annotatedElement);
496 496
497 String toString() => '$annotatedElement:${constant.toStructuredText()}'; 497 String toString() => '$annotatedElement:${constant.toStructuredText()}';
498 } 498 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/patch_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698