Closed Bug 1180017 Opened 9 years ago Closed 9 years ago

Make GCCellPtr easier to use with new opaque type decls

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: terrence, Assigned: jimb)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

Now that we need external type decls for all TraceKinds anyway for CallbackTracer, we might as well make use of them in GCCellPtr to simplify the definitions and make it more useful internally (and potentially externally too, since it is used by CallbackTracer). Specifically, we should move MapTypeToTraceKind external and use that to implement GCCellPtr::is<T> and as<T>. This would get rid of the isFoo()/asFoo() method explosion.
Perhaps this goes too far?
Assignee: terrence → jimb
Attachment #8629534 - Flags: review?(terrence)
Comment on attachment 8629534 [details] [diff] [review]
Give GCCellPtr is<T> and to<T> methods, replacing isFoo and toFoo methods. Fix callers.

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

Having worked with those tools for a couple months, I'm happy with them. Might as well take it to its logical conclusion: these are exactly the tools we want, so let's just make it so.
Attachment #8629534 - Flags: review?(terrence) → review+
<jimb> terrence: For consistency within SpiderMonkey, I would like to have the extraction method named as<T>, instead of to<T>. Is that okay with you?
<terrence> jimb: yes, that's fine
Flags: in-testsuite-
Target Milestone: --- → mozilla42
sorry had to back this out in https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=b65c048414f7 since one of this changes might have caused bug 1188799 at least started with this pushes
Flags: needinfo?(jimb)
and re-checkedin since this turned out to be innocent. sorry Jim :(
Flags: needinfo?(jimb)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: