mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1119230 - remove lingering JIT code for PJS. r=shu
This commit is contained in:
parent
78956ce1a3
commit
7e41085941
@ -42,29 +42,6 @@
|
|||||||
typedef bool
|
typedef bool
|
||||||
(* JSNative)(JSContext *cx, unsigned argc, JS::Value *vp);
|
(* JSNative)(JSContext *cx, unsigned argc, JS::Value *vp);
|
||||||
|
|
||||||
/* Typedef for native functions that may be called in parallel. */
|
|
||||||
typedef bool
|
|
||||||
(* JSParallelNative)(js::ForkJoinContext *cx, unsigned argc, JS::Value *vp);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Typedef for native functions that may be called either in parallel or
|
|
||||||
* sequential execution.
|
|
||||||
*/
|
|
||||||
typedef bool
|
|
||||||
(* JSThreadSafeNative)(js::ThreadSafeContext *cx, unsigned argc, JS::Value *vp);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Convenience wrappers for passing in ThreadSafeNative to places that expect
|
|
||||||
* a JSNative or a JSParallelNative.
|
|
||||||
*/
|
|
||||||
template <JSThreadSafeNative threadSafeNative>
|
|
||||||
inline bool
|
|
||||||
JSNativeThreadSafeWrapper(JSContext *cx, unsigned argc, JS::Value *vp);
|
|
||||||
|
|
||||||
template <JSThreadSafeNative threadSafeNative>
|
|
||||||
inline bool
|
|
||||||
JSParallelNativeThreadSafeWrapper(js::ForkJoinContext *cx, unsigned argc, JS::Value *vp);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compute |this| for the |vp| inside a JSNative, either boxing primitives or
|
* Compute |this| for the |vp| inside a JSNative, either boxing primitives or
|
||||||
* replacing with the global object as necessary.
|
* replacing with the global object as necessary.
|
||||||
|
@ -485,24 +485,4 @@ JSContext::currentScript(jsbytecode **ppc,
|
|||||||
return script;
|
return script;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <JSThreadSafeNative threadSafeNative>
|
|
||||||
inline bool
|
|
||||||
JSNativeThreadSafeWrapper(JSContext *cx, unsigned argc, JS::Value *vp)
|
|
||||||
{
|
|
||||||
return threadSafeNative(cx, argc, vp);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <JSThreadSafeNative threadSafeNative>
|
|
||||||
inline bool
|
|
||||||
JSParallelNativeThreadSafeWrapper(js::ForkJoinContext *cx, unsigned argc, JS::Value *vp)
|
|
||||||
{
|
|
||||||
return threadSafeNative(cx, argc, vp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* static */ inline JSContext *
|
|
||||||
js::ExecutionModeTraits<js::SequentialExecution>::toContextType(ExclusiveContext *cx)
|
|
||||||
{
|
|
||||||
return cx->asJSContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* jscntxtinlines_h */
|
#endif /* jscntxtinlines_h */
|
||||||
|
@ -2165,7 +2165,6 @@ struct JSJitInfo {
|
|||||||
Getter,
|
Getter,
|
||||||
Setter,
|
Setter,
|
||||||
Method,
|
Method,
|
||||||
ParallelNative,
|
|
||||||
StaticMethod,
|
StaticMethod,
|
||||||
// Must be last
|
// Must be last
|
||||||
OpTypeCount
|
OpTypeCount
|
||||||
@ -2220,11 +2219,6 @@ struct JSJitInfo {
|
|||||||
AliasSetCount
|
AliasSetCount
|
||||||
};
|
};
|
||||||
|
|
||||||
bool hasParallelNative() const
|
|
||||||
{
|
|
||||||
return type() == ParallelNative;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool needsOuterizedThisObject() const
|
bool needsOuterizedThisObject() const
|
||||||
{
|
{
|
||||||
return type() != Getter && type() != Setter;
|
return type() != Getter && type() != Setter;
|
||||||
@ -2254,8 +2248,6 @@ struct JSJitInfo {
|
|||||||
JSJitGetterOp getter;
|
JSJitGetterOp getter;
|
||||||
JSJitSetterOp setter;
|
JSJitSetterOp setter;
|
||||||
JSJitMethodOp method;
|
JSJitMethodOp method;
|
||||||
/* An alternative native that's safe to call in parallel mode. */
|
|
||||||
JSParallelNative parallelNative;
|
|
||||||
/* A DOM static method, used for Promise wrappers */
|
/* A DOM static method, used for Promise wrappers */
|
||||||
JSNative staticMethod;
|
JSNative staticMethod;
|
||||||
};
|
};
|
||||||
@ -2340,45 +2332,6 @@ struct JSTypedMethodJitInfo
|
|||||||
have side-effects. */
|
have side-effects. */
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace JS {
|
|
||||||
namespace detail {
|
|
||||||
|
|
||||||
/* NEVER DEFINED, DON'T USE. For use by JS_CAST_PARALLEL_NATIVE_TO only. */
|
|
||||||
inline int CheckIsParallelNative(JSParallelNative parallelNative);
|
|
||||||
|
|
||||||
} // namespace detail
|
|
||||||
} // namespace JS
|
|
||||||
|
|
||||||
#define JS_CAST_PARALLEL_NATIVE_TO(v, To) \
|
|
||||||
(static_cast<void>(sizeof(JS::detail::CheckIsParallelNative(v))), \
|
|
||||||
reinterpret_cast<To>(v))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* You may ask yourself: why do we define a wrapper around a wrapper here?
|
|
||||||
* The answer is that some compilers don't understand initializing a union
|
|
||||||
* as we do below with a construct like:
|
|
||||||
*
|
|
||||||
* reinterpret_cast<JSJitGetterOp>(JSParallelNativeThreadSafeWrapper<op>)
|
|
||||||
*
|
|
||||||
* (We need the reinterpret_cast because we must initialize the union with
|
|
||||||
* a datum of the type of the union's first member.)
|
|
||||||
*
|
|
||||||
* Presumably this has something to do with template instantiation.
|
|
||||||
* Initializing with a normal function pointer seems to work fine. Hence
|
|
||||||
* the ugliness that you see before you.
|
|
||||||
*/
|
|
||||||
#define JS_JITINFO_NATIVE_PARALLEL(infoName, parallelOp) \
|
|
||||||
const JSJitInfo infoName = \
|
|
||||||
{{JS_CAST_PARALLEL_NATIVE_TO(parallelOp, JSJitGetterOp)},0,0,JSJitInfo::ParallelNative,JSJitInfo::AliasEverything,JSVAL_TYPE_MISSING,false,false,false,false,false,0}
|
|
||||||
|
|
||||||
#define JS_JITINFO_NATIVE_PARALLEL_THREADSAFE(infoName, wrapperName, serialOp) \
|
|
||||||
bool wrapperName##_ParallelNativeThreadSafeWrapper(js::ForkJoinContext *cx, unsigned argc, \
|
|
||||||
JS::Value *vp) \
|
|
||||||
{ \
|
|
||||||
return JSParallelNativeThreadSafeWrapper<serialOp>(cx, argc, vp); \
|
|
||||||
} \
|
|
||||||
JS_JITINFO_NATIVE_PARALLEL(infoName, wrapperName##_ParallelNativeThreadSafeWrapper)
|
|
||||||
|
|
||||||
static MOZ_ALWAYS_INLINE const JSJitInfo *
|
static MOZ_ALWAYS_INLINE const JSJitInfo *
|
||||||
FUNCTION_VALUE_TO_JITINFO(const JS::Value& v)
|
FUNCTION_VALUE_TO_JITINFO(const JS::Value& v)
|
||||||
{
|
{
|
||||||
|
@ -19,8 +19,6 @@ namespace js {
|
|||||||
class FunctionExtended;
|
class FunctionExtended;
|
||||||
|
|
||||||
typedef JSNative Native;
|
typedef JSNative Native;
|
||||||
typedef JSParallelNative ParallelNative;
|
|
||||||
typedef JSThreadSafeNative ThreadSafeNative;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct JSAtomState;
|
struct JSAtomState;
|
||||||
@ -157,9 +155,6 @@ class JSFunction : public js::NativeObject
|
|||||||
bool isNamedLambda() const {
|
bool isNamedLambda() const {
|
||||||
return isLambda() && displayAtom() && !hasGuessedAtom();
|
return isLambda() && displayAtom() && !hasGuessedAtom();
|
||||||
}
|
}
|
||||||
bool hasParallelNative() const {
|
|
||||||
return isNative() && jitInfo() && jitInfo()->hasParallelNative();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isBuiltinFunctionConstructor();
|
bool isBuiltinFunctionConstructor();
|
||||||
|
|
||||||
@ -402,15 +397,6 @@ class JSFunction : public js::NativeObject
|
|||||||
return isInterpreted() ? nullptr : native();
|
return isInterpreted() ? nullptr : native();
|
||||||
}
|
}
|
||||||
|
|
||||||
JSParallelNative parallelNative() const {
|
|
||||||
MOZ_ASSERT(hasParallelNative());
|
|
||||||
return jitInfo()->parallelNative;
|
|
||||||
}
|
|
||||||
|
|
||||||
JSParallelNative maybeParallelNative() const {
|
|
||||||
return hasParallelNative() ? parallelNative() : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void initNative(js::Native native, const JSJitInfo *jitinfo) {
|
void initNative(js::Native native, const JSJitInfo *jitinfo) {
|
||||||
MOZ_ASSERT(native);
|
MOZ_ASSERT(native);
|
||||||
u.n.native = native;
|
u.n.native = native;
|
||||||
|
@ -181,27 +181,6 @@ ExecutionModeString(ExecutionMode mode)
|
|||||||
*/
|
*/
|
||||||
static const unsigned NumExecutionModes = ParallelExecution + 1;
|
static const unsigned NumExecutionModes = ParallelExecution + 1;
|
||||||
|
|
||||||
template <ExecutionMode mode>
|
|
||||||
struct ExecutionModeTraits
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <> struct ExecutionModeTraits<SequentialExecution>
|
|
||||||
{
|
|
||||||
typedef JSContext * ContextType;
|
|
||||||
typedef ExclusiveContext * ExclusiveContextType;
|
|
||||||
|
|
||||||
static inline JSContext *toContextType(ExclusiveContext *cx);
|
|
||||||
};
|
|
||||||
|
|
||||||
template <> struct ExecutionModeTraits<ParallelExecution>
|
|
||||||
{
|
|
||||||
typedef ForkJoinContext * ContextType;
|
|
||||||
typedef ForkJoinContext * ExclusiveContextType;
|
|
||||||
|
|
||||||
static inline ForkJoinContext *toContextType(ForkJoinContext *cx) { return cx; }
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace jit {
|
namespace jit {
|
||||||
struct IonScript;
|
struct IonScript;
|
||||||
class JitAllocPolicy;
|
class JitAllocPolicy;
|
||||||
|
@ -2123,9 +2123,6 @@ intrinsic_SetForkJoinTargetRegionPar(ForkJoinContext *cx, unsigned argc, Value *
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_JITINFO_NATIVE_PARALLEL(js::intrinsic_SetForkJoinTargetRegionInfo,
|
|
||||||
intrinsic_SetForkJoinTargetRegionPar);
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
js::intrinsic_ClearThreadLocalArenas(JSContext *cx, unsigned argc, Value *vp)
|
js::intrinsic_ClearThreadLocalArenas(JSContext *cx, unsigned argc, Value *vp)
|
||||||
{
|
{
|
||||||
@ -2138,6 +2135,3 @@ intrinsic_ClearThreadLocalArenasPar(ForkJoinContext *cx, unsigned argc, Value *v
|
|||||||
//cx->allocator()->arenas.wipeDuringParallelExecution(cx->runtime());
|
//cx->allocator()->arenas.wipeDuringParallelExecution(cx->runtime());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_JITINFO_NATIVE_PARALLEL(js::intrinsic_ClearThreadLocalArenasInfo,
|
|
||||||
intrinsic_ClearThreadLocalArenasPar);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user