Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Support "simple" Closure compilation mode #312

Open
ochafik opened this issue Sep 9, 2015 · 1 comment
Open

Support "simple" Closure compilation mode #312

ochafik opened this issue Sep 9, 2015 · 1 comment

Comments

@ochafik
Copy link
Contributor

ochafik commented Sep 9, 2015

The Closure Compiler can almost consume the output of DDC with --language_in=ECMASCRIPT6_STRICT -O SIMPLE (and output ES5 code).

Here are some blockers:

Other annoying non-blockers:

(Note: "ADVANCED" optimizations are filed under #311)

@ochafik ochafik changed the title Produce output that passes "simple" Closure compilation mode Support "simple" Closure compilation mode Sep 9, 2015
@jmesserly
Copy link
Contributor

thanks for collecting all of these!

Cannot (re)define local Object, Error classes in core.js. This can be worked around by attaching the classes to some namespace (here core is the current exports var):

Nice! Yeah that would work & also would simplify our JsSymbol/Symbol issues.

let often makes the compiler to crash (google/closure-compiler#1124). Could be somehow worked around by using var everywhere, but then the hand-written parts of the runtime are an issue.

note: let is needed for correct behavior (e.g. closures in loops), so we can't compile to var as a workaround. Hopefully they can get that crashing bug fixed...

@ochafik ochafik self-assigned this Jan 21, 2016
ochafik pushed a commit that referenced this issue Jan 26, 2016
…es in ES5: cannot redefine Function.name/length properties) (issue #312)
ochafik pushed a commit that referenced this issue Jan 28, 2016
…es in ES5: cannot redefine Function.name/length properties) (issue #312)
ochafik pushed a commit that referenced this issue Feb 3, 2016
Closure compiler chokes on super classes that aren't qualified paths.

(example: http://goo.gl/5mHC7S)

BUG=
[email protected]

Review URL: https://codereview.chromium.org/1638533004 .
ochafik pushed a commit that referenced this issue Feb 3, 2016
…or Closure, to avoid ES5->ES6 lowering bug (google/closure-compiler#1460).

This is part of the overall "simple closure" effort (issue #312)

BUG=
[email protected]

Review URL: https://codereview.chromium.org/1630963003 .
ochafik pushed a commit that referenced this issue Feb 3, 2016
…or Closure, to avoid ES5->ES6 lowering bug (google/closure-compiler#1460).

This is part of the overall "simple closure" effort (issue #312)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants