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

Issue 1630963003: Use a symbol for static length/name (conflicts with Function properties in ES5: cannot redefine Fun… (Closed)

Created:
4 years, 10 months ago by ochafik
Modified:
4 years, 10 months ago
Reviewers:
vsm, Jennifer Messerly
CC:
dev-compiler+reviews_dartlang.org
Base URL:
git@github.com:dart-lang/dev_compiler.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Use a symbol for static length/name (and other Function properties) for Closure, to avoid ES5->ES6 lowering bug (https://github.com/google/closure-compiler/issues/1460). This is part of the overall "simple closure" effort (issue #312) BUG= R=jmesserly@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/a637e1b048487629d0d44620eb41e703531ce18d

Patch Set 1 #

Patch Set 2 : closure-only, declare extension name #

Patch Set 3 : handle other Function properties #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 6

Patch Set 6 : addressed suggestion + regen codegen/names.dart #

Patch Set 7 : left todo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -28 lines) Patch
M lib/src/codegen/js_codegen.dart View 1 2 3 4 5 6 8 chunks +28 lines, -7 lines 0 comments Download
M lib/src/codegen/js_names.dart View 1 2 3 4 5 2 chunks +9 lines, -2 lines 0 comments Download
M test/codegen/closure.dart View 1 2 4 chunks +18 lines, -4 lines 0 comments Download
M test/codegen/expect/closure.js View 1 2 3 4 4 chunks +36 lines, -2 lines 0 comments Download
M test/codegen/expect/names.js View 1 2 3 4 5 1 chunk +18 lines, -13 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
ochafik
Hey guys, this comes up on code that was lowered to ES5 with Closure: // ...
4 years, 10 months ago (2016-01-26 14:14:12 UTC) #2
Jennifer Messerly
This sounds like a bug in Closure Compiler. Our output is valid ES6, right? (we ...
4 years, 10 months ago (2016-01-27 17:58:03 UTC) #3
Jennifer Messerly
On 2016/01/27 17:58:03, John Messerly wrote: > This sounds like a bug in Closure Compiler. ...
4 years, 10 months ago (2016-01-27 18:05:19 UTC) #4
ochafik
Thanks John! On 2016/01/27 18:05:19, John Messerly wrote: > On 2016/01/27 17:58:03, John Messerly wrote: ...
4 years, 10 months ago (2016-01-28 15:19:19 UTC) #5
Jennifer Messerly
On 2016/01/28 15:19:19, ochafik wrote: > Thanks John! > > On 2016/01/27 18:05:19, John Messerly ...
4 years, 10 months ago (2016-01-28 19:52:09 UTC) #7
Jennifer Messerly
On 2016/01/28 15:19:19, ochafik wrote: > Thanks John! > > On 2016/01/27 18:05:19, John Messerly ...
4 years, 10 months ago (2016-01-28 19:58:02 UTC) #8
Jennifer Messerly
https://codereview.chromium.org/1630963003/diff/80001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (right): https://codereview.chromium.org/1630963003/diff/80001/lib/src/codegen/js_codegen.dart#newcode3411 lib/src/codegen/js_codegen.dart:3411: if (invalidStaticFieldName(name, closureCompiler: true)) { I still don't understand ...
4 years, 10 months ago (2016-01-28 20:03:37 UTC) #9
Jennifer Messerly
LGTM, some comments on how it's factored, below... I'm fine with landing this as is, ...
4 years, 10 months ago (2016-02-02 00:22:56 UTC) #10
ochafik
Thanks John! https://codereview.chromium.org/1630963003/diff/80001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (right): https://codereview.chromium.org/1630963003/diff/80001/lib/src/codegen/js_codegen.dart#newcode163 lib/src/codegen/js_codegen.dart:163: if (_topLevelExtensionNames.isNotEmpty) { On 2016/02/02 00:22:56, John ...
4 years, 10 months ago (2016-02-03 19:58:49 UTC) #11
ochafik
Committed patchset #7 (id:120001) manually as a637e1b048487629d0d44620eb41e703531ce18d (presubmit successful).
4 years, 10 months ago (2016-02-03 20:25:12 UTC) #13
ochafik
4 years, 10 months ago (2016-02-03 22:48:04 UTC) #14
Message was sent while issue was closed.
On 2016/02/03 20:25:12, ochafik wrote:
> Committed patchset #7 (id:120001) manually as
> a637e1b048487629d0d44620eb41e703531ce18d (presubmit successful).

Sorry, had to revert (broke regress_11010_test), preparing new version

Powered by Google App Engine
This is Rietveld 408576698