Fix 'inline function used but never defined' warnings (no bug, r=themaid)

This commit is contained in:
Luke Wagner 2012-07-02 09:25:09 -07:00
parent e837ced01b
commit 529893fccd
2 changed files with 28 additions and 24 deletions

View File

@ -1266,28 +1266,4 @@ MOZ_NORETURN void TypeFailure(JSContext *cx, const char *fmt, ...);
} /* namespace types */
} /* namespace js */
namespace JS {
template<> class AnchorPermitted<js::types::TypeObject *> { };
template <> struct RootMethods<const js::types::Type>
{
static js::types::Type initial() { return js::types::Type::UnknownType(); }
static ThingRootKind kind() { return THING_ROOT_TYPE; }
static bool poisoned(const js::types::Type &v) {
return (v.isTypeObject() && IsPoisonedPtr(v.typeObject()))
|| (v.isSingleObject() && IsPoisonedPtr(v.singleObject()));
}
};
template <> struct RootMethods<js::types::Type>
{
static js::types::Type initial() { return js::types::Type::UnknownType(); }
static ThingRootKind kind() { return THING_ROOT_TYPE; }
static bool poisoned(const js::types::Type &v) {
return (v.isTypeObject() && IsPoisonedPtr(v.typeObject()))
|| (v.isSingleObject() && IsPoisonedPtr(v.singleObject()));
}
};
}
#endif // jsinfer_h___

View File

@ -1522,4 +1522,32 @@ JSCompartment::getEmptyType(JSContext *cx)
return emptyTypeObject;
}
namespace JS {
template<> class AnchorPermitted<js::types::TypeObject *> { };
template <>
struct RootMethods<const js::types::Type>
{
static js::types::Type initial() { return js::types::Type::UnknownType(); }
static ThingRootKind kind() { return THING_ROOT_TYPE; }
static bool poisoned(const js::types::Type &v) {
return (v.isTypeObject() && IsPoisonedPtr(v.typeObject()))
|| (v.isSingleObject() && IsPoisonedPtr(v.singleObject()));
}
};
template <>
struct RootMethods<js::types::Type>
{
static js::types::Type initial() { return js::types::Type::UnknownType(); }
static ThingRootKind kind() { return THING_ROOT_TYPE; }
static bool poisoned(const js::types::Type &v) {
return (v.isTypeObject() && IsPoisonedPtr(v.typeObject()))
|| (v.isSingleObject() && IsPoisonedPtr(v.singleObject()));
}
};
} // namespace JS
#endif // jsinferinlines_h___