Closed
Bug 1215337
Opened 10 years ago
Closed 10 years ago
Cache slotSpan()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla44
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | fixed |
People
(Reporter: sfink, Assigned: sfink)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
1.43 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
While single-stepping in gdb, I found a place where slotSpan() gets called for every iteration through a loop.
| Assignee | ||
Comment 1•10 years ago
|
||
Yes, I should time this and things. But I don't want to spend the time, and the resulting code is at least as easy to follow.
Attachment #8674579 -
Flags: review?(terrence)
Updated•10 years ago
|
Summary: Cache spotSpan() → Cache slotSpan()
Comment 2•10 years ago
|
||
Comment on attachment 8674579 [details] [diff] [review]
Cache spotSpan()
Review of attachment 8674579 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jsobj.cpp
@@ +3703,5 @@
> {
> GetObjectSlotNameFunctor func(nobj);
> JS::AutoTracingDetails ctx(trc, func);
> JS::AutoTracingIndex index(trc);
> + uint32_t nslots = nobj->slotSpan(); // cache
Might as well use |const uint32_t|, since that's kinda what you're aiming to show the compiler.
Also, "cache" isn't really that clear. How about a full comment like: // Since tracing can mutate the target, the compiler will not generally be able to prove that slotSpan is constant across the loop.
Attachment #8674579 -
Flags: review?(terrence) → review+
Comment 4•10 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/1266f78145c4 along with bug 1215336.
Comment 6•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment 7•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•