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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 266193004: Clean patch implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/elements/elements.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index a203ec532980c5cae0584e5bea2ba4843ca506c4..2fd142a4481b6f25c0b382974a6b54eeab30ac38 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -247,19 +247,56 @@ abstract class Element implements Spannable {
FunctionElement asFunctionElement();
+ /// Is [:true:] if this element has a corresponding patch.
+ ///
+ /// If [:true:] this element has a non-null [patch] field.
+ ///
+ /// See [:patch_parser.dart:] for a description of the terminology.
bool get isPatched;
+
+ /// Is [:true:] if this element is a patch.
+ ///
+ /// If [:true:] this element has a non-null [origin] field.
+ ///
+ /// See [:patch_parser.dart:] for a description of the terminology.
bool get isPatch;
+
+ /// Is [:true:] if this element defines the implementation for the entity of
+ /// this element.
+ ///
+ /// See [:patch_parser.dart:] for a description of the terminology.
bool get isImplementation;
+
+ /// Is [:true:] if this element introduces the entity of this element.
+ ///
+ /// See [:patch_parser.dart:] for a description of the terminology.
bool get isDeclaration;
- bool get isSynthesized;
- bool get isForwardingConstructor;
- bool get isMixinApplication;
+ /// Returns the element which defines the implementation for the entity of
+ /// this element.
+ ///
+ /// See [:patch_parser.dart:] for a description of the terminology.
Element get implementation;
+
+ /// Returns the element which introduces the entity of this element.
+ ///
+ /// See [:patch_parser.dart:] for a description of the terminology.
Element get declaration;
+
+ /// Returns the patch for this element if this element is patched.
+ ///
+ /// See [:patch_parser.dart:] for a description of the terminology.
Element get patch;
+
+ /// Returns the origin for this element if this element is a patch.
+ ///
+ /// See [:patch_parser.dart:] for a description of the terminology.
Element get origin;
+ bool get isSynthesized;
+ bool get isForwardingConstructor;
+ bool get isMixinApplication;
+
bool hasFixedBackendName();
String fixedBackendName();
@@ -842,8 +879,6 @@ abstract class FunctionElement extends Element
InterfaceType computeTargetType(InterfaceType newType);
// TODO(kasperl): These are bit fishy. Do we really need them?
- void set patch(FunctionElement value);
- void set origin(FunctionElement value);
void set defaultImplementation(FunctionElement value);
/// Do not use [computeSignature] outside of the resolver; instead retrieve
@@ -915,8 +950,6 @@ abstract class ClassElement extends TypeDeclarationElement
// TODO(kasperl): These are bit fishy. Do we really need them?
void set supertype(DartType value);
void set interfaces(Link<DartType> value);
- void set patch(ClassElement value);
- void set origin(ClassElement value);
void set supertypeLoadState(int value);
void set resolutionState(int value);
void set nativeTagInfo(String value);
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698