Closed Bug 716135 Opened 13 years ago Closed 13 years ago

GC: add a bool to NewGCObject for Nursery creation

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file, 1 obsolete file)

We want to be selective about what objects we allow to be allocated into the Nursery, since we want to bake pointers to low-level types (Shape, TypeObject, etc) into the JIT. In general, we only want to allocate Object objects from the Nursery and then only when there is no finalizer on the object. There is one path for these allocations - JSObject::create - and we have access to the clasp there, so we can check for finalizer presence. We need to add a boolean parameter (default value false) to the GC's object allocator to signal when we should be allocating from the Nursery.
Attached patch v0: first pass (obsolete) — Splinter Review
This is what I got out of our conversation about who gets allocated into the Nursery last week. Is this what you meant?
Attachment #587144 - Flags: feedback?(bhackett1024)
Attachment #587144 - Flags: feedback?(bhackett1024) → feedback+
Why don't you just use the finalize kind? Background finalization uses the same information. Background finalize kinds don't have finalizers.
Based on our discussion on IRC earlier, it looks like we can easily get away with using the AllocKind to determine the initial Generation. Although there is not an assert specifically for !clasp->finalizer already, there is an assert at the top of finalizeLater that specifically lays out the intention of the background thing kinds. The mapping in this patch matches this assert. Happily, the changes we discussed make this patch completely trivial.
Attachment #587144 - Attachment is obsolete: true
This is already integrated with my generational patches.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: