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

Unified Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2888823004: Remove async modifier from outlines (Closed)
Patch Set: Created 3 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
Index: pkg/front_end/lib/src/fasta/source/outline_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 8fa539d7197e2e6b1b268a5108182e1a74b88e63..a20bf7d25e5b1dc1c2e3b24f151193b5a6243ca6 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -4,7 +4,7 @@
library fasta.outline_builder;
-import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind;
+import 'package:kernel/ast.dart' show ProcedureKind;
import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip;
@@ -45,26 +45,6 @@ enum MethodBody {
RedirectingFactoryBody,
}
-AsyncMarker asyncMarkerFromTokens(Token asyncToken, Token starToken) {
Siggi Cherem (dart-lang) 2017/05/18 19:44:03 this now only used by body_builder, so I moved it
- if (asyncToken == null || identical(asyncToken.stringValue, "sync")) {
- if (starToken == null) {
- return AsyncMarker.Sync;
- } else {
- assert(identical(starToken.stringValue, "*"));
- return AsyncMarker.SyncStar;
- }
- } else if (identical(asyncToken.stringValue, "async")) {
- if (starToken == null) {
- return AsyncMarker.Async;
- } else {
- assert(identical(starToken.stringValue, "*"));
- return AsyncMarker.AsyncStar;
- }
- } else {
- return internalError("Unknown async modifier: $asyncToken");
- }
-}
-
class OutlineBuilder extends UnhandledListener {
final SourceLibraryBuilder library;
@@ -306,7 +286,6 @@ class OutlineBuilder extends UnhandledListener {
void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
debugEvent("endTopLevelMethod");
MethodBody kind = pop();
- AsyncMarker asyncModifier = pop();
List<FormalParameterBuilder> formals = pop();
int formalsOffset = pop();
List<TypeVariableBuilder> typeVariables = pop();
@@ -324,7 +303,6 @@ class OutlineBuilder extends UnhandledListener {
name,
typeVariables,
formals,
- asyncModifier,
computeProcedureKind(getOrSet),
charOffset,
formalsOffset,
@@ -359,7 +337,6 @@ class OutlineBuilder extends UnhandledListener {
// This will cause an error later.
pop();
}
- AsyncMarker asyncModifier = pop();
List<FormalParameterBuilder> formals = pop();
int formalsOffset = pop();
List<TypeVariableBuilder> typeVariables = pop();
@@ -404,7 +381,6 @@ class OutlineBuilder extends UnhandledListener {
name,
typeVariables,
formals,
- asyncModifier,
kind,
charOffset,
formalsOffset,
@@ -720,7 +696,6 @@ class OutlineBuilder extends UnhandledListener {
if (kind == MethodBody.RedirectingFactoryBody) {
redirectionTarget = pop();
}
- AsyncMarker asyncModifier = pop();
List<FormalParameterBuilder> formals = pop();
int formalsOffset = pop();
var name = pop();
@@ -731,7 +706,6 @@ class OutlineBuilder extends UnhandledListener {
modifiers,
name,
formals,
- asyncModifier,
redirectionTarget,
factoryKeyword.next.charOffset,
formalsOffset,
@@ -786,7 +760,6 @@ class OutlineBuilder extends UnhandledListener {
@override
void handleAsyncModifier(Token asyncToken, Token starToken) {
debugEvent("AsyncModifier");
- push(asyncMarkerFromTokens(asyncToken, starToken));
}
@override

Powered by Google App Engine
This is Rietveld 408576698