Closed
Bug 753249
Opened 12 years ago
Closed 12 years ago
Remove non-TCF_FUN_FLAGS from TreeContextFlags
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(6 files)
38.27 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
23.02 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
6.50 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
6.52 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
6.52 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
10.47 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
In this bug I will remove the flags in TreeContextFlags that are not in TCF_FUN_FLAGS.
Assignee | ||
Comment 1•12 years ago
|
||
TCF_IN_FUNCTION is pretty easy. It can be replaced by SharedContext::inFunction. (BTW, Luke, if you get sick of reviewing these patches let me know and I'll find someone else to do them.)
Attachment #622293 -
Flags: review?(luke)
Assignee | ||
Comment 2•12 years ago
|
||
TCF_IN_FOR_INIT is similarly easy. There are a couple of places in Parser.cpp where it is cleared and then restored and that involved |oldflags|; I suspect |oldflags| isn't necessary but I'm not sure so I've modified that code in a very conservative way, and follow-up patches will clarify things.
Attachment #622294 -
Flags: review?(luke)
Assignee | ||
Comment 3•12 years ago
|
||
TCF_IN_WITH is easy. It's *never* set in SharedContext::flags; it's only set in FunctionBox::tcflags. So I made it a separate bit-field in FunctionBox.
Attachment #622295 -
Flags: review?(luke)
Assignee | ||
Comment 4•12 years ago
|
||
TCF_HAS_SINGLETONS is easy to move to a bit-field in BytecodeEmitter.
Attachment #622296 -
Flags: review?(luke)
Assignee | ||
Comment 5•12 years ago
|
||
This is a precursor to removing TCF_GENEXP_LAMBDA. TCF_GENEXP_LAMBDA is a funbox->tcflags-only flag, with one exception in FoldConstants. But if you look closely, the parser->tc->sc->flags use in FoldConstants is really weird -- the PN_FUNC case in FoldConstants temporarily overwrites the existing parser->tc->sc->flags with pn->pn_funbox->tcflags, so that is what is really being checked! So this patch stops that silliness, and instead just passes a boolean around. Also, FoldConstants did some weird saving/restoring with functionList; this is a no-op because nowhere else in FoldConstants.cpp touches functionList, so I removed it too.
Attachment #622297 -
Flags: review?(luke)
Assignee | ||
Comment 6•12 years ago
|
||
Thanks to the previous patch, TCF_GENEXP_LAMBDA is now only needed in FunctionBox. This patch converts it to a bit-field.
Attachment #622299 -
Flags: review?(luke)
Updated•12 years ago
|
Attachment #622293 -
Flags: review?(luke) → review+
Comment 7•12 years ago
|
||
Comment on attachment 622294 [details] [diff] [review] Patch 2: remove TCF_IN_FOR_INIT Awesome; this will make it 10x easier to watch the flow of these bits.
Attachment #622294 -
Flags: review?(luke) → review+
Updated•12 years ago
|
Attachment #622295 -
Flags: review?(luke) → review+
Updated•12 years ago
|
Attachment #622296 -
Flags: review?(luke) → review+
Comment 8•12 years ago
|
||
Comment on attachment 622297 [details] [diff] [review] Patch 5: simplify use of TCF_GENEXP_LAMBDA in FoldConstants mindblowing
Attachment #622297 -
Flags: review?(luke) → review+
Comment 9•12 years ago
|
||
Comment on attachment 622299 [details] [diff] [review] Patch 6: remove TCF_GENEXP_LAMBDA rock on
Attachment #622299 -
Flags: review?(luke) → review+
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9ef220baee5e https://hg.mozilla.org/integration/mozilla-inbound/rev/3f8e5a401ea0 https://hg.mozilla.org/integration/mozilla-inbound/rev/8fdcdc40cb85 https://hg.mozilla.org/integration/mozilla-inbound/rev/56df36472731 https://hg.mozilla.org/integration/mozilla-inbound/rev/6beadc18515b https://hg.mozilla.org/integration/mozilla-inbound/rev/b69d000b726a
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9ef220baee5e https://hg.mozilla.org/mozilla-central/rev/3f8e5a401ea0 https://hg.mozilla.org/mozilla-central/rev/8fdcdc40cb85 https://hg.mozilla.org/mozilla-central/rev/56df36472731 https://hg.mozilla.org/mozilla-central/rev/6beadc18515b https://hg.mozilla.org/mozilla-central/rev/b69d000b726a
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in
before you can comment on or make changes to this bug.
Description
•