зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1661256 part 28 - Convert NativeObject's callWithABI calls. r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D91808
This commit is contained in:
Родитель
72b3b6890e
Коммит
4f80f732cd
|
@ -40,6 +40,7 @@
|
|||
#include "proxy/Proxy.h" // js::ProxyGetProperty
|
||||
|
||||
#include "vm/ArgumentsObject.h" // js::ArgumentsObject::finishForIonPure
|
||||
#include "vm/NativeObject.h" // js::NativeObject
|
||||
#include "vm/RegExpShared.h" // js::ExecuteRegExpAtomRaw
|
||||
#include "vm/TraceLogging.h" // js::TraceLogStartEventPrivate,
|
||||
// js::TraceLogStartEvent,
|
||||
|
@ -118,6 +119,8 @@ namespace jit {
|
|||
_(js::jit::SetNativeDataPropertyPure<false>) \
|
||||
_(js::jit::SetNativeDataPropertyPure<true>) \
|
||||
_(js::MapIteratorObject::next) \
|
||||
_(js::NativeObject::addDenseElementPure) \
|
||||
_(js::NativeObject::growSlotsPure) \
|
||||
_(js::NumberMod) \
|
||||
_(js::NumberToStringHelperPure) \
|
||||
_(js::powi) \
|
||||
|
|
|
@ -1008,13 +1008,14 @@ bool BaselineCacheIRCompiler::emitAddAndStoreSlotShared(
|
|||
liveVolatileFloatRegs());
|
||||
masm.PushRegsInMask(save);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, NativeObject * obj, uint32_t newCount);
|
||||
masm.setupUnalignedABICall(scratch1);
|
||||
masm.loadJSContext(scratch1);
|
||||
masm.passABIArg(scratch1);
|
||||
masm.passABIArg(obj);
|
||||
masm.load32(numNewSlotsAddr, scratch2);
|
||||
masm.passABIArg(scratch2);
|
||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, NativeObject::growSlotsPure));
|
||||
masm.callWithABI<Fn, NativeObject::growSlotsPure>();
|
||||
masm.mov(ReturnReg, scratch1);
|
||||
|
||||
LiveRegisterSet ignore;
|
||||
|
@ -1307,12 +1308,12 @@ bool BaselineCacheIRCompiler::emitStoreDenseElementHole(ObjOperandId objId,
|
|||
save.takeUnchecked(scratch);
|
||||
masm.PushRegsInMask(save);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, NativeObject * obj);
|
||||
masm.setupUnalignedABICall(scratch);
|
||||
masm.loadJSContext(scratch);
|
||||
masm.passABIArg(scratch);
|
||||
masm.passABIArg(obj);
|
||||
masm.callWithABI(
|
||||
JS_FUNC_TO_DATA_PTR(void*, NativeObject::addDenseElementPure));
|
||||
masm.callWithABI<Fn, NativeObject::addDenseElementPure>();
|
||||
masm.mov(ReturnReg, scratch);
|
||||
|
||||
masm.PopRegsInMask(save);
|
||||
|
@ -1444,12 +1445,12 @@ bool BaselineCacheIRCompiler::emitArrayPush(ObjOperandId objId,
|
|||
save.takeUnchecked(scratch);
|
||||
masm.PushRegsInMask(save);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, NativeObject * obj);
|
||||
masm.setupUnalignedABICall(scratch);
|
||||
masm.loadJSContext(scratch);
|
||||
masm.passABIArg(scratch);
|
||||
masm.passABIArg(obj);
|
||||
masm.callWithABI(
|
||||
JS_FUNC_TO_DATA_PTR(void*, NativeObject::addDenseElementPure));
|
||||
masm.callWithABI<Fn, NativeObject::addDenseElementPure>();
|
||||
masm.mov(ReturnReg, scratch);
|
||||
|
||||
masm.PopRegsInMask(save);
|
||||
|
|
|
@ -12101,13 +12101,14 @@ void CodeGenerator::visitAllocateAndStoreSlot(LAllocateAndStoreSlot* ins) {
|
|||
masm.push(obj);
|
||||
masm.pushValue(value);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, NativeObject * obj, uint32_t newCount);
|
||||
masm.setupUnalignedABICall(temp1);
|
||||
masm.loadJSContext(temp1);
|
||||
masm.passABIArg(temp1);
|
||||
masm.passABIArg(obj);
|
||||
masm.move32(Imm32(ins->mir()->numNewSlots()), temp2);
|
||||
masm.passABIArg(temp2);
|
||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, NativeObject::growSlotsPure));
|
||||
masm.callWithABI<Fn, NativeObject::growSlotsPure>();
|
||||
masm.storeCallBoolResult(temp1);
|
||||
|
||||
masm.popValue(value);
|
||||
|
|
|
@ -1532,13 +1532,14 @@ bool IonCacheIRCompiler::emitAddAndStoreSlotShared(
|
|||
liveVolatileFloatRegs());
|
||||
masm.PushRegsInMask(save);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, NativeObject * obj, uint32_t newCount);
|
||||
masm.setupUnalignedABICall(scratch1);
|
||||
masm.loadJSContext(scratch1);
|
||||
masm.passABIArg(scratch1);
|
||||
masm.passABIArg(obj);
|
||||
masm.move32(Imm32(numNewSlots), scratch2.ref());
|
||||
masm.passABIArg(scratch2.ref());
|
||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, NativeObject::growSlotsPure));
|
||||
masm.callWithABI<Fn, NativeObject::growSlotsPure>();
|
||||
masm.mov(ReturnReg, scratch1);
|
||||
|
||||
LiveRegisterSet ignore;
|
||||
|
@ -1860,12 +1861,12 @@ bool IonCacheIRCompiler::emitStoreDenseElementHole(ObjOperandId objId,
|
|||
save.takeUnchecked(scratch1);
|
||||
masm.PushRegsInMask(save);
|
||||
|
||||
using Fn = bool (*)(JSContext * cx, NativeObject * obj);
|
||||
masm.setupUnalignedABICall(scratch1);
|
||||
masm.loadJSContext(scratch1);
|
||||
masm.passABIArg(scratch1);
|
||||
masm.passABIArg(obj);
|
||||
masm.callWithABI(
|
||||
JS_FUNC_TO_DATA_PTR(void*, NativeObject::addDenseElementPure));
|
||||
masm.callWithABI<Fn, NativeObject::addDenseElementPure>();
|
||||
masm.mov(ReturnReg, scratch1);
|
||||
|
||||
masm.PopRegsInMask(save);
|
||||
|
|
Загрузка…
Ссылка в новой задаче