The default bug view has changed. See this FAQ.

GC: make a RelocatableId HeapId variant that does not trigger post-barriers

RESOLVED FIXED in mozilla15

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

Trunk
mozilla15
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
We have a single user where this will be necessary: WatchKey.  Uhg.
(Assignee)

Updated

5 years ago
Blocks: 745325
(Assignee)

Comment 1

5 years ago
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.
Assignee: general → terrence
Status: NEW → ASSIGNED
Attachment #615485 - Flags: review?(wmccloskey)
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.
Attachment #615485 - Flags: review?(wmccloskey) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/409902e7a4ae
https://hg.mozilla.org/mozilla-central/rev/409902e7a4ae
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.