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

Issue 10827424: Do not create placeholders for elements that won't be later renamed. (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

Do not create placeholders for elements that won't be later renamed. R=smok@google.com Committed: https://code.google.com/p/dart/source/detail?r=11023

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -6 lines) Patch
M lib/compiler/implementation/dart_backend/placeholder_collector.dart View 2 chunks +5 lines, -0 lines 2 comments Download
M lib/compiler/implementation/dart_backend/renamer.dart View 1 chunk +0 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/unparser_test.dart View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Anton Muhin
8 years, 4 months ago (2012-08-20 19:06:45 UTC) #1
Roman
lgtm https://chromiumcodereview.appspot.com/10827424/diff/1/lib/compiler/implementation/dart_backend/placeholder_collector.dart File lib/compiler/implementation/dart_backend/placeholder_collector.dart (right): https://chromiumcodereview.appspot.com/10827424/diff/1/lib/compiler/implementation/dart_backend/placeholder_collector.dart#newcode263 lib/compiler/implementation/dart_backend/placeholder_collector.dart:263: if (element === entryFunction) return; This is not ...
8 years, 4 months ago (2012-08-21 07:44:58 UTC) #2
Anton Muhin
8 years, 4 months ago (2012-08-21 09:16:54 UTC) #3
https://chromiumcodereview.appspot.com/10827424/diff/1/lib/compiler/implement...
File lib/compiler/implementation/dart_backend/placeholder_collector.dart
(right):

https://chromiumcodereview.appspot.com/10827424/diff/1/lib/compiler/implement...
lib/compiler/implementation/dart_backend/placeholder_collector.dart:263: if
(element === entryFunction) return;
Good point, I'll fix it.

On 2012/08/21 07:44:58, Roman wrote:
> This is not the problem of your CL, but we should actually have an element for
> MAIN, because otherwise another library may define it's own main element that
> won't be renamed:
> 
> #library('lib.dart');
> void main() {}
> 
> ...
> #import('lib.dart', prefix:'lib');
> main() {
>   lib.main();
> }
> 
> To fix this, we should check MAIN element in rename and don't rename it, but
> instead just add it to used top level identifiers. OR we can just add 'main'
to
> used top level identifiers in renamer at the beginning.

Powered by Google App Engine
This is Rietveld 408576698