Closed Bug 1186626 Opened 8 years ago Closed 8 years ago

Replace AutoShapeVector with Rooted<ShapeVector>

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(5 files)

This was eminently straightforward. I split this up more than I probably needed to, but it should at least help raise awareness of the new tools.
Attachment #8637447 - Flags: review?(jdemooij)
And the ShapeVectors in self-hosting.
Attachment #8637448 - Flags: review?(till)
Attachment #8637449 - Flags: review?(efaustbmo)
Attachment #8637451 - Flags: review?(jorendorff)
And those should be all the users.
Attachment #8637452 - Flags: review?(sphink)
Comment on attachment 8637448 [details] [diff] [review]
use_rooted_for_selfhosting_shapevec-v0.diff

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

r=me
Attachment #8637448 - Flags: review?(till) → review+
Comment on attachment 8637449 [details] [diff] [review]
use_rooted_for_scopeobj_shapevec-v0.diff

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

APPROVED.

::: js/src/vm/ScopeObject.cpp
@@ +850,5 @@
>  
>      for (Shape::Range<NoGC> r(srcBlock->lastProperty()); !r.empty(); r.popFront())
> +        shapes[srcBlock->shapeToIndex(r.front())] = &r.front();
> +
> +    RootedId id(cx);

I like how you guys come through all the time and are like "people don't understand how to use Rooted at all" and just fix it. Thanks :)
Attachment #8637449 - Flags: review?(efaustbmo) → review+
Comment on attachment 8637447 [details] [diff] [review]
use_rooted_for_baseline_shapevec-v0.diff

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

What about RootedShapeVector/HandleShapeVector typedefs for consistency, or do you think that's confusing?
Attachment #8637447 - Flags: review?(jdemooij) → review+
(In reply to Jan de Mooij [:jandem] from comment #7)
> Comment on attachment 8637447 [details] [diff] [review]
> use_rooted_for_baseline_shapevec-v0.diff
> 
> Review of attachment 8637447 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> What about RootedShapeVector/HandleShapeVector typedefs for consistency, or
> do you think that's confusing?

I recently noticed that someone typedefed RootedScriptSource to Rooted<ScriptSourceObject>. Of course this was only after a frantic hour of trying to figure out how in the world Rooted<ScriptSource> could possibly have compiled and what GC bugs it had introduced. This sort of thing makes me think that the typedefs were a mistake.
Comment on attachment 8637452 [details] [diff] [review]
remove_AutoShapeVector-v0.diff

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

\o/
Attachment #8637452 - Flags: review?(sphink) → review+
Keywords: leave-open
Attachment #8637447 - Flags: checkin+
Attachment #8637448 - Flags: checkin+
Attachment #8637449 - Flags: checkin+
Attachment #8637451 - Flags: review?(jorendorff) → review?(jcoppeard)
Attachment #8637451 - Flags: review?(jcoppeard) → review+
Keywords: leave-open
https://hg.mozilla.org/mozilla-central/rev/6cc0bc6b707d
https://hg.mozilla.org/mozilla-central/rev/7cbb4de9b9c6
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Depends on: 1423875
You need to log in before you can comment on or make changes to this bug.