GC: indirect Object marking (root and barriered)

RESOLVED FIXED in mozilla13

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

Trunk
mozilla13
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 597212 [details] [diff] [review]
V0: Perfectly straightforward.

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+
(Assignee)

Comment 2

6 years ago
(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

Comment 3

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