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

Unified Diff: pkg/compiler/lib/src/ssa/codegen.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/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 4ac588115e5d3e8801739e662d7d845c5a599215..7b7596eccd59b5564c0d1fe778a98e709c1ec78f 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -152,12 +152,17 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
continueAction = new Map<Entity, EntityAction>();
Compiler get compiler => backend.compiler;
+
NativeEmitter get nativeEmitter => backend.emitter.nativeEmitter;
+
CodegenRegistry get registry => work.registry;
+
native.NativeEnqueuer get nativeEnqueuer {
return compiler.enqueuer.codegen.nativeEnqueuer;
}
+ DiagnosticReporter get reporter => compiler.reporter;
+
bool isGenerateAtUseSite(HInstruction instruction) {
return generateAtUseSite.contains(instruction);
}
@@ -935,7 +940,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
currentContainer = oldContainer;
break;
default:
- compiler.internalError(condition.conditionExpression,
+ reporter.internalError(condition.conditionExpression,
'Unexpected loop kind: ${info.kind}.');
}
js.Statement result = loop;
@@ -1336,10 +1341,10 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// is responsible for visiting the successor.
if (dominated.isEmpty) return;
if (dominated.length > 2) {
- compiler.internalError(node, 'dominated.length = ${dominated.length}');
+ reporter.internalError(node, 'dominated.length = ${dominated.length}');
}
if (dominated.length == 2 && block != currentGraph.entry) {
- compiler.internalError(node, 'node.block != currentGraph.entry');
+ reporter.internalError(node, 'node.block != currentGraph.entry');
}
assert(dominated[0] == block.successors[0]);
visitBasicBlock(dominated[0]);
@@ -1430,7 +1435,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
visitTry(HTry node) {
// We should never get here. Try/catch/finally is always handled using block
// information in [visitTryInfo].
- compiler.internalError(node, 'visitTry should not be called.');
+ reporter.internalError(node, 'visitTry should not be called.');
}
bool tryControlFlowOperation(HIf node) {
@@ -2703,7 +2708,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
checkString(input, '!==', input.sourceInformation);
return pop();
}
- compiler.internalError(input, 'Unexpected check: $checkedType.');
+ reporter.internalError(input, 'Unexpected check: $checkedType.');
return null;
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698