Closed
Bug 1320388
Opened 8 years ago
Closed 8 years ago
Move JSFunction::HAS_REST to JSScript, LazyScript, and FunctionBox.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
29.19 KB,
patch
|
evilpie
:
review+
|
Details | Diff | Splinter Review |
There is no JSFunction.flags_ bits available now. some flags that isn't necessarily associated with JSFucntion instance should be moved to appropriate place. In this bug, I'm about to move JSFunction::HAS_REST to JSScript, LazyScript, and FunctionBox. JSFunction::hasRest is used mostly while compiling, so it should be moved to FunctionBox. some other cases may need it to be in JSScript or LazyScript.
Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•8 years ago
|
||
Added the following flags and accessors: * FunctionBox * hasRest_ * hasRest() * setHasRest() * JSScript * hasRest_ * hasRest() * setHasRest() * LazyScript * p_.hasRest * hasRest() * setHasRest() And removed: * JSFunction * HAS_REST * hasRest() * setHasRest() * JSFUN_HAS_REST While compiling, we call FunctionBox::{setHasRest,hasRest} instead of JSFunction::{setHasRest,hasRest}. FunctionBox.hasRest_ is copied to JSScript.hasRest_ or LazyScript.p_.hasRest after compiling. While running, or delazificating, or JIT compiling, we call {JSScript,LazyScript}::hasRest instead of JSFunction::hasRest. Also, removed JSFUN_HAS_REST, since we now don't store the information in JSFuction, but in JSScript/LazyScript of uncloned self-hosted function, and `hasRest` data should be created from actual script. JSFunction::getLength had hasRest call, but now it cals nargs() for native function, and otherwise JSScript::funLength, because JSFunction::getOrCreateScript should create JSScript for interpreted function, and native function shouldn't have rest. In FunctionBox::initFromLazyFunction and FunctionBox::initStandaloneFunction, I removed the following line: length = fun->nargs() - fun->hasRest(); since initializing length at that point doesn't make sense. it's going to parse parameter after that, and it will get correct information then.
Attachment #8814649 -
Flags: review?(evilpies)
Assignee | ||
Comment 2•8 years ago
|
||
forgot to note that this patch is based on bug 1320408 patches. https://hg.mozilla.org/try/pushloghtml?changeset=0845b547f37e
Comment 3•8 years ago
|
||
Comment on attachment 8814649 [details] [diff] [review] Move JSFunction::HAS_REST to JSScript and LazyScript. Review of attachment 8814649 [details] [diff] [review]: ----------------------------------------------------------------- Nice
Attachment #8814649 -
Flags: review?(evilpies) → review+
Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/71e72406179d7eade596031badf3aa679da75cfc Bug 1320388 - Move JSFunction::HAS_REST to JSScript and LazyScript. r=evilpie
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/71e72406179d
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•