зеркало из https://github.com/mozilla/pjs.git
Bug 587103. Properly scope external calls in templated functions to fix compilation with some compilers. r=mrbkap
This commit is contained in:
Родитель
54f8f92830
Коммит
5f939c7a00
|
@ -216,7 +216,7 @@ SCInput::readArray(T *p, size_t nelems)
|
|||
const T *q = (const T *) point;
|
||||
const T *qend = q + nelems;
|
||||
while (q != qend)
|
||||
*p++ = SwapBytes(*q++);
|
||||
*p++ = ::SwapBytes(*q++);
|
||||
}
|
||||
point += nwords;
|
||||
return true;
|
||||
|
@ -325,7 +325,7 @@ SCOutput::writeArray(const T *p, size_t nelems)
|
|||
} else {
|
||||
const T *pend = p + nelems;
|
||||
while (p != pend)
|
||||
*q++ = SwapBytes(*p++);
|
||||
*q++ = ::SwapBytes(*p++);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ Arena<T>::mark(T *thing, JSTracer *trc)
|
|||
|
||||
JS_ASSERT(sizeof(T) == aheader.thingSize);
|
||||
JS_SET_TRACING_NAME(trc, "machine stack");
|
||||
Mark(trc, alignedThing);
|
||||
js::gc::Mark(trc, alignedThing);
|
||||
|
||||
#ifdef JS_DUMP_CONSERVATIVE_GC_ROOTS
|
||||
if (alignedThing != thing)
|
||||
|
@ -1352,7 +1352,7 @@ Arena<T>::markDelayedChildren(JSTracer *trc)
|
|||
JS_ASSERT(thing == getAlignedThing(thing));
|
||||
while (thing <= thingsEnd) {
|
||||
if (thing->asCell()->isMarked())
|
||||
MarkChildren(trc, thing);
|
||||
js::gc::MarkChildren(trc, thing);
|
||||
|
||||
thing++;
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ static JS_ALWAYS_INLINE void
|
|||
Mark(JSTracer *trc, T *thing)
|
||||
{
|
||||
JS_ASSERT(thing);
|
||||
JS_ASSERT(JS_IS_VALID_TRACE_KIND(GetGCThingTraceKind(thing)));
|
||||
JS_ASSERT(JS_IS_VALID_TRACE_KIND(js::gc::GetGCThingTraceKind(thing)));
|
||||
JS_ASSERT(trc->debugPrinter || trc->debugPrintArg);
|
||||
|
||||
/* Per-Compartment GC only with GCMarker and no custom JSTracer */
|
||||
|
@ -214,12 +214,12 @@ Mark(JSTracer *trc, T *thing)
|
|||
goto out;
|
||||
|
||||
if (!IS_GC_MARKING_TRACER(trc)) {
|
||||
uint32 kind = GetGCThingTraceKind(thing);
|
||||
uint32 kind = js::gc::GetGCThingTraceKind(thing);
|
||||
trc->callback(trc, thing, kind);
|
||||
goto out;
|
||||
}
|
||||
|
||||
TypedMarker(trc, thing);
|
||||
js::gc::TypedMarker(trc, thing);
|
||||
|
||||
out:
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -226,7 +226,7 @@ EnumerateNativeProperties(JSContext *cx, JSObject *obj, JSObject *pobj, uintN fl
|
|||
}
|
||||
}
|
||||
|
||||
Reverse(props->begin() + initialLength, props->end());
|
||||
::Reverse(props->begin() + initialLength, props->end());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -681,13 +681,13 @@ class TypedArrayTemplate
|
|||
case JSENUMERATE_INIT_ALL:
|
||||
statep->setBoolean(true);
|
||||
if (idp)
|
||||
*idp = INT_TO_JSID(tarray->length + 1);
|
||||
*idp = ::INT_TO_JSID(tarray->length + 1);
|
||||
break;
|
||||
|
||||
case JSENUMERATE_INIT:
|
||||
statep->setInt32(0);
|
||||
if (idp)
|
||||
*idp = INT_TO_JSID(tarray->length);
|
||||
*idp = ::INT_TO_JSID(tarray->length);
|
||||
break;
|
||||
|
||||
case JSENUMERATE_NEXT:
|
||||
|
@ -697,7 +697,7 @@ class TypedArrayTemplate
|
|||
} else {
|
||||
uint32 index = statep->toInt32();
|
||||
if (index < uint32(tarray->length)) {
|
||||
*idp = INT_TO_JSID(index);
|
||||
*idp = ::INT_TO_JSID(index);
|
||||
statep->setInt32(index + 1);
|
||||
} else {
|
||||
JS_ASSERT(index == tarray->length);
|
||||
|
@ -1164,7 +1164,7 @@ class TypedArrayTemplate
|
|||
Value v;
|
||||
|
||||
for (uintN i = 0; i < len; ++i) {
|
||||
if (!ar->getProperty(cx, INT_TO_JSID(i), &v))
|
||||
if (!ar->getProperty(cx, ::INT_TO_JSID(i), &v))
|
||||
return false;
|
||||
*dest++ = nativeFromValue(cx, v);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ static inline void CheckHelper(const char* file,
|
|||
|
||||
// The CHECK macro checks that the given condition is true; if not, it
|
||||
// prints a message to stderr and aborts.
|
||||
#define CHECK(condition) CheckHelper(__FILE__, __LINE__, #condition, condition)
|
||||
#define CHECK(condition) ::CheckHelper(__FILE__, __LINE__, #condition, condition)
|
||||
|
||||
|
||||
// Helper function used by the CHECK_EQ function when given int
|
||||
|
|
Загрузка…
Ссылка в новой задаче