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

Unified Diff: lib/compiler/implementation/ssa/builder.dart

Issue 10695174: [RFC] Associate AST nodes with HIstructions when building HGraph. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 years, 5 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 | « no previous file | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index 8b3b250a3afc3dafd64b0f4639d973dfebf46462..920ae1ac647bf1f1873ac8dad8590a30408fd8b5 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -1184,6 +1184,11 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
return boolified;
}
+ HInstruction attachPosition(HInstruction target, Node node) {
+ target.sourcePosition = node.getBeginToken();
+ return target;
+ }
+
void visit(Node node) {
if (node !== null) node.accept(this);
}
@@ -1594,8 +1599,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
assert(op.token.kind !== PLUS_TOKEN);
HInstruction operand = pop();
- HInstruction target =
- new HStatic(interceptors.getPrefixOperatorInterceptor(op));
+ HInstruction target = attachPosition(
+ new HStatic(interceptors.getPrefixOperatorInterceptor(op)), node);
add(target);
HInvokeUnary result;
String value = op.source.stringValue;
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698