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

Issue 10795064: dart2dart: Introduce Renamer that is used by renaming unparser (Closed)

Created:
8 years, 5 months ago by Roman
Modified:
8 years, 2 months ago
Reviewers:
Anton Muhin, ahe
CC:
reviews_dartlang.org, ahe
Visibility:
Public.

Description

dart2dart: Introduce Renamer that is used by renaming unparser to rename identifiers before printing them out. The renamer renames top-level elements to avoid conflicts. Committed: https://code.google.com/p/dart/source/detail?r=9847

Patch Set 1 #

Total comments: 55

Patch Set 2 : #

Patch Set 3 : #

Total comments: 15

Patch Set 4 : #

Patch Set 5 : #

Total comments: 14

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+250 lines, -19 lines) Patch
M lib/compiler/implementation/dart_backend/dart_backend.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M lib/compiler/implementation/dart_backend/emitter.dart View 1 2 3 4 5 6 7 8 3 chunks +16 lines, -8 lines 0 comments Download
A lib/compiler/implementation/dart_backend/renamer.dart View 1 2 3 4 5 1 chunk +104 lines, -0 lines 0 comments Download
M lib/compiler/implementation/resolver.dart View 1 2 3 4 5 1 chunk +1 line, -0 lines 1 comment Download
A lib/compiler/implementation/tree/renamer.dart View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
M lib/compiler/implementation/tree/tree.dart View 1 1 chunk +1 line, -0 lines 0 comments Download
M lib/compiler/implementation/tree/unparser.dart View 1 2 3 4 5 chunks +34 lines, -5 lines 3 comments Download
M tests/compiler/dart2js/unparser_test.dart View 1 2 3 4 5 6 7 8 4 chunks +65 lines, -6 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Roman
8 years, 5 months ago (2012-07-23 10:30:28 UTC) #1
Anton Muhin
https://chromiumcodereview.appspot.com/10795064/diff/1/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/1/lib/compiler/implementation/dart_backend/backend.dart#newcode65 lib/compiler/implementation/dart_backend/backend.dart:65: && element is! AbstractFieldElement why? https://chromiumcodereview.appspot.com/10795064/diff/1/lib/compiler/implementation/dart_backend/emitter.dart File lib/compiler/implementation/dart_backend/emitter.dart (right): ...
8 years, 5 months ago (2012-07-23 11:23:10 UTC) #2
Roman
https://chromiumcodereview.appspot.com/10795064/diff/1/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/1/lib/compiler/implementation/dart_backend/backend.dart#newcode65 lib/compiler/implementation/dart_backend/backend.dart:65: && element is! AbstractFieldElement On 2012/07/23 11:23:10, Anton Mukhin ...
8 years, 5 months ago (2012-07-23 15:34:15 UTC) #3
Anton Muhin
I am still not quite happy with those checks for factories, etc., but I would ...
8 years, 5 months ago (2012-07-23 17:01:27 UTC) #4
Roman
https://chromiumcodereview.appspot.com/10795064/diff/1/lib/compiler/implementation/dart_backend/renamer.dart File lib/compiler/implementation/dart_backend/renamer.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/1/lib/compiler/implementation/dart_backend/renamer.dart#newcode56 lib/compiler/implementation/dart_backend/renamer.dart:56: if (contextElements == null On 2012/07/23 17:01:27, Anton Mukhin ...
8 years, 5 months ago (2012-07-23 17:38:32 UTC) #5
Anton Muhin
ok, let's start w/ it as a base approach, although I am very uneasy about ...
8 years, 5 months ago (2012-07-23 17:58:54 UTC) #6
Roman
https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart File lib/compiler/implementation/dart_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart#newcode40 lib/compiler/implementation/dart_backend/emitter.dart:40: Link<Node> interfaceNodes = classNode.interfaces.nodes; On 2012/07/23 17:58:54, Anton Mukhin ...
8 years, 5 months ago (2012-07-24 08:22:49 UTC) #7
Anton Muhin
still lgtm https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart File lib/compiler/implementation/dart_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart#newcode40 lib/compiler/implementation/dart_backend/emitter.dart:40: Link<Node> interfaceNodes = classNode.interfaces.nodes; On 2012/07/24 08:22:49, ...
8 years, 5 months ago (2012-07-24 08:43:57 UTC) #8
Roman
https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart File lib/compiler/implementation/dart_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart#newcode40 lib/compiler/implementation/dart_backend/emitter.dart:40: Link<Node> interfaceNodes = classNode.interfaces.nodes; On 2012/07/24 08:43:58, Anton Mukhin ...
8 years, 5 months ago (2012-07-24 08:58:04 UTC) #9
Roman
https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart File lib/compiler/implementation/dart_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart#newcode40 lib/compiler/implementation/dart_backend/emitter.dart:40: Link<Node> interfaceNodes = classNode.interfaces.nodes; On 2012/07/24 08:58:04, Roman wrote: ...
8 years, 5 months ago (2012-07-24 08:58:54 UTC) #10
Anton Muhin
https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart File lib/compiler/implementation/dart_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart#newcode40 lib/compiler/implementation/dart_backend/emitter.dart:40: Link<Node> interfaceNodes = classNode.interfaces.nodes; I think it should be ...
8 years, 5 months ago (2012-07-24 09:00:10 UTC) #11
Roman
https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart File lib/compiler/implementation/dart_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart#newcode40 lib/compiler/implementation/dart_backend/emitter.dart:40: Link<Node> interfaceNodes = classNode.interfaces.nodes; On 2012/07/24 09:00:10, Anton Mukhin ...
8 years, 5 months ago (2012-07-24 10:37:03 UTC) #12
Anton Muhin
lgtm https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart File lib/compiler/implementation/dart_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/7011/lib/compiler/implementation/dart_backend/emitter.dart#newcode40 lib/compiler/implementation/dart_backend/emitter.dart:40: Link<Node> interfaceNodes = classNode.interfaces.nodes; thanks a lot! On ...
8 years, 5 months ago (2012-07-24 10:46:50 UTC) #13
ahe
https://chromiumcodereview.appspot.com/10795064/diff/6013/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/6013/lib/compiler/implementation/resolver.dart#newcode944 lib/compiler/implementation/resolver.dart:944: if (node.returnType !== null) resolveTypeAnnotation(node.returnType); I think you should ...
8 years, 4 months ago (2012-08-02 18:37:13 UTC) #14
ahe
https://chromiumcodereview.appspot.com/10795064/diff/6013/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/6013/lib/compiler/implementation/tree/unparser.dart#newcode6 lib/compiler/implementation/tree/unparser.dart:6: final Renamer renamer; I'm not really comfortable with this ...
8 years, 2 months ago (2012-10-01 11:27:27 UTC) #15
Anton Muhin
https://chromiumcodereview.appspot.com/10795064/diff/6013/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (right): https://chromiumcodereview.appspot.com/10795064/diff/6013/lib/compiler/implementation/tree/unparser.dart#newcode6 lib/compiler/implementation/tree/unparser.dart:6: final Renamer renamer; I agree with you, Peter, see ...
8 years, 2 months ago (2012-10-01 13:10:08 UTC) #16
ahe
8 years, 2 months ago (2012-10-01 13:22:41 UTC) #17
https://chromiumcodereview.appspot.com/10795064/diff/6013/lib/compiler/implem...
File lib/compiler/implementation/tree/unparser.dart (right):

https://chromiumcodereview.appspot.com/10795064/diff/6013/lib/compiler/implem...
lib/compiler/implementation/tree/unparser.dart:6: final Renamer renamer;
Thank you, good that we agree on the long term direction.

On 2012/10/01 13:10:08, Anton Muhin wrote:
> I agree with you, Peter, see https://chromiumcodereview.appspot.com/10905019/
> 
> Let me discuss it with Roma once again
> 
> On 2012/10/01 11:27:27, ahe wrote:
> > I'm not really comfortable with this addition. The unparser is used by
dart2js
> > for debugging and testing. Renaming is not something that the unparser
should
> be
> > dealing with.
> > 
> > I think renaming can be handled by a subclass of Unparser.
>

Powered by Google App Engine
This is Rietveld 408576698