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

Side by Side Diff: pkg/compiler/lib/src/elements/common.dart

Issue 2731173002: Add ClassEntity.library, MemberEntity.library and FunctionEntity.isExternal (Closed)
Patch Set: Updated cf. comments. Created 3 years, 9 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 | « no previous file | pkg/compiler/lib/src/elements/entities.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// Mixins that implement convenience methods on [Element] subclasses. 5 /// Mixins that implement convenience methods on [Element] subclasses.
6 6
7 library elements.common; 7 library elements.common;
8 8
9 import '../common/names.dart' show Identifiers, Names, Uris; 9 import '../common/names.dart' show Identifiers, Names, Uris;
10 import '../common_elements.dart' show CommonElements; 10 import '../common_elements.dart' show CommonElements;
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 } 604 }
605 605
606 enum _FromEnvironmentState { 606 enum _FromEnvironmentState {
607 NOT, 607 NOT,
608 BOOL, 608 BOOL,
609 INT, 609 INT,
610 STRING, 610 STRING,
611 } 611 }
612 612
613 abstract class ConstructorElementCommon implements ConstructorElement { 613 abstract class ConstructorElementCommon implements ConstructorElement {
614 LibraryElement get library;
615
614 _FromEnvironmentState _fromEnvironmentState; 616 _FromEnvironmentState _fromEnvironmentState;
615 617
616 _FromEnvironmentState get fromEnvironmentState { 618 _FromEnvironmentState get fromEnvironmentState {
617 if (_fromEnvironmentState == null) { 619 if (_fromEnvironmentState == null) {
618 _fromEnvironmentState = _FromEnvironmentState.NOT; 620 _fromEnvironmentState = _FromEnvironmentState.NOT;
619 if (name == Identifiers.fromEnvironment && library.isDartCore) { 621 if (name == Identifiers.fromEnvironment && library.isDartCore) {
620 switch (enclosingClass.name) { 622 switch (enclosingClass.name) {
621 case 'bool': 623 case 'bool':
622 _fromEnvironmentState = _FromEnvironmentState.BOOL; 624 _fromEnvironmentState = _FromEnvironmentState.BOOL;
623 break; 625 break;
(...skipping 22 matching lines...) Expand all
646 @override 648 @override
647 bool get isBoolFromEnvironmentConstructor { 649 bool get isBoolFromEnvironmentConstructor {
648 return fromEnvironmentState == _FromEnvironmentState.BOOL; 650 return fromEnvironmentState == _FromEnvironmentState.BOOL;
649 } 651 }
650 652
651 @override 653 @override
652 bool get isStringFromEnvironmentConstructor { 654 bool get isStringFromEnvironmentConstructor {
653 return fromEnvironmentState == _FromEnvironmentState.STRING; 655 return fromEnvironmentState == _FromEnvironmentState.STRING;
654 } 656 }
655 } 657 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/entities.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698