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

Issue 10695174: [RFC] Associate AST nodes with HIstructions when building HGraph. (Closed)

Created:
8 years, 5 months ago by podivilov
Modified:
8 years, 5 months ago
Reviewers:
ahe, floitsch, ngeoffray, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Associate AST nodes with HIstructions when building HGraph. Then use this info in ssa codegen to provide source locations for generated code. R=floitsch@google.com,kasperl@google.com Committed: https://code.google.com/p/dart/source/detail?r=9711

Patch Set 1 #

Patch Set 2 : . #

Total comments: 5

Patch Set 3 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -8 lines) Patch
M lib/compiler/implementation/ssa/builder.dart View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 1 2 5 chunks +12 lines, -6 lines 0 comments Download
M lib/compiler/implementation/ssa/nodes.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
podivilov
8 years, 5 months ago (2012-07-12 13:46:01 UTC) #1
floitsch
Looping in Nicolas and Peter who probably have opinions, too. I wonder if having the ...
8 years, 5 months ago (2012-07-12 16:48:06 UTC) #2
podivilov
On 2012/07/12 16:48:06, floitsch wrote: > Looping in Nicolas and Peter who probably have opinions, ...
8 years, 5 months ago (2012-07-12 17:15:52 UTC) #3
podivilov
ping.
8 years, 5 months ago (2012-07-17 12:46:57 UTC) #4
floitsch
LGTM. https://chromiumcodereview.appspot.com/10695174/diff/4001/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10695174/diff/4001/lib/compiler/implementation/ssa/builder.dart#newcode1645 lib/compiler/implementation/ssa/builder.dart:1645: target.sourceToken = node.getBeginToken(); Maybe: attachPosition(target, node); If this ...
8 years, 5 months ago (2012-07-17 14:46:53 UTC) #5
podivilov
8 years, 5 months ago (2012-07-17 16:42:46 UTC) #6
Thanks!

https://chromiumcodereview.appspot.com/10695174/diff/4001/lib/compiler/implem...
File lib/compiler/implementation/ssa/builder.dart (right):

https://chromiumcodereview.appspot.com/10695174/diff/4001/lib/compiler/implem...
lib/compiler/implementation/ssa/builder.dart:1645: target.sourceToken =
node.getBeginToken();
On 2012/07/17 14:46:53, floitsch wrote:
> Maybe:
> attachPosition(target, node);
> If this function returns the node we could maybe use it in one line for some
> nodes:
> HInstruction n = attachPosition(new HStatic( ... ), node);

Done.

https://chromiumcodereview.appspot.com/10695174/diff/4001/lib/compiler/implem...
File lib/compiler/implementation/ssa/nodes.dart (right):

https://chromiumcodereview.appspot.com/10695174/diff/4001/lib/compiler/implem...
lib/compiler/implementation/ssa/nodes.dart:708: Token sourceToken;
On 2012/07/17 14:46:53, floitsch wrote:
> I'm not sure we should expose the position-type to the SSA nodes.
> I'm leaning towards "Dynamic sourceInformation" (after all, the SSA nodes
don't
> care at all, what is in there).
> But I wouldn't be surprised if there are different opinions.
> Maybe as compromise: Token sourcePosition; ?

OK, let's declare it as "Token sourcePosition" for now, it would be easy to fix
if anyone asks.

Powered by Google App Engine
This is Rietveld 408576698