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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2979463002: Revert "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service." (Closed)
Patch Set: 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
Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 0d3e47a6abce7f195ba8c7d91dd5440ba8422a2c..dc87c7a5ff330ca818702f10d06f086b23b6baf9 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -17,8 +17,6 @@ import '../parser/parser.dart'
import '../parser/identifier_context.dart' show IdentifierContext;
-import '../parser/native_support.dart' show skipNativeClause;
-
import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart';
import 'package:front_end/src/fasta/kernel/utils.dart' show offsetForToken;
@@ -95,7 +93,6 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
final Scope enclosingScope;
final bool enableNative;
- final bool stringExpectedAfterNative;
/// Whether to ignore an unresolved reference to `main` within the body of
/// `_getMainClosure` when compiling the current library.
@@ -183,10 +180,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
this._typeInferrer)
: enclosingScope = scope,
library = library,
- enableNative =
- library.loader.target.backendTarget.enableNative(library.uri),
- stringExpectedAfterNative =
- library.loader.target.backendTarget.nativeExtensionExpectsString,
+ enableNative = library.loader.target.enableNative(library),
ignoreMainInGetMainClosure = library.uri.scheme == 'dart' &&
(library.uri.path == "_builtin" || library.uri.path == "ui"),
needsImplicitSuperInitializer =
@@ -3007,7 +3001,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
@override
Token handleUnrecoverableError(Token token, FastaMessage message) {
if (enableNative && message.code == codeExpectedFunctionBody) {
- Token recover = skipNativeClause(token, stringExpectedAfterNative);
+ Token recover = library.loader.target.skipNativeClause(token);
if (recover != null) return recover;
} else if (message.code == codeExpectedButGot) {
String expected = message.arguments["string"];
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698