Closed Bug 727281 Opened 10 years ago Closed 10 years ago

GC: indirect Object marking (root and barriered)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file)

Make marking interfaces for MarkTypeRoot and MarkType take type**.  This does not include the Unbarriered object marking methods because these are mostly called through the incremental barriers and I am substantially less certain about how we want to implement that interface.
Attachment #597212 - Flags: review?(wmccloskey)
Comment on attachment 597212 [details] [diff] [review]
V0: Perfectly straightforward.

Review of attachment 597212 [details] [diff] [review]:
-----------------------------------------------------------------

Fantastic. Aside from the hashtables, I'm amazed how clean this was.

::: js/src/jsgcmark.h
@@ +117,5 @@
>  /*** Special Cases ***/
>  
>  /* TypeNewObject contains a HeapPtr<const Shape> that needs a unique cast. */
>  void
> +MarkShape(JSTracer *trc, HeapPtr<const Shape> *thing, const char *name);

Could we just change TypeNewScript so that it just uses a normal HeapPtrShape? This signature isn't really right, since we are going to be changing the shape.

::: js/src/vm/Debugger.h
@@ +235,5 @@
>      ~Debugger();
>  
>      bool init(JSContext *cx);
>      inline const js::HeapPtrObject &toJSObject() const;
> +    inline js::HeapPtrObject &getJSObjectRef();

I think we're not supposed to use get in the name unless it can fail, or something like that. So it's probably better to use toJSObjectRef, I guess.
Attachment #597212 - Flags: review?(wmccloskey) → review+
(In reply to Bill McCloskey (:billm) from comment #1)
> ::: js/src/jsgcmark.h
> @@ +117,5 @@
> >  /*** Special Cases ***/
> >  
> >  /* TypeNewObject contains a HeapPtr<const Shape> that needs a unique cast. */
> >  void
> > +MarkShape(JSTracer *trc, HeapPtr<const Shape> *thing, const char *name);
> 
> Could we just change TypeNewScript so that it just uses a normal
> HeapPtrShape? This signature isn't really right, since we are going to be
> changing the shape.

I will commit this with the indirect ID marking, as we dicussed on bug 727135.  That is going to be an interesting merge.

http://hg.mozilla.org/integration/mozilla-inbound/rev/2e89173cb52e
https://hg.mozilla.org/mozilla-central/rev/2e89173cb52e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.