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

Issue 10828121: Improve renaming of constructors and factories. (Closed)

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

Description

Improve renaming of constructors and factories. Unfortunately, this implementation is not bug free, see comments for detailed discussion. R=smok@google.com Committed: https://code.google.com/p/dart/source/detail?r=10232

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -15 lines) Patch
M lib/compiler/implementation/dart_backend/renamer.dart View 1 chunk +17 lines, -7 lines 2 comments Download
M lib/compiler/implementation/tree/unparser.dart View 2 chunks +13 lines, -8 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Anton Muhin
8 years, 4 months ago (2012-08-01 19:24:12 UTC) #1
Roman
lgtm Please add couple of tests if anything new is fixed! https://chromiumcodereview.appspot.com/10828121/diff/1/lib/compiler/implementation/dart_backend/renamer.dart File lib/compiler/implementation/dart_backend/renamer.dart (right): ...
8 years, 4 months ago (2012-08-02 05:44:53 UTC) #2
Anton Muhin
8 years, 4 months ago (2012-08-03 13:57:57 UTC) #3
https://chromiumcodereview.appspot.com/10828121/diff/1/lib/compiler/implement...
File lib/compiler/implementation/dart_backend/renamer.dart (right):

https://chromiumcodereview.appspot.com/10828121/diff/1/lib/compiler/implement...
lib/compiler/implementation/dart_backend/renamer.dart:101: if
(context.isFunction() && context.cachedNode.name == node) {
Good point, but yes, getters/setters, and they should be addressed later on.

On 2012/08/02 05:44:53, Roman wrote:
> Can now (context.isFunction()) be false?

https://chromiumcodereview.appspot.com/10828121/diff/1/lib/compiler/implement...
File lib/compiler/implementation/tree/unparser.dart (right):

https://chromiumcodereview.appspot.com/10828121/diff/1/lib/compiler/implement...
lib/compiler/implementation/tree/unparser.dart:104: final newName =
renamer.renameIdentifier(name);
It should be used for getters/setters, maybe even methods.

Let's see how thing goes and rename then.

On 2012/08/02 05:44:53, Roman wrote:
> Looks like now renameIdentifier is only used for function names or
constructors,
> maybe rename the method so it is more clear what is it used for?

Powered by Google App Engine
This is Rietveld 408576698