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

Unified Diff: pkg/kernel/lib/ast.dart

Issue 2697193008: [Kernel] replace function debuggable field with originalAsyncMarker field (Closed)
Patch Set: Changes based on feedback (+ small forgotten things) Created 3 years, 10 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
Index: pkg/kernel/lib/ast.dart
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 2f3cb111d74337e809f435bacbdfa2000ae8f9db..e2010ccb9bfa598aed3dedd0fb794cbfaee91e6e 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -1150,8 +1150,18 @@ class FunctionNode extends TreeNode {
/// (this is the default if none is specifically set).
int fileEndOffset = TreeNode.noOffset;
+ /// Current async marker for the function.
AsyncMarker asyncMarker;
- bool debuggable = true;
+
+ /// Original async marker for the function.
+ ///
+ /// In source code, a function can for instance be marked as async.
Kevin Millikin (Google) 2017/02/22 07:59:59 I wouldn't discuss all these imperative details (s
jensj 2017/02/22 10:36:45 Done.
+ /// This will make the async marker be [Async]. A kernel transformation can
+ /// however transform this code at mark it as [Sync]. Such a transformation
+ /// should update this field to indicate the original async status.
+ /// This way, for instance, the VM, can still behave slightly different
+ /// (e.g. make stacktraces more readable).
+ AsyncMarker originalAsyncMarker;
List<TypeParameter> typeParameters;
int requiredParameterCount;
List<VariableDeclaration> positionalParameters;
@@ -1167,7 +1177,8 @@ class FunctionNode extends TreeNode {
int requiredParameterCount,
this.returnType: const DynamicType(),
this.inferredReturnValue,
- this.asyncMarker: AsyncMarker.Sync})
+ this.asyncMarker: AsyncMarker.Sync,
+ this.originalAsyncMarker: AsyncMarker.Sync})
: this.positionalParameters =
positionalParameters ?? <VariableDeclaration>[],
this.requiredParameterCount =

Powered by Google App Engine
This is Rietveld 408576698