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.
* Add new generated name kind for reused transpiler variables
* Remove error on _super or _newTarget conflict
* Add test with super helper conflict
* Remove error on _this conflict
* Fix lint
* Use flags instead of generated kinds, inline some things
* Accept rename
* Remove trailing whitespace
* Move helper emit into printer, rather than emitter"
* passthru module and target
* New test, accept baselines
* Make members private