Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hoisting for optional member expressions #8121

Merged
merged 3 commits into from May 22, 2022
Merged

Conversation

mischnic
Copy link
Member

  1. Key exports_locals by Id instead of just JsWord (because the key really is a variable binding, not just a name)
  2. Handle optional chaining to skip visiting the member properties just like we do in the non-optional member expression case.

Both of these changes individually would have been enough to fix #8102

@mischnic mischnic requested a review from devongovett May 21, 2022 15:37
@parcel-benchmark
Copy link

Benchmark Results

Kitchen Sink 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

React HackerNews ✅

Timings

Description Time Difference
Cold 8.84s -72.00ms
Cached 457.00ms +25.00ms ⚠️

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 1.49m -666.00ms
Cached 2.39s +64.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/esm.c7dc1640.js 61.96kb +0.00b 1.10m +29.57s ⚠️
dist/workerHasher.e50d242f.js 1.72kb +0.00b 1.10m +29.57s ⚠️
dist/16.1969624f.js 1.08kb +0.00b 35.97s +3.25s ⚠️
dist/index.html 240.00b +0.00b 1.10m +34.30s ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/esm.c7dc1640.js 61.96kb +0.00b 1.09m +28.70s ⚠️
dist/workerHasher.e50d242f.js 1.72kb +0.00b 1.09m +28.70s ⚠️
dist/16.1969624f.js 1.08kb +0.00b 35.50s +2.56s ⚠️
dist/16.069344b7.js 905.00b +0.00b 35.50s +2.56s ⚠️
dist/simpleHasher.46d6f2e5.js 742.00b +0.00b 1.09m +28.70s ⚠️
dist/index.html 240.00b +0.00b 1.09m +36.22s ⚠️

Three.js ✅

Timings

Description Time Difference
Cold 6.51s +132.00ms
Cached 260.00ms -14.00ms 🚀

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@ivanStraltsou
Copy link

hi @mischnic @devongovett may i ask you to take a look at: #8186 seems to be related to this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parcel breaks property access if property has same name as enclosing function
4 participants