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

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

Issue 1196433002: Create and test source mapping for invocations. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Handle the new Name class in the JS Printer. Created 5 years, 6 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/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index f5e5cc9f744477517193dcd9b6a7560f48e8a101..5b1722ddab71b5e4a81920ac98506f0890d38805 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -43,7 +43,7 @@ typedef void IrBuilderCallback(Element element, ir.FunctionDefinition irNode);
/// This class is mainly there to correctly measure how long building the IR
/// takes.
class IrBuilderTask extends CompilerTask {
- final SourceInformationFactory sourceInformationFactory;
+ final SourceInformationStrategy sourceInformationStrategy;
String bailoutMessage = null;
@@ -51,7 +51,7 @@ class IrBuilderTask extends CompilerTask {
/// [ir.FunctionDefinition] node that has been built.
IrBuilderCallback builderCallback;
- IrBuilderTask(Compiler compiler, this.sourceInformationFactory,
+ IrBuilderTask(Compiler compiler, this.sourceInformationStrategy,
[this.builderCallback])
: super(compiler);
@@ -65,7 +65,7 @@ class IrBuilderTask extends CompilerTask {
element = element.implementation;
return compiler.withCurrentElement(element, () {
SourceInformationBuilder sourceInformationBuilder =
- sourceInformationFactory.forContext(element);
+ sourceInformationStrategy.createBuilderForContext(element);
IrBuilderVisitor builder =
new JsIrBuilderVisitor(
@@ -3011,7 +3011,8 @@ class JsIrBuilderVisitor extends IrBuilderVisitor {
element, CallStructure.TWO_ARGS);
return irBuilder.buildStaticFunctionInvocation(element,
CallStructure.TWO_ARGS, arguments,
- sourceInformation: sourceInformationBuilder.buildCall(node));
+ sourceInformation:
+ sourceInformationBuilder.buildCall(node, node.selector));
}
/// Lookup the value of the enum described by [node].
@@ -3197,7 +3198,8 @@ class JsIrBuilderVisitor extends IrBuilderVisitor {
} else {
return irBuilder.buildStaticFunctionInvocation(function, callStructure,
translateStaticArguments(argumentList, function, callStructure),
- sourceInformation: sourceInformationBuilder.buildCall(node));
+ sourceInformation:
+ sourceInformationBuilder.buildCall(node, node.selector));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698