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

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

Issue 2832353002: Add support for building patched_sdk and platform.dill for dart2js: (Closed)
Patch Set: fix .gn circularity by removing use of rebase_path Created 3 years, 8 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/diet_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index 36b7c6ce224ee725fb4dad5facfd5a1bd001090b..695b5fe2e36dfd2a79775e8e16b7196c8a52d55d 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -22,8 +22,7 @@ import '../parser/parser.dart' show Parser, optional;
import '../scanner/token.dart' show BeginGroupToken, Token;
-import '../parser/dart_vm_native.dart'
- show removeNativeClause, skipNativeClause;
+import '../parser/dart_vm_native.dart' show removeNativeClause;
import '../util/link.dart' show Link;
@@ -483,11 +482,8 @@ class DietListener extends StackListener {
@override
Token handleUnrecoverableError(Token token, FastaMessage message) {
if (isDartLibrary && message.code == codeExpectedBlockToSkip) {
- Token recover = skipNativeClause(token);
- if (recover != null) {
- assert(isTargetingDartVm);
- return recover;
- }
+ Token recover = library.loader.target.skipNativeClause(token);
+ if (recover != null) return recover;
}
return super.handleUnrecoverableError(token, message);
}
@@ -569,11 +565,6 @@ class DietListener extends StackListener {
return builder;
}
- bool get isTargetingDartVm {
- // TODO(ahe): Find a more reliable way to check if this is the Dart VM.
- return !coreTypes.containsLibrary("dart:_js_helper");
- }
-
@override
void debugEvent(String name) {
// printEvent(name);
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart ('k') | pkg/front_end/lib/src/fasta/source/directive_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698