author | Jan de Mooij <jdemooij@mozilla.com> |
Thu, 28 Feb 2019 09:37:36 +0000 | |
changeset 461716 | d629f7abeca07b44babffed909a38120fe24aceb |
parent 461715 | 00fe264dc8b603832cc16368b24a63f941bdaadf |
child 461717 | 756272e36e32264332e6b95aa804b69581295c7e |
push id | 35627 |
push user | opoprus@mozilla.com |
push date | Thu, 28 Feb 2019 21:44:07 +0000 |
treeherder | mozilla-central@db533ea3d561 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nbp |
bugs | 1530937 |
milestone | 67.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/jit/VMFunctions.h +++ b/js/src/jit/VMFunctions.h @@ -776,23 +776,16 @@ template <> struct OutParamToRootType<MutableHandleObject> { static const VMFunction::RootType result = VMFunction::RootObject; }; template <> struct OutParamToRootType<MutableHandleString> { static const VMFunction::RootType result = VMFunction::RootString; }; -template <class> -struct MatchContext {}; -template <> -struct MatchContext<JSContext*> { - static const bool valid = true; -}; - // Extract the last element of a list of types. template <typename... ArgTypes> struct LastArg; template <> struct LastArg<> { typedef void Type; static constexpr size_t nbArgs = 0; @@ -839,19 +832,19 @@ struct BitMask<Each, ResultType, Shift, }; // Extract VMFunction properties based on the signature of the function. The // properties are used to generate the logic for calling the VM function, and // also for marking the stack during GCs. template <typename... Args> struct FunctionInfo; -template <class R, class Context, typename... Args> -struct FunctionInfo<R (*)(Context, Args...)> : public VMFunction { - typedef R (*pf)(Context, Args...); +template <class R, typename... Args> +struct FunctionInfo<R (*)(JSContext*, Args...)> : public VMFunction { + using pf = R (*)(JSContext*, Args...); static DataType returnType() { return TypeToDataType<R>::result; } static DataType outParam() { return OutParamToDataType<typename LastArg<Args...>::Type>::result; } static RootType outParamRootType() { return OutParamToRootType<typename LastArg<Args...>::Type>::result; } @@ -869,27 +862,23 @@ struct FunctionInfo<R (*)(Context, Args. return BitMask<TypeToRootType, uint64_t, 3, Args...>::result; } explicit FunctionInfo(pf fun, const char* name, PopValues extraValuesToPop = PopValues(0)) : VMFunction(JS_FUNC_TO_DATA_PTR(void*, fun), name, explicitArgs(), argumentProperties(), argumentPassedInFloatRegs(), argumentRootTypes(), outParam(), outParamRootType(), returnType(), extraValuesToPop.numValues, NonTailCall) { - static_assert(MatchContext<Context>::valid, - "Invalid cx type in VMFunction"); } explicit FunctionInfo(pf fun, const char* name, MaybeTailCall expectTailCall, PopValues extraValuesToPop = PopValues(0)) : VMFunction(JS_FUNC_TO_DATA_PTR(void*, fun), name, explicitArgs(), argumentProperties(), argumentPassedInFloatRegs(), argumentRootTypes(), outParam(), outParamRootType(), returnType(), extraValuesToPop.numValues, expectTailCall) { - static_assert(MatchContext<Context>::valid, - "Invalid cx type in VMFunction"); } }; class AutoDetectInvalidation { JSContext* cx_; IonScript* ionScript_; MutableHandleValue rval_; bool disabled_;