Closed
Bug 1063233
Opened 11 years ago
Closed 10 years ago
JS::ubi::Node specializations for SpiderMonkey types should live with those types' definitions
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: jimb, Assigned: jimb)
Details
Attachments
(3 files, 4 obsolete files)
2.97 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
10.95 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
860 bytes,
patch
|
Details | Diff | Splinter Review |
JS::ubi::Node is designed to allow the code that implements the ubi::Node methods for a particular referent type live with the implementation of that referent type. This lets us keep all the code that understands a particular type in one place.
At the moment, all JS::ubi::Node support for SpiderMonkey types is in js/public/UbiNode.h and js/src/vm/UbiNode.cpp. This means that js/public/UbiNode.h includes incomplete declarations for internal SpiderMonkey types like js::Shape and js::BaseShape. This is dumb, and dumb in a way that ubi::Node was designed to avoid.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8484623 -
Flags: review?(terrence)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8484625 -
Flags: review?(terrence)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8484626 -
Flags: review?(terrence)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8484628 -
Flags: review?(terrence)
Updated•11 years ago
|
Attachment #8484623 -
Flags: review?(terrence) → review+
Comment 5•11 years ago
|
||
Comment on attachment 8484625 [details] [diff] [review]
Move JS::ubi::Node support for js::Shape and js::BaseShape next to their declarations and definitions.
Review of attachment 8484625 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/vm/Shape.cpp
@@ +1578,5 @@
> +template<> const jschar TracerConcrete<js::BaseShape>::concreteTypeName[] =
> + MOZ_UTF16("js::BaseShape");
> +
> +} // namespace ubi
> +} // namespace JS
Why does this decl need to be in the namespace but the other does not? Please use the same style as JS::ubi::TracerConcreate<js::Shape> here if at all possible.
Attachment #8484625 -
Flags: review?(terrence) → review+
Updated•11 years ago
|
Attachment #8484626 -
Flags: review?(terrence) → review+
Updated•11 years ago
|
Attachment #8484628 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Terrence Cole [:terrence] from comment #5)
> Why does this decl need to be in the namespace but the other does not?
> Please use the same style as JS::ubi::TracerConcreate<js::Shape> here if at
> all possible.
I botched it. Thanks for catching that.
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Flags: in-testsuite-
Target Milestone: --- → mozilla35
I backed this and bug 1063247 out for non-unified Windows build bustage:
https://hg.mozilla.org/integration/mozilla-inbound/rev/04be894027e6
https://tbpl.mozilla.org/php/getParsedLog.php?id=47507112&tree=Mozilla-Inbound
Flags: needinfo?(jimb)
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8488278 -
Flags: review?(terrence)
Flags: needinfo?(jimb)
Assignee | ||
Comment 10•10 years ago
|
||
Okay, I've got a clean (well, starred) try push for this one that is fully non-unified:
https://tbpl.mozilla.org/?tree=Try&rev=cb4409b1980a
Attachment #8484623 -
Attachment is obsolete: true
Attachment #8484625 -
Attachment is obsolete: true
Attachment #8484626 -
Attachment is obsolete: true
Attachment #8484628 -
Attachment is obsolete: true
Attachment #8488280 -
Flags: review?(terrence)
Assignee | ||
Comment 11•10 years ago
|
||
Not requesting review yet; let's see what happens in bug 1066193.
Assignee | ||
Comment 12•10 years ago
|
||
Try push with the bug 1066193 workaround:
https://tbpl.mozilla.org/?tree=Try&rev=f251d8b8497a
Comment 13•10 years ago
|
||
Comment on attachment 8488278 [details] [diff] [review]
Provide default definitions for optional JS::ubi::Node methods in Base.
Review of attachment 8488278 [details] [diff] [review]:
-----------------------------------------------------------------
Okay. It's a bit worrisome that there are contexts where the actual defs aren't available, but I guess that's the cost of diaspora with C++'s build model.
Attachment #8488278 -
Flags: review?(terrence) → review+
Comment 14•10 years ago
|
||
Comment on attachment 8488280 [details] [diff] [review]
Move JS::ubi::Node specializations for SpiderMonkey types closer to those types' definitions.
Review of attachment 8488280 [details] [diff] [review]:
-----------------------------------------------------------------
Nice!
Attachment #8488280 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 15•10 years ago
|
||
Thanks for the reviews!
Because we've had such problems in this bug, here's another Try push, this time without the unification-disabling patch. Gotta try everything both ways.
https://tbpl.mozilla.org/?tree=Try&rev=d70d3d0b03d2
Assignee | ||
Comment 16•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fc35048535c8
https://hg.mozilla.org/mozilla-central/rev/4bbc9c3777e5
https://hg.mozilla.org/mozilla-central/rev/cf043246967d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•