зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1661256 part 8 - Convert js::RegExp*OptimizableRaw callWithABI calls. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D91788
This commit is contained in:
Родитель
693c96e00a
Коммит
18d09de854
|
@ -10,6 +10,9 @@
|
|||
#include "jslibmath.h" // js::NumberMod
|
||||
#include "jsmath.h" // js::ecmaPow, js::ecmaHypot, js::hypot3, js::hypot4,
|
||||
// js::ecmaAtan2, js::powi
|
||||
#include "builtin/RegExp.h" // js::RegExpPrototypeOptimizableRaw,
|
||||
// js::RegExpInstanceOptimizableRaw
|
||||
|
||||
#include "irregexp/RegExpAPI.h"
|
||||
// js::irregexp::CaseInsensitiveCompareNonUnicode,
|
||||
// js::irregexp::CaseInsensitiveCompareUnicode,
|
||||
|
@ -50,6 +53,8 @@ namespace jit {
|
|||
_(js::irregexp::GrowBacktrackStack) \
|
||||
_(js::NumberMod) \
|
||||
_(js::powi) \
|
||||
_(js::RegExpInstanceOptimizableRaw) \
|
||||
_(js::RegExpPrototypeOptimizableRaw) \
|
||||
|
||||
// List of all ABI functions to be used with callWithABI, which are
|
||||
// overloaded. Each entry stores the fully qualified name of the C++ function,
|
||||
|
|
|
@ -7698,11 +7698,12 @@ bool CacheIRCompiler::emitRegExpPrototypeOptimizableResult(
|
|||
volatileRegs.takeUnchecked(scratch);
|
||||
masm.PushRegsInMask(volatileRegs);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, JSObject * proto);
|
||||
masm.setupUnalignedABICall(scratch);
|
||||
masm.loadJSContext(scratch);
|
||||
masm.passABIArg(scratch);
|
||||
masm.passABIArg(proto);
|
||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, RegExpPrototypeOptimizableRaw));
|
||||
masm.callWithABI<Fn, RegExpPrototypeOptimizableRaw>();
|
||||
masm.storeCallBoolResult(scratch);
|
||||
|
||||
masm.PopRegsInMask(volatileRegs);
|
||||
|
@ -7735,12 +7736,13 @@ bool CacheIRCompiler::emitRegExpInstanceOptimizableResult(
|
|||
volatileRegs.takeUnchecked(scratch);
|
||||
masm.PushRegsInMask(volatileRegs);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, JSObject * obj, JSObject * proto);
|
||||
masm.setupUnalignedABICall(scratch);
|
||||
masm.loadJSContext(scratch);
|
||||
masm.passABIArg(scratch);
|
||||
masm.passABIArg(regexp);
|
||||
masm.passABIArg(proto);
|
||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, RegExpInstanceOptimizableRaw));
|
||||
masm.callWithABI<Fn, RegExpInstanceOptimizableRaw>();
|
||||
masm.storeCallBoolResult(scratch);
|
||||
|
||||
masm.PopRegsInMask(volatileRegs);
|
||||
|
|
|
@ -3390,11 +3390,12 @@ void CodeGenerator::visitOutOfLineRegExpPrototypeOptimizable(
|
|||
|
||||
saveVolatile(output);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, JSObject * proto);
|
||||
masm.setupUnalignedABICall(output);
|
||||
masm.loadJSContext(output);
|
||||
masm.passABIArg(output);
|
||||
masm.passABIArg(object);
|
||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, RegExpPrototypeOptimizableRaw));
|
||||
masm.callWithABI<Fn, RegExpPrototypeOptimizableRaw>();
|
||||
masm.storeCallBoolResult(output);
|
||||
|
||||
restoreVolatile(output);
|
||||
|
@ -3441,12 +3442,13 @@ void CodeGenerator::visitOutOfLineRegExpInstanceOptimizable(
|
|||
|
||||
saveVolatile(output);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, JSObject * obj, JSObject * proto);
|
||||
masm.setupUnalignedABICall(output);
|
||||
masm.loadJSContext(output);
|
||||
masm.passABIArg(output);
|
||||
masm.passABIArg(object);
|
||||
masm.passABIArg(proto);
|
||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, RegExpInstanceOptimizableRaw));
|
||||
masm.callWithABI<Fn, RegExpInstanceOptimizableRaw>();
|
||||
masm.storeCallBoolResult(output);
|
||||
|
||||
restoreVolatile(output);
|
||||
|
|
Загрузка…
Ссылка в новой задаче