Closed Bug 1011355 Opened 11 years ago Closed 11 years ago

Minor FreeSpan/FreeList clean-ups

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(3 files)

I have three clean-up patches.
This patch removes allocateFromNewArena. All FreeList allocations now occur in allocate(), which is nice.
Attachment #8423566 - Flags: review?(wmccloskey)
ArenaHeader uses a compact FreeSpan representation to save space. The implementation of this is, uh, lower-level than is ideal. This patch introduces a new class CompactFreeSpan to remedy this. The resulting code is a little more verbose but much more readable, and it avoids manual shifting and masking.
Attachment #8423568 - Flags: review?(wmccloskey)
Attachment #8423583 - Flags: review?(wmccloskey)
Attachment #8423566 - Flags: review?(wmccloskey) → review+
Comment on attachment 8423566 [details] [diff] [review] Remove FreeList::allocateFromNewArena() Review of attachment 8423566 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsgc.cpp @@ +1599,2 @@ > JS_ASSERT(!aheader->hasFreeThings()); > + Arena* arena = aheader->getArena(); Oops, just noticed that the * should go with |arena|.
Attachment #8423568 - Flags: review?(wmccloskey) → review+
Attachment #8423583 - Flags: review?(wmccloskey) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: