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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/glue.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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 | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen/glue.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/glue.dart b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
index 37dd0ae333038226b49027cb39d9ab9ec0e54bbc..3a229e385e697d437149bb76dcda6627f246316d 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/glue.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
@@ -14,6 +14,10 @@ import '../../dart_types.dart' show
DartType,
TypeVariableType,
InterfaceType;
+import '../../diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
+import '../../diagnostics/spannable.dart' show
+ CURRENT_ELEMENT_SPANNABLE;
import '../../enqueue.dart' show
CodegenEnqueuer;
import '../../elements/elements.dart';
@@ -46,12 +50,14 @@ class Glue {
ClassWorld get classWorld => _compiler.world;
+ DiagnosticReporter get reporter => _compiler.reporter;
+
js.Expression constantReference(ConstantValue value) {
return _emitter.constantReference(value);
}
reportInternalError(String message) {
- _compiler.internalError(_compiler.currentElement, message);
+ reporter.internalError(CURRENT_ELEMENT_SPANNABLE, message);
}
bool isUsedAsMixin(ClassElement classElement) {
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698