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

Issue 12250002: dart2js: In minified mode shorter getter and setter names. (Closed)

Created:
7 years, 10 months ago by erikcorry
Modified:
7 years, 10 months ago
Reviewers:
karlklose, ngeoffray
CC:
reviews_dartlang.org
Visibility:
Public.

Description

dart2js: In minified mode shorter getter and setter names. Now a field called x has a getter called gx and a setter called sx in minified mode. Previously the getter was get$x and the setter was set$x (as in unminified code). This CL also fixed an assert caused by using a getter to access a variable that is a closure object. R=karlklose@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=18436

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -11 lines) Patch
M sdk/lib/_internal/compiler/implementation/closure.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/elements/modelx.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 2 chunks +6 lines, -2 lines 1 comment Download
M sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart View 4 chunks +23 lines, -1 line 6 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/namer.dart View 5 chunks +11 lines, -8 lines 0 comments Download
A tests/compiler/dart2js_native/native_class_fields_3_test.dart View 1 chunk +87 lines, -0 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
erikcorry
7 years, 10 months ago (2013-02-12 14:30:14 UTC) #1
karlklose
LGTM. https://codereview.chromium.org/12250002/diff/1/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart File sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart (right): https://codereview.chromium.org/12250002/diff/1/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart#newcode84 sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart:84: if (name.startsWith('g')) usedInstanceNames.add(name.substring(1)); Can you use _hasBannedPrefix here? ...
7 years, 10 months ago (2013-02-12 14:41:19 UTC) #2
erikcorry
https://codereview.chromium.org/12250002/diff/1/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart File sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart (right): https://codereview.chromium.org/12250002/diff/1/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart#newcode84 sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart:84: if (name.startsWith('g')) usedInstanceNames.add(name.substring(1)); On 2013/02/12 14:41:19, karlklose wrote: > ...
7 years, 10 months ago (2013-02-12 14:50:40 UTC) #3
ngeoffray
7 years, 10 months ago (2013-02-12 22:01:53 UTC) #4
https://codereview.chromium.org/12250002/diff/1/sdk/lib/_internal/compiler/im...
File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right):

https://codereview.chromium.org/12250002/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:689: if
(member.fieldAccessNeverThrows()) return false;
I'd really prefer to have a "member is ClosureFieldElement" check here instead.
The "fieldAccessNeverThrows" confused me quite a lot, and I don't think it's
something we need on an Element.

https://codereview.chromium.org/12250002/diff/1/tests/compiler/dart2js_native...
File tests/compiler/dart2js_native/native_class_fields_3_test.dart (right):

https://codereview.chromium.org/12250002/diff/1/tests/compiler/dart2js_native...
tests/compiler/dart2js_native/native_class_fields_3_test.dart:1: // Copyright
(c) 2011, the Dart project authors.  Please see the AUTHORS file
2011 -> 2013

Powered by Google App Engine
This is Rietveld 408576698