Closed
Bug 868644
Opened 12 years ago
Closed 12 years ago
Put the StoreBuffer method definitions in the right namespace
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: terrence, Assigned: terrence)
References
Details
Attachments
(1 file)
11.19 KB,
patch
|
Details | Diff | Splinter Review |
I forgot to prefix all of the names with js::gc:: when declaring them. I'm surprised none of our current compilers complain about it.
Attachment #745417 -
Flags: review?(wmccloskey)
I don't think you need this because there's a "using js::gc" at the top of the file. Consider:
JS_ALWAYS_INLINE HeapSlot *
StoreBuffer::SlotEdge::slotLocation() const
{
...
}
When the compiler sees this, it tries to look up the name "StoreBuffer". It finds it in js::gc because of the using declaration. In contrast, consider this code:
void
SomeFunction()
{
...
}
In this case, if you wanted SomeFunction to be in js::gc, you would need to qualify it. The difference is that, in the first example, the compiler is looking up a pre-existing name (StoreBuffer), while in this case something new is being defined.
Assignee | ||
Comment 2•12 years ago
|
||
Ah, that makes sense! I figured something like that must be happening in practice since this code obviously compiles; I just wasn't sure if it was something we could depend on.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Updated•12 years ago
|
Attachment #745417 -
Flags: review?(wmccloskey)
You need to log in
before you can comment on or make changes to this bug.
Description
•