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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 2977583002: Fix handling of async patches. (Closed)
Patch Set: Fix Created 3 years, 5 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/js_runtime/lib/isolate_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 26dab5fea1f61c9e298da7e25ebe5030f262397c..c5612a72201b3ad9e970599af6859c463fd039a1 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -341,6 +341,16 @@ class ErroneousConstructorElementX extends ErroneousElementX
}
@override
+ get _asyncMarker {
+ throw new UnsupportedError("_asyncMarker");
+ }
+
+ @override
+ set _asyncMarker(_) {
+ throw new UnsupportedError("_asyncMarker=");
+ }
+
+ @override
get effectiveTargetInternal {
throw new UnsupportedError("effectiveTargetInternal");
}
@@ -2045,7 +2055,7 @@ abstract class BaseFunctionElementX extends ElementX
FunctionSignature _functionSignatureCache;
- AsyncMarker asyncMarker = AsyncMarker.SYNC;
+ AsyncMarker _asyncMarker = AsyncMarker.SYNC;
BaseFunctionElementX(String name, ElementKind kind, Modifiers this.modifiers,
Element enclosing)
@@ -2053,6 +2063,22 @@ abstract class BaseFunctionElementX extends ElementX
assert(modifiers != null);
}
+ AsyncMarker get asyncMarker {
+ if (isPatched) {
+ return patch.asyncMarker;
+ }
+ return _asyncMarker;
+ }
+
+ void set asyncMarker(AsyncMarker value) {
+ if (isPatched) {
+ BaseFunctionElementX function = patch;
+ function.asyncMarker = value;
+ } else {
+ _asyncMarker = value;
+ }
+ }
+
bool get isExternal => modifiers.isExternal;
bool get isInstanceMember {
« no previous file with comments | « no previous file | sdk/lib/_internal/js_runtime/lib/isolate_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698