GC: Call MarkStringUnbarriered directly

RESOLVED FIXED in mozilla12

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

Trunk
mozilla12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 591268 [details] [diff] [review]
v0

We have a special marker function for handling the Atom list because we need to call JS_SET_TRACING_INDEX externally to avoid clobbering the index.  However, nobody cares about the index here and if they do, they can add custom debug code.  It is better at this point to have a consistent and correct interface, thus we remove the specialized atomized string marking in favor of the existing string marker.
Attachment #591268 - Flags: review?(wmccloskey)
Comment on attachment 591268 [details] [diff] [review]
v0

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

Good to see these go.

::: js/src/jsatom.cpp
@@ +388,3 @@
>      if (rt->gcKeepAtoms) {
>          for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
> +            MarkStringUnbarriered(trc, r.front().asPtr(), "locked_atom");

I think you can use MarkRoot here.

@@ +394,5 @@
>              AtomStateEntry entry = r.front();
>              if (!entry.isTagged())
>                  continue;
>  
> +            MarkStringUnbarriered(trc, entry.asPtr(), "interned_atom");

and here.
Attachment #591268 - Flags: review?(wmccloskey) → review+
(Assignee)

Comment 2

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