Closed
Bug 787866
Opened 13 years ago
Closed 13 years ago
Remove SharedContext::fun_
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(3 files)
|
2.53 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
|
10.36 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
|
25.75 KB,
patch
|
Details | Diff | Splinter Review |
SharedContext::fun_ can be removed; it's subsumed by SharedContext::funbox_
(except when it's not, but I'll fix that case).
| Assignee | ||
Comment 1•13 years ago
|
||
Part 1. This patch removes the unused |cx| parameter from ContextFlags().
Attachment #657766 -
Flags: review?(luke)
| Assignee | ||
Comment 2•13 years ago
|
||
There are various function-specific flags in SharedContext::cxFlags. For
some of them, we assert that we're in a function context when we get/set
them. But for others we don't. This patch tightens things up so that we
assert for all of them.
Attachment #657767 -
Flags: review?(luke)
| Assignee | ||
Comment 3•13 years ago
|
||
Function-specific SharedContexts have a |fun_| and a |funbox_| field, even
though FunctionBox is just a glorified wrapper of a JSFunction. This seems
to be because CompileFunctionBody() doesn't provide a FunctionBox.
This patch changes it so that CompileFunctionBody() does provide a
FunctionBox, which allows us to remove SharedContext::fun_. One minor
consequence is that we have to handle a NULL |outerpc| in newFunctionBox()
and FunctionBox().
AIUI the GC rooting will be ok because FunctionBox is heap-allocated and
traced by Parser::trace().
| Assignee | ||
Updated•13 years ago
|
Summary: Remove unused |cx| parameter from ContextFlags(). → Remove SharedContext::fun_.
| Assignee | ||
Updated•13 years ago
|
Summary: Remove SharedContext::fun_. → Remove SharedContext::fun_
Updated•13 years ago
|
Attachment #657766 -
Flags: review?(luke) → review+
Updated•13 years ago
|
Attachment #657767 -
Flags: review?(luke) → review+
| Assignee | ||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2d22b3ddf593
https://hg.mozilla.org/mozilla-central/rev/55639ec64ed2
https://hg.mozilla.org/mozilla-central/rev/3ea27df2919a
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•