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

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

Issue 1244473002: dart2js: Fix check for support of reflection. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | pkg/compiler/lib/src/warnings.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 447be5fa202c2f117415961f4e563ae0d9fc773d..d35e5014312d3510a46c400781689bb9165c982b 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -255,6 +255,9 @@ abstract class Backend {
Backend(this.compiler);
+ /// Returns true if the backend supports reflection.
+ bool get supportsReflection;
+
/// The [ConstantSystem] used to interpret compile-time constants for this
/// backend.
ConstantSystem get constantSystem;
@@ -1369,9 +1372,9 @@ abstract class Compiler implements DiagnosticListener {
return true;
});
- if (const bool.fromEnvironment("dart2js.use.new.emitter")) {
+ if (!backend.supportsReflection) {
reportError(NO_LOCATION_SPANNABLE,
- MessageKind.MIRRORS_LIBRARY_NEW_EMITTER);
+ MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND);
} else {
reportWarning(NO_LOCATION_SPANNABLE,
MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | pkg/compiler/lib/src/warnings.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698