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

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

Issue 955543004: Pass SourceInformation through the CPS IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests. Created 5 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
« 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/codegen.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index 368de299aa295a7bd543afc5ec2fa92063e13c93..9449644ad52158c6618779da3c14380453b7d029 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -9,6 +9,7 @@ import 'glue.dart';
import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
import '../../js/js.dart' as js;
import '../../elements/elements.dart';
+import '../../io/source_information.dart' show SourceInformation;
import '../../util/maplet.dart';
import '../../constants/values.dart';
import '../../dart2jslib.dart';
@@ -182,7 +183,8 @@ class CodeGenerator extends tree_ir.Visitor<dynamic, js.Expression> {
// TODO(karlklose): get rid of the selector argument.
js.Expression buildStaticInvoke(Selector selector,
Element target,
- List<js.Expression> arguments) {
+ List<js.Expression> arguments,
+ {SourceInformation sourceInformation}) {
registry.registerStaticInvocation(target.declaration);
if (target == glue.getInterceptorMethod) {
// This generates a call to the specialized interceptor function, which
@@ -196,7 +198,8 @@ class CodeGenerator extends tree_ir.Visitor<dynamic, js.Expression> {
return js.propertyCall(interceptorLibrary, selector.name, arguments);
} else {
js.Expression elementAccess = glue.staticFunctionAccess(target);
- return new js.Call(elementAccess, arguments);
+ return new js.Call(elementAccess, arguments,
+ sourceInformation: sourceInformation);
}
}
@@ -261,7 +264,8 @@ class CodeGenerator extends tree_ir.Visitor<dynamic, js.Expression> {
Selector selector = node.selector;
FunctionElement target = node.target;
List<js.Expression> arguments = visitArguments(node.arguments);
- return buildStaticInvoke(selector, target, arguments);
+ return buildStaticInvoke(selector, target, arguments,
+ sourceInformation: node.sourceInformation);
}
@override
« 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