TypeScript/tests/cases/conformance/async/es5
Martin Probst f0826cfeaa Per-property super accessors in async functions.
TypeScript must hoist accessors for super properties when converting
async method bodies to the `__awaiter` pattern for targets before
ES2016.

Previously, TypeScript would reify all property accesses into element
accesses, i.e. convert the property name into a string parameter and
pass it to `super[...]`. That breaks optimizers like Closure Compiler or
Uglify in advanced mode, when property renaming is enabled, as it mixes
quoted and un-quoted property access (`super['x']` vs just `x` at the
declaration site).

This change creates a variable `_superProps` that contains accessors for
each property accessed on super within the async method. This allows
accessing the properties by name (instead of quoted string), which fixes
the quoted/unquoted confusion. The change keeps the generic accessor for
element access statements to match quoting behaviour.

Fixes #21088.
2018-10-03 15:46:04 +02:00
..
asyncArrowFunction Fix prologue order in async function 2018-06-07 13:34:16 -07:00
awaitBinaryExpression Added es5 conformance tests for await in binary. 2016-06-27 14:08:36 -07:00
awaitCallExpression Added es5 conformance tests for awaiting a call 2016-06-27 15:34:15 -07:00
functionDeclarations Added es5 conformance tests for async arrow functions, add error for referencing 'arguments' in a generator. 2016-06-27 17:34:19 -07:00
asyncAliasReturnType_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncAwait_es5.ts Fix duplicate label in es2017 async function 2018-02-12 12:30:29 -08:00
asyncAwaitIsolatedModules_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncAwaitNestedClasses_es5.ts Fix temp variable emit for names used in nested classes 2018-01-16 12:33:55 -08:00
asyncClass_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncConstructor_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncDeclare_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncEnum_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncGetter_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncImportedPromise_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncInterface_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncMethodWithSuper_es5.ts Per-property super accessors in async functions. 2018-10-03 15:46:04 +02:00
asyncModule_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncMultiFile_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncQualifiedReturnType_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncSetter_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
asyncUseStrict_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
awaitClassExpression_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00
awaitUnion_es5.ts Added additional es5 conformance tests, better emit for functions returning global promise, pass this to __generator 2016-06-27 17:12:24 -07:00