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

Issue 11453032: Reapply class/method/field minification (Closed)

Created:
8 years ago by erikcorry
Modified:
8 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Reapply class/method/field minification BUG= Committed: https://code.google.com/p/dart/source/detail?r=15892

Patch Set 1 #

Patch Set 2 : Changes to bring patch up to date and fix bugs #

Total comments: 30

Patch Set 3 : Review feedback #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -208 lines) Patch
M sdk/lib/_internal/compiler/implementation/js/printer.dart View 9 chunks +13 lines, -13 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 2 chunks +8 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 2 26 chunks +87 lines, -96 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/namer.dart View 1 2 12 chunks +175 lines, -72 lines 10 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 1 2 1 chunk +3 lines, -0 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/lib/native_helper.dart View 1 2 4 chunks +41 lines, -6 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/native_handler.dart View 1 1 chunk +3 lines, -3 lines 0 comments Download
M tests/compiler/dart2js_extra/dart2js_extra.status View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A + tests/compiler/dart2js_native/native_class_fields_test.dart View 1 2 2 chunks +1 line, -5 lines 0 comments Download
M tests/compiler/dart2js_native/native_field_name_test.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
sra1
lgtm https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode843 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:843: namer.setterNameFromAccessorName(accessorName); Single line? https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart File sdk/lib/_internal/compiler/implementation/js_backend/namer.dart (right): https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart#newcode216 ...
8 years ago (2012-12-07 06:03:18 UTC) #1
kasperl
LGTM. https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1150 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1150: new ClosureInvocationElement(namer.CLOSURE_INVOCATION_NAME, element); It looks a bit fishy ...
8 years ago (2012-12-07 10:37:45 UTC) #2
floitsch
LGTM. https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode790 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:790: ? member.nativeName() accidental space? https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1695 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1695: if (typeof ...
8 years ago (2012-12-07 12:01:01 UTC) #3
erikcorry
https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11453032/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode790 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:790: ? member.nativeName() On 2012/12/07 12:01:01, floitsch wrote: > accidental ...
8 years ago (2012-12-10 08:36:00 UTC) #4
ngeoffray
LGTM https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart File sdk/lib/_internal/compiler/implementation/js_backend/namer.dart (right): https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart#newcode70 sdk/lib/_internal/compiler/implementation/js_backend/namer.dart:70: SourceString get closureInvocationSelector => Compiler.CALL_OPERATOR_NAME; We have the ...
8 years ago (2012-12-10 08:55:42 UTC) #5
erikcorry
8 years ago (2012-12-10 12:37:40 UTC) #6
Message was sent while issue was closed.
Now continued in https://codereview.chromium.org/11492006

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/js_backend/namer.dart (right):

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/js_backend/namer.dart:70: SourceString
get closureInvocationSelector => Compiler.CALL_OPERATOR_NAME;
On 2012/12/10 08:55:42, ngeoffray wrote:
> We have the Selector class in the compiler, so I'd prefer keeping
> closureInvocationName. Or closureInvocationSelectorName.

We already have something else called closureInvocationName in this class, so
closureInvocationSelectorName it is, though it reminds me a little of
http://en.wikipedia.org/wiki/Haddocks'_Eyes

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/js_backend/namer.dart:104:
instanceMethodInvocationName(null, closureInvocationSelector, selector);
On 2012/12/10 08:55:42, ngeoffray wrote:
> The style we usually use is arguments on the new line.

Done.

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/js_backend/namer.dart:203: //
generated in applyFunction.
On 2012/12/10 08:55:42, ngeoffray wrote:
> generated or used? What is applyFunction? Dart's Function.apply?

The name is generated (wiith string addition), then it gets used.  The
applyFunction function is found in js_helper.dart.  Comment clarified here and
below.

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/js_backend/namer.dart:340: // the
important thing is that it is a unique name.
On 2012/12/10 08:55:42, ngeoffray wrote:
> the -> The

Done.

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/js_backend/namer.dart:420:
ClassElement class_elt = element;
On 2012/12/10 08:55:42, ngeoffray wrote:
> class_elt -> classElement

Done.

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right):

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:984: *
TODO(erikcorry): Fix this to produce consistent result regardless of
On 2012/12/10 08:55:42, ngeoffray wrote:
> What's 'this' here?

I no longer recall, so I deleted the comment.

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/lib/native_helper.dart (right):

https://codereview.chromium.org/11453032/diff/19001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/lib/native_helper.dart:218: //
getTypeNameOf to getTypeTag.
On 2012/12/10 08:55:42, ngeoffray wrote:
> What's making it difficult today to have it in this CL?

I don't like to mix renaming changes with real changes as they obscure the real
changes making it hard to review.

Powered by Google App Engine
This is Rietveld 408576698