-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Destructuring Assignment Parse Error - works in Chrome & Safari but not Node #11480
Comments
It also works in: Babel 6.23.1 |
@shanebdavis Fwiw, it also works in Node 7.x, which means it was likely fixed during a V8 upgrade. /cc @nodejs/v8 |
@addaleax Thanks! That makes sense. I was wondering why it worked in Chrome and not Node. Is 6.x scheduled to get V8 updates? |
Not regularly. I think the process for these cases is to look for which commit(s) in V8 fixed the problem, see if is feasible to apply them to the old V8 branch and then cherry-pick them back. |
Eh I suppose we can keep the label on it if backporting is at all viable. |
I Identified v8/v8@dfb8d33 as the commit that fixes it using |
Original commit message: Reduce the memory footprint of expression classifiers This patch attempts to reduce the (stack) memory footprint of expression classifiers. Instead of keeping space in each classifier for all possible error messages that will (potentially) be reported, if an expression turns out to be a pattern or a non-pattern, such error messages are placed in a list shared by the FunctionState and each classifier keeps a couple of indices in this list. This requires that classifiers are used strictly in a stack-based fashion, which is also in line with my previous patch for revisiting non-pattern rewriting. [email protected] BUG=chromium:528697 Review-Url: https://codereview.chromium.org/1708193003 Cr-Commit-Position: refs/heads/master@{nodejs#36897} Fixes: nodejs#11480
Original commit message: Reduce the memory footprint of expression classifiers This patch attempts to reduce the (stack) memory footprint of expression classifiers. Instead of keeping space in each classifier for all possible error messages that will (potentially) be reported, if an expression turns out to be a pattern or a non-pattern, such error messages are placed in a list shared by the FunctionState and each classifier keeps a couple of indices in this list. This requires that classifiers are used strictly in a stack-based fashion, which is also in line with my previous patch for revisiting non-pattern rewriting. [email protected] BUG=chromium:528697 Review-Url: https://codereview.chromium.org/1708193003 Cr-Commit-Position: refs/heads/master@{#36897} Fixes: #11480 PR-URL: #11483 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Refs: #11480 PR-URL: #11483 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Original commit message: Reduce the memory footprint of expression classifiers This patch attempts to reduce the (stack) memory footprint of expression classifiers. Instead of keeping space in each classifier for all possible error messages that will (potentially) be reported, if an expression turns out to be a pattern or a non-pattern, such error messages are placed in a list shared by the FunctionState and each classifier keeps a couple of indices in this list. This requires that classifiers are used strictly in a stack-based fashion, which is also in line with my previous patch for revisiting non-pattern rewriting. [email protected] BUG=chromium:528697 Review-Url: https://codereview.chromium.org/1708193003 Cr-Commit-Position: refs/heads/master@{#36897} Fixes: #11480 PR-URL: #11483 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Refs: #11480 PR-URL: #11483 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Fixed by d0e934f |
Original commit message: Reduce the memory footprint of expression classifiers This patch attempts to reduce the (stack) memory footprint of expression classifiers. Instead of keeping space in each classifier for all possible error messages that will (potentially) be reported, if an expression turns out to be a pattern or a non-pattern, such error messages are placed in a list shared by the FunctionState and each classifier keeps a couple of indices in this list. This requires that classifiers are used strictly in a stack-based fashion, which is also in line with my previous patch for revisiting non-pattern rewriting. [email protected] BUG=chromium:528697 Review-Url: https://codereview.chromium.org/1708193003 Cr-Commit-Position: refs/heads/master@{#36897} Fixes: #11480 PR-URL: #11483 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]>
Refs: #11480 PR-URL: #11483 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]>
This source:
a=b=1;((a + 1), {c} = b)
Quick command-line test:
echo "a=b=1;((a + 1), {c} = b)" | node
These slight variations DO work in node:
a=b=1;((a), {c} = b)
a=b=1;((a + 1), ({c} = b))
The text was updated successfully, but these errors were encountered: