Closed
Bug 1342553
Opened 7 years ago
Closed 7 years ago
Use try-catch for IteratorClose in for-of.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla54
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(2 files)
46.10 KB,
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
21.22 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
separated from bug 1331092. for-of currently uses JSTRY_ITERCLOSE note to handle IteratorClose. for-await-of needs to use try-catch to handle AsyncIteratorClose, and it should be better unifying them. using try-catch in for-of shows no notable regression for normal execution case , and some improvement/regression for abrupt cases (results in bug 1331092 comment #38). patches are already attached to bug 1331092 comment #39 and bug 1331092 comment #53. I'll land them for this bug, to make it easier to track any breakage etc.
Assignee | ||
Comment 1•7 years ago
|
||
from bug 1331092.
Assignee | ||
Comment 2•7 years ago
|
||
separated CodeGenerator::{IsCallable,IsConstructor} logic into CodeGenerator::emitIsCallableOrConstructor. CodeGenerator::visitCheckIsCallable now uses emitIsCallableOrConstructor for object case, and jumps to CheckIsCallable function for non-callable or proxy cases.
Attachment #8841141 -
Flags: review?(shu)
Comment 3•7 years ago
|
||
Comment on attachment 8841141 [details] [diff] [review] Part 0.2: Support JSOP_CHECKISCALLABLE in JIT. Review of attachment 8841141 [details] [diff] [review]: ----------------------------------------------------------------- Oo, refactored IsConstructor too. Thank you for always going above and beyond. ::: js/src/jit/MIR.h @@ +13484,5 @@ > + public BoxInputsPolicy::Data > +{ > + uint8_t checkKind_; > + > + explicit MCheckIsCallable(MDefinition* toCheck, uint8_t checkKind) Doesn't need to be explicit. @@ +13485,5 @@ > +{ > + uint8_t checkKind_; > + > + explicit MCheckIsCallable(MDefinition* toCheck, uint8_t checkKind) > + : MUnaryInstruction(toCheck), checkKind_(checkKind) nit: checkKind_(checkKind) on its own line ::: js/src/jit/shared/LIR-shared.h @@ +8962,5 @@ > + LIR_HEADER(CheckIsCallable) > + > + static const size_t CheckValue = 0; > + > + explicit LCheckIsCallable(const LBoxAllocation& value, const LDefinition& temp) { Doesn't need to be explicit.
Attachment #8841141 -
Flags: review?(shu) → review+
Assignee | ||
Comment 4•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ba3d6be51e342406594ef62e21dde7719bcef7e4 Bug 1342553 - Part 0.1: Use try-catch for IteratorClose in for-of. r=shu https://hg.mozilla.org/integration/mozilla-inbound/rev/712e84866cf557b5ed88c7b991dd508ec3d550ef Bug 1342553 - Part 0.2: Support JSOP_CHECKISCALLABLE in JIT. r=shu
Comment 5•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ba3d6be51e34 https://hg.mozilla.org/mozilla-central/rev/712e84866cf5
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Updated•7 years ago
|
Summary: Use try-carch for IteratorClose in for-of. → Use try-catch for IteratorClose in for-of.
Comment 6•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/7dfe8ded9245 https://hg.mozilla.org/releases/mozilla-beta/rev/e82d8ab7e161
status-firefox53:
--- → fixed
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•