Skip to content

Move subclass inheritance to end#7772

Merged
jridgewell merged 1 commit intobabel:masterfrom
jridgewell:late-define-subclass-inheritance
Apr 21, 2018
Merged

Move subclass inheritance to end#7772
jridgewell merged 1 commit intobabel:masterfrom
jridgewell:late-define-subclass-inheritance

Conversation

@jridgewell
Copy link
Copy Markdown
Member

We were using Object.create to setup the prototype chain at the start of the class definition, which lead to #7771.

I was a bit worried about a speed hit, but it seems everyone optimizes the two patterns the same way.
https://jsbench.github.io/#f9fca52407643d96458a35763b201215

Fixes #7771.

We were using `Object.create` to setup the prototype chain at the start of the class definition, which lead to babel#7771.

I was a bit worried about a speed hit, but it seems everyone optimizes the two patterns the same way.
https://jsbench.github.io/#f9fca52407643d96458a35763b201215

Fixes babel#7771.
@jridgewell jridgewell added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Apr 21, 2018
@babel-bot
Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/7667/

1 similar comment
@babel-bot
Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/7667/

@jridgewell jridgewell merged commit f8ab946 into babel:master Apr 21, 2018
@jridgewell jridgewell deleted the late-define-subclass-inheritance branch April 21, 2018 21:31
jridgewell added a commit to jridgewell/babel that referenced this pull request Apr 22, 2018
jridgewell added a commit to jridgewell/babel that referenced this pull request Apr 22, 2018
jridgewell added a commit to jridgewell/babel that referenced this pull request Apr 22, 2018
jridgewell added a commit that referenced this pull request Apr 22, 2018
* Update super property get/set/call in loose mode

Follows the plan laid out in #7553 (comment).

With #7691, this closes #7553, closes #4312.

* Post #7772

* Memoized property
jridgewell added a commit to jridgewell/babel that referenced this pull request May 18, 2018
jridgewell added a commit to jridgewell/babel that referenced this pull request May 18, 2018
jridgewell added a commit to jridgewell/babel that referenced this pull request May 18, 2018
hzoo pushed a commit that referenced this pull request May 23, 2018
* Revert "Move subclass inheritance to end (#7772)"

This reverts commit f8ab946.

* Only use getPrototypeOf if setPrototypeOf is implemented

* Update fixtures

* Helpers updates

* Update fixtures

* Fall back to getPrototypeOf

* Update fixtures
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getters/Setters in Superclass called when loose defining Subclass

4 participants