Last Comment Bug 745322 - GC: make a RelocatableId HeapId variant that does not trigger post-barriers
: GC: make a RelocatableId HeapId variant that does not trigger post-barriers
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Terrence Cole [:terrence]
:
:
Mentors:
Depends on:
Blocks: 744270 745325
  Show dependency treegraph
 
Reported: 2012-04-13 13:47 PDT by Terrence Cole [:terrence]
Modified: 2012-04-27 06:57 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v0: tested in the verifier (6.80 KB, patch)
2012-04-16 15:02 PDT, Terrence Cole [:terrence]
wmccloskey: review+
Details | Diff | Splinter Review

Description Terrence Cole [:terrence] 2012-04-13 13:47:34 PDT
We have a single user where this will be necessary: WatchKey.  Uhg.
Comment 1 Terrence Cole [:terrence] 2012-04-16 15:02:20 PDT
Created attachment 615485 [details] [diff] [review]
v0: tested in the verifier

This works with WatchKey and correctly gives us verifier failures.  I had to fix a bug in the verifier as well: we weren't tracing through watchpointMap.  Once I started calling comp->watchpointMap->markAll() in the verifier, the missing barrier showed up.

I need to go stare at MarkRuntime to see if I'm missing anything more in this category.
Comment 2 Bill McCloskey (:billm) 2012-04-19 13:14:22 PDT
Comment on attachment 615485 [details] [diff] [review]
v0: tested in the verifier

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

::: js/src/gc/Barrier.h
@@ +439,4 @@
>    public:
> +    inline ~EncapsulatedId() { pre(); }
> +
> +    inline void init(jsid id) MOZ_DELETE;

It doesn't make sense to use MOZ_DELETE on something that's not builtin. I think you just don't want to define it at all.

@@ +441,5 @@
> +
> +    inline void init(jsid id) MOZ_DELETE;
> +
> +    inline EncapsulatedId &operator=(jsid id) MOZ_DELETE;
> +    inline EncapsulatedId &operator=(const EncapsulatedId &v) MOZ_DELETE;

Anything marked MOZ_DELETE should be private. Also, I don't think you need the jsid version.

@@ +459,5 @@
> +
> +class RelocatableId : public EncapsulatedId
> +{
> +  public:
> +    explicit RelocatableId() : EncapsulatedId(JSID_VOID) {}

No need for JSID_VOID there.

@@ +463,5 @@
> +    explicit RelocatableId() : EncapsulatedId(JSID_VOID) {}
> +    explicit inline RelocatableId(jsid id) : EncapsulatedId(id) {}
> +
> +    inline RelocatableId &operator=(jsid id);
> +    inline RelocatableId &operator=(const RelocatableId &v);

Do we want to MOZ_DELETE the copy constructor for RelocatableId as well?

@@ +469,5 @@
> +
> +class HeapId : public EncapsulatedId
> +{
> +  public:
> +    explicit HeapId() : EncapsulatedId(JSID_VOID) {}

No JSID_VOID here either.
Comment 3 Terrence Cole [:terrence] 2012-04-26 09:37:17 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/409902e7a4ae
Comment 4 Ed Morley [:emorley] 2012-04-27 06:57:02 PDT
https://hg.mozilla.org/mozilla-central/rev/409902e7a4ae

Note You need to log in before you can comment on or make changes to this bug.