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

Unified Diff: tests/compiler/dart2js/sourcemaps/js_tracer.dart

Issue 1678043003: Add Dart code to diff_view (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update status. Created 4 years, 10 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: tests/compiler/dart2js/sourcemaps/js_tracer.dart
diff --git a/tests/compiler/dart2js/sourcemaps/js_tracer.dart b/tests/compiler/dart2js/sourcemaps/js_tracer.dart
index 1aa40fec21b3f570fe437b07787e035c10fb1b56..4ea4e91a7f7dbeec83c80705239fddc960e7bac0 100644
--- a/tests/compiler/dart2js/sourcemaps/js_tracer.dart
+++ b/tests/compiler/dart2js/sourcemaps/js_tracer.dart
@@ -22,7 +22,8 @@ TraceGraph createTraceGraph(SourceMapInfo info, Coverage coverage) {
return graph;
}
-class StepTraceListener extends TraceListener {
+class StepTraceListener extends TraceListener
+ with NodeToSourceInformationMixin {
Map<js.Node, TraceStep> steppableMap = <js.Node, TraceStep>{};
final TraceGraph graph;
@@ -30,7 +31,7 @@ class StepTraceListener extends TraceListener {
@override
void onStep(js.Node node, Offset offset, StepKind kind) {
- SourceInformation sourceInformation = node.sourceInformation;
+ SourceInformation sourceInformation = computeSourceInformation(node);
SourcePositionKind sourcePositionKind = SourcePositionKind.START;
List text = [node];
switch (kind) {
@@ -81,14 +82,16 @@ class StepTraceListener extends TraceListener {
}
createTraceStep(
+ kind,
node,
offset: offset,
sourceLocation: getSourceLocation(
- node.sourceInformation, sourcePositionKind),
+ sourceInformation, sourcePositionKind),
text: text);
}
void createTraceStep(
+ StepKind kind,
js.Node node,
{Offset offset,
List text,
@@ -101,9 +104,12 @@ class StepTraceListener extends TraceListener {
}
TraceStep step = new TraceStep(
- id, node,
+ kind,
+ id,
+ node,
offset,
- text, sourceLocation);
+ text,
+ sourceLocation);
graph.addStep(step);
steppableMap[node] = step;
« no previous file with comments | « tests/compiler/dart2js/sourcemaps/html_parts.dart ('k') | tests/compiler/dart2js/sourcemaps/output_structure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698