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)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file)

Attached patch v0Splinter 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.
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
Attachment #745417 - Flags: review?(wmccloskey)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: