blob: e17e447ebf51194d4c3bffca9c47e9f927cd9ba6 [file] [log] [blame]
/*
* Copyright (C) 2011-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#if ENABLE(DFG_JIT)
#include "DFGAbstractInterpreter.h"
#include "DFGGenerationInfo.h"
#include "DFGInPlaceAbstractState.h"
#include "DFGJITCompiler.h"
#include "DFGOSRExit.h"
#include "DFGOSRExitJumpPlaceholder.h"
#include "DFGSilentRegisterSavePlan.h"
#include "DFGValueSource.h"
#include "JITMathIC.h"
#include "JITOperations.h"
#include "MarkedAllocator.h"
#include "PutKind.h"
#include "SpillRegistersMode.h"
#include "StructureStubInfo.h"
#include "ValueRecovery.h"
#include "VirtualRegister.h"
namespace JSC { namespace DFG {
class GPRTemporary;
class JSValueOperand;
class SlowPathGenerator;
class SpeculativeJIT;
class SpeculateInt32Operand;
class SpeculateStrictInt32Operand;
class SpeculateDoubleOperand;
class SpeculateCellOperand;
class SpeculateBooleanOperand;
enum GeneratedOperandType { GeneratedOperandTypeUnknown, GeneratedOperandInteger, GeneratedOperandJSValue};
// === SpeculativeJIT ===
//
// The SpeculativeJIT is used to generate a fast, but potentially
// incomplete code path for the dataflow. When code generating
// we may make assumptions about operand types, dynamically check,
// and bail-out to an alternate code path if these checks fail.
// Importantly, the speculative code path cannot be reentered once
// a speculative check has failed. This allows the SpeculativeJIT
// to propagate type information (including information that has
// only speculatively been asserted) through the dataflow.
class SpeculativeJIT {
WTF_MAKE_FAST_ALLOCATED;
friend struct OSRExit;
private:
typedef JITCompiler::TrustedImm32 TrustedImm32;
typedef JITCompiler::Imm32 Imm32;
typedef JITCompiler::ImmPtr ImmPtr;
typedef JITCompiler::TrustedImm64 TrustedImm64;
typedef JITCompiler::Imm64 Imm64;
// These constants are used to set priorities for spill order for
// the register allocator.
#if USE(JSVALUE64)
enum SpillOrder {
SpillOrderConstant = 1, // no spill, and cheap fill
SpillOrderSpilled = 2, // no spill
SpillOrderJS = 4, // needs spill
SpillOrderCell = 4, // needs spill
SpillOrderStorage = 4, // needs spill
SpillOrderInteger = 5, // needs spill and box
SpillOrderBoolean = 5, // needs spill and box
SpillOrderDouble = 6, // needs spill and convert
};
#elif USE(JSVALUE32_64)
enum SpillOrder {
SpillOrderConstant = 1, // no spill, and cheap fill
SpillOrderSpilled = 2, // no spill
SpillOrderJS = 4, // needs spill
SpillOrderStorage = 4, // needs spill
SpillOrderDouble = 4, // needs spill
SpillOrderInteger = 5, // needs spill and box
SpillOrderCell = 5, // needs spill and box
SpillOrderBoolean = 5, // needs spill and box
};
#endif
enum UseChildrenMode { CallUseChildren, UseChildrenCalledExplicitly };
public:
SpeculativeJIT(JITCompiler&);
~SpeculativeJIT();
struct TrustedImmPtr {
template <typename T>
explicit TrustedImmPtr(T* value)
: m_value(value)
{
static_assert(!std::is_base_of<HeapCell, T>::value, "To use a GC pointer, the graph must be aware of it. Use SpeculativeJIT::TrustedImmPtr::weakPointer instead.");
}
explicit TrustedImmPtr(RegisteredStructure structure)
: m_value(structure.get())
{ }
// This is only here so that TrustedImmPtr(0) does not confuse the C++
// overload handling rules.
explicit TrustedImmPtr(int value)
: m_value(value)
{
ASSERT(!value);
}
explicit TrustedImmPtr(std::nullptr_t)
: m_value(0)
{ }
explicit TrustedImmPtr(FrozenValue* value)
{
RELEASE_ASSERT(value->value().isCell());
m_value = MacroAssembler::TrustedImmPtr(value->cell());
}
explicit TrustedImmPtr(size_t value)
: m_value(bitwise_cast<void*>(value))
{
}
static TrustedImmPtr weakPointer(Graph& graph, JSCell* cell)
{
// There are weird relationships in how optimized CodeBlocks
// point to other CodeBlocks. We don't want to have them be
// part of the weak pointer set. For example, an optimized CodeBlock
// having a weak pointer to itself will cause it to get collected.
ASSERT(!jsDynamicCast<CodeBlock*>(graph.m_vm, cell));
graph.m_plan.weakReferences.addLazily(cell);
return TrustedImmPtr(bitwise_cast<size_t>(cell));
}
operator MacroAssembler::TrustedImmPtr() const { return m_value; }
intptr_t asIntptr()
{
return m_value.asIntptr();
}
private:
MacroAssembler::TrustedImmPtr m_value;
};
bool compile();
void createOSREntries();
void linkOSREntries(LinkBuffer&);
BasicBlock* nextBlock()
{
for (BlockIndex resultIndex = m_block->index + 1; ; resultIndex++) {
if (resultIndex >= m_jit.graph().numBlocks())
return 0;
if (BasicBlock* result = m_jit.graph().block(resultIndex))
return result;
}
}
#if USE(JSVALUE64)
GPRReg fillJSValue(Edge);
#elif USE(JSVALUE32_64)
bool fillJSValue(Edge, GPRReg&, GPRReg&, FPRReg&);
#endif
GPRReg fillStorage(Edge);
// lock and unlock GPR & FPR registers.
void lock(GPRReg reg)
{
m_gprs.lock(reg);
}
void lock(FPRReg reg)
{
m_fprs.lock(reg);
}
void unlock(GPRReg reg)
{
m_gprs.unlock(reg);
}
void unlock(FPRReg reg)
{
m_fprs.unlock(reg);
}
// Used to check whether a child node is on its last use,
// and its machine registers may be reused.
bool canReuse(Node* node)
{
return generationInfo(node).useCount() == 1;
}
bool canReuse(Node* nodeA, Node* nodeB)
{
return nodeA == nodeB && generationInfo(nodeA).useCount() == 2;
}
bool canReuse(Edge nodeUse)
{
return canReuse(nodeUse.node());
}
GPRReg reuse(GPRReg reg)
{
m_gprs.lock(reg);
return reg;
}
FPRReg reuse(FPRReg reg)
{
m_fprs.lock(reg);
return reg;
}
// Allocate a gpr/fpr.
GPRReg allocate()
{
#if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION)
m_jit.addRegisterAllocationAtOffset(m_jit.debugOffset());
#endif
VirtualRegister spillMe;
GPRReg gpr = m_gprs.allocate(spillMe);
if (spillMe.isValid()) {
#if USE(JSVALUE32_64)
GenerationInfo& info = generationInfoFromVirtualRegister(spillMe);
if ((info.registerFormat() & DataFormatJS))
m_gprs.release(info.tagGPR() == gpr ? info.payloadGPR() : info.tagGPR());
#endif
spill(spillMe);
}
return gpr;
}
GPRReg allocate(GPRReg specific)
{
#if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION)
m_jit.addRegisterAllocationAtOffset(m_jit.debugOffset());
#endif
VirtualRegister spillMe = m_gprs.allocateSpecific(specific);
if (spillMe.isValid()) {
#if USE(JSVALUE32_64)
GenerationInfo& info = generationInfoFromVirtualRegister(spillMe);
RELEASE_ASSERT(info.registerFormat() != DataFormatJSDouble);
if ((info.registerFormat() & DataFormatJS))
m_gprs.release(info.tagGPR() == specific ? info.payloadGPR() : info.tagGPR());
#endif
spill(spillMe);
}
return specific;
}
GPRReg tryAllocate()
{
return m_gprs.tryAllocate();
}
FPRReg fprAllocate()
{
#if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION)
m_jit.addRegisterAllocationAtOffset(m_jit.debugOffset());
#endif
VirtualRegister spillMe;
FPRReg fpr = m_fprs.allocate(spillMe);
if (spillMe.isValid())
spill(spillMe);
return fpr;
}
// Check whether a VirtualRegsiter is currently in a machine register.
// We use this when filling operands to fill those that are already in
// machine registers first (by locking VirtualRegsiters that are already
// in machine register before filling those that are not we attempt to
// avoid spilling values we will need immediately).
bool isFilled(Node* node)
{
return generationInfo(node).registerFormat() != DataFormatNone;
}
bool isFilledDouble(Node* node)
{
return generationInfo(node).registerFormat() == DataFormatDouble;
}
// Called on an operand once it has been consumed by a parent node.
void use(Node* node)
{
if (!node->hasResult())
return;
GenerationInfo& info = generationInfo(node);
// use() returns true when the value becomes dead, and any
// associated resources may be freed.
if (!info.use(*m_stream))
return;
// Release the associated machine registers.
DataFormat registerFormat = info.registerFormat();
#if USE(JSVALUE64)
if (registerFormat == DataFormatDouble)
m_fprs.release(info.fpr());
else if (registerFormat != DataFormatNone)
m_gprs.release(info.gpr());
#elif USE(JSVALUE32_64)
if (registerFormat == DataFormatDouble)
m_fprs.release(info.fpr());
else if (registerFormat & DataFormatJS) {
m_gprs.release(info.tagGPR());
m_gprs.release(info.payloadGPR());
} else if (registerFormat != DataFormatNone)
m_gprs.release(info.gpr());
#endif
}
void use(Edge nodeUse)
{
use(nodeUse.node());
}
RegisterSet usedRegisters();
bool masqueradesAsUndefinedWatchpointIsStillValid(const CodeOrigin& codeOrigin)
{
return m_jit.graph().masqueradesAsUndefinedWatchpointIsStillValid(codeOrigin);
}
bool masqueradesAsUndefinedWatchpointIsStillValid()
{
return masqueradesAsUndefinedWatchpointIsStillValid(m_currentNode->origin.semantic);
}
void compileStoreBarrier(Node*);
static GPRReg selectScratchGPR(GPRReg preserve1 = InvalidGPRReg, GPRReg preserve2 = InvalidGPRReg, GPRReg preserve3 = InvalidGPRReg, GPRReg preserve4 = InvalidGPRReg)
{
return AssemblyHelpers::selectScratchGPR(preserve1, preserve2, preserve3, preserve4);
}
// Called by the speculative operand types, below, to fill operand to
// machine registers, implicitly generating speculation checks as needed.
GPRReg fillSpeculateInt32(Edge, DataFormat& returnFormat);
GPRReg fillSpeculateInt32Strict(Edge);
GPRReg fillSpeculateInt52(Edge, DataFormat desiredFormat);
FPRReg fillSpeculateDouble(Edge);
GPRReg fillSpeculateCell(Edge);
GPRReg fillSpeculateBoolean(Edge);
GeneratedOperandType checkGeneratedTypeForToInt32(Node*);
void addSlowPathGenerator(std::unique_ptr<SlowPathGenerator>);
void addSlowPathGenerator(std::function<void()>);
void runSlowPathGenerators(PCToCodeOriginMapBuilder&);
void compile(Node*);
void noticeOSRBirth(Node*);
void bail(AbortReason);
void compileCurrentBlock();
void checkArgumentTypes();
void clearGenerationInfo();
// These methods are used when generating 'unexpected'
// calls out from JIT code to C++ helper routines -
// they spill all live values to the appropriate
// slots in the JSStack without changing any state
// in the GenerationInfo.
SilentRegisterSavePlan silentSavePlanForGPR(VirtualRegister spillMe, GPRReg source);
SilentRegisterSavePlan silentSavePlanForFPR(VirtualRegister spillMe, FPRReg source);
void silentSpill(const SilentRegisterSavePlan&);
void silentFill(const SilentRegisterSavePlan&, GPRReg canTrample);
template<typename CollectionType>
void silentSpill(const CollectionType& savePlans)
{
for (unsigned i = 0; i < savePlans.size(); ++i)
silentSpill(savePlans[i]);
}
template<typename CollectionType>
void silentFill(const CollectionType& savePlans, GPRReg exclude = InvalidGPRReg)
{
GPRReg canTrample = SpeculativeJIT::pickCanTrample(exclude);
for (unsigned i = savePlans.size(); i--;)
silentFill(savePlans[i], canTrample);
}
template<typename CollectionType>
void silentSpillAllRegistersImpl(bool doSpill, CollectionType& plans, GPRReg exclude, GPRReg exclude2 = InvalidGPRReg, FPRReg fprExclude = InvalidFPRReg)
{
ASSERT(plans.isEmpty());
for (gpr_iterator iter = m_gprs.begin(); iter != m_gprs.end(); ++iter) {
GPRReg gpr = iter.regID();
if (iter.name().isValid() && gpr != exclude && gpr != exclude2) {
SilentRegisterSavePlan plan = silentSavePlanForGPR(iter.name(), gpr);
if (doSpill)
silentSpill(plan);
plans.append(plan);
}
}
for (fpr_iterator iter = m_fprs.begin(); iter != m_fprs.end(); ++iter) {
if (iter.name().isValid() && iter.regID() != fprExclude) {
SilentRegisterSavePlan plan = silentSavePlanForFPR(iter.name(), iter.regID());
if (doSpill)
silentSpill(plan);
plans.append(plan);
}
}
}
template<typename CollectionType>
void silentSpillAllRegistersImpl(bool doSpill, CollectionType& plans, NoResultTag)
{
silentSpillAllRegistersImpl(doSpill, plans, InvalidGPRReg, InvalidGPRReg, InvalidFPRReg);
}
template<typename CollectionType>
void silentSpillAllRegistersImpl(bool doSpill, CollectionType& plans, FPRReg exclude)
{
silentSpillAllRegistersImpl(doSpill, plans, InvalidGPRReg, InvalidGPRReg, exclude);
}
template<typename CollectionType>
void silentSpillAllRegistersImpl(bool doSpill, CollectionType& plans, JSValueRegs exclude)
{
#if USE(JSVALUE32_64)
silentSpillAllRegistersImpl(doSpill, plans, exclude.tagGPR(), exclude.payloadGPR());
#else
silentSpillAllRegistersImpl(doSpill, plans, exclude.gpr());
#endif
}
void silentSpillAllRegisters(GPRReg exclude, GPRReg exclude2 = InvalidGPRReg, FPRReg fprExclude = InvalidFPRReg)
{
silentSpillAllRegistersImpl(true, m_plans, exclude, exclude2, fprExclude);
}
void silentSpillAllRegisters(FPRReg exclude)
{
silentSpillAllRegisters(InvalidGPRReg, InvalidGPRReg, exclude);
}
void silentSpillAllRegisters(JSValueRegs exclude)
{
#if USE(JSVALUE64)
silentSpillAllRegisters(exclude.payloadGPR());
#else
silentSpillAllRegisters(exclude.payloadGPR(), exclude.tagGPR());
#endif
}
static GPRReg pickCanTrample(GPRReg exclude)
{
GPRReg result = GPRInfo::regT0;
if (result == exclude)
result = GPRInfo::regT1;
return result;
}
static GPRReg pickCanTrample(FPRReg)
{
return GPRInfo::regT0;
}
static GPRReg pickCanTrample(NoResultTag)
{
return GPRInfo::regT0;
}
#if USE(JSVALUE64)
static GPRReg pickCanTrample(JSValueRegs exclude)
{
return pickCanTrample(exclude.payloadGPR());
}
#else
static GPRReg pickCanTrample(JSValueRegs exclude)
{
GPRReg result = GPRInfo::regT0;
if (result == exclude.tagGPR()) {
result = GPRInfo::regT1;
if (result == exclude.payloadGPR())
result = GPRInfo::regT2;
} else if (result == exclude.payloadGPR()) {
result = GPRInfo::regT1;
if (result == exclude.tagGPR())
result = GPRInfo::regT2;
}
return result;
}
#endif
template<typename RegisterType>
void silentFillAllRegisters(RegisterType exclude)
{
GPRReg canTrample = pickCanTrample(exclude);
while (!m_plans.isEmpty()) {
SilentRegisterSavePlan& plan = m_plans.last();
silentFill(plan, canTrample);
m_plans.removeLast();
}
}
// These methods convert between doubles, and doubles boxed and JSValues.
#if USE(JSVALUE64)
GPRReg boxDouble(FPRReg fpr, GPRReg gpr)
{
return m_jit.boxDouble(fpr, gpr);
}
FPRReg unboxDouble(GPRReg gpr, GPRReg resultGPR, FPRReg fpr)
{
return m_jit.unboxDouble(gpr, resultGPR, fpr);
}
GPRReg boxDouble(FPRReg fpr)
{
return boxDouble(fpr, allocate());
}
void boxInt52(GPRReg sourceGPR, GPRReg targetGPR, DataFormat);
#elif USE(JSVALUE32_64)
void boxDouble(FPRReg fpr, GPRReg tagGPR, GPRReg payloadGPR)
{
m_jit.boxDouble(fpr, tagGPR, payloadGPR);
}
void unboxDouble(GPRReg tagGPR, GPRReg payloadGPR, FPRReg fpr, FPRReg scratchFPR)
{
m_jit.unboxDouble(tagGPR, payloadGPR, fpr, scratchFPR);
}
#endif
void boxDouble(FPRReg fpr, JSValueRegs regs)
{
m_jit.boxDouble(fpr, regs);
}
// Spill a VirtualRegister to the JSStack.
void spill(VirtualRegister spillMe)
{
GenerationInfo& info = generationInfoFromVirtualRegister(spillMe);
#if USE(JSVALUE32_64)
if (info.registerFormat() == DataFormatNone) // it has been spilled. JS values which have two GPRs can reach here
return;
#endif
// Check the GenerationInfo to see if this value need writing
// to the JSStack - if not, mark it as spilled & return.
if (!info.needsSpill()) {
info.setSpilled(*m_stream, spillMe);
return;
}
DataFormat spillFormat = info.registerFormat();
switch (spillFormat) {
case DataFormatStorage: {
// This is special, since it's not a JS value - as in it's not visible to JS
// code.
m_jit.storePtr(info.gpr(), JITCompiler::addressFor(spillMe));
info.spill(*m_stream, spillMe, DataFormatStorage);
return;
}
case DataFormatInt32: {
m_jit.store32(info.gpr(), JITCompiler::payloadFor(spillMe));
info.spill(*m_stream, spillMe, DataFormatInt32);
return;
}
#if USE(JSVALUE64)
case DataFormatDouble: {
m_jit.storeDouble(info.fpr(), JITCompiler::addressFor(spillMe));
info.spill(*m_stream, spillMe, DataFormatDouble);
return;
}
case DataFormatInt52:
case DataFormatStrictInt52: {
m_jit.store64(info.gpr(), JITCompiler::addressFor(spillMe));
info.spill(*m_stream, spillMe, spillFormat);
return;
}
default:
// The following code handles JSValues, int32s, and cells.
RELEASE_ASSERT(spillFormat == DataFormatCell || spillFormat & DataFormatJS);
GPRReg reg = info.gpr();
// We need to box int32 and cell values ...
// but on JSVALUE64 boxing a cell is a no-op!
if (spillFormat == DataFormatInt32)
m_jit.or64(GPRInfo::tagTypeNumberRegister, reg);
// Spill the value, and record it as spilled in its boxed form.
m_jit.store64(reg, JITCompiler::addressFor(spillMe));
info.spill(*m_stream, spillMe, (DataFormat)(spillFormat | DataFormatJS));
return;
#elif USE(JSVALUE32_64)
case DataFormatCell:
case DataFormatBoolean: {
m_jit.store32(info.gpr(), JITCompiler::payloadFor(spillMe));
info.spill(*m_stream, spillMe, spillFormat);
return;
}
case DataFormatDouble: {
// On JSVALUE32_64 boxing a double is a no-op.
m_jit.storeDouble(info.fpr(), JITCompiler::addressFor(spillMe));
info.spill(*m_stream, spillMe, DataFormatDouble);
return;
}
default:
// The following code handles JSValues.
RELEASE_ASSERT(spillFormat & DataFormatJS);
m_jit.store32(info.tagGPR(), JITCompiler::tagFor(spillMe));
m_jit.store32(info.payloadGPR(), JITCompiler::payloadFor(spillMe));
info.spill(*m_stream, spillMe, spillFormat);
return;
#endif
}
}
bool isKnownInteger(Node* node) { return m_state.forNode(node).isType(SpecInt32Only); }
bool isKnownCell(Node* node) { return m_state.forNode(node).isType(SpecCell); }
bool isKnownNotInteger(Node* node) { return !(m_state.forNode(node).m_type & SpecInt32Only); }
bool isKnownNotNumber(Node* node) { return !(m_state.forNode(node).m_type & SpecFullNumber); }
bool isKnownNotCell(Node* node) { return !(m_state.forNode(node).m_type & SpecCell); }
bool isKnownNotOther(Node* node) { return !(m_state.forNode(node).m_type & SpecOther); }
UniquedStringImpl* identifierUID(unsigned index)
{
return m_jit.graph().identifiers()[index];
}
// Spill all VirtualRegisters back to the JSStack.
void flushRegisters()
{
for (gpr_iterator iter = m_gprs.begin(); iter != m_gprs.end(); ++iter) {
if (iter.name().isValid()) {
spill(iter.name());
iter.release();
}
}
for (fpr_iterator iter = m_fprs.begin(); iter != m_fprs.end(); ++iter) {
if (iter.name().isValid()) {
spill(iter.name());
iter.release();
}
}
}
// Used to ASSERT flushRegisters() has been called prior to
// calling out from JIT code to a C helper function.
bool isFlushed()
{
for (gpr_iterator iter = m_gprs.begin(); iter != m_gprs.end(); ++iter) {
if (iter.name().isValid())
return false;
}
for (fpr_iterator iter = m_fprs.begin(); iter != m_fprs.end(); ++iter) {
if (iter.name().isValid())
return false;
}
return true;
}
#if USE(JSVALUE64)
static MacroAssembler::Imm64 valueOfJSConstantAsImm64(Node* node)
{
return MacroAssembler::Imm64(JSValue::encode(node->asJSValue()));
}
#endif
// Helper functions to enable code sharing in implementations of bit/shift ops.
void bitOp(NodeType op, int32_t imm, GPRReg op1, GPRReg result)
{
switch (op) {
case BitAnd:
m_jit.and32(Imm32(imm), op1, result);
break;
case BitOr:
m_jit.or32(Imm32(imm), op1, result);
break;
case BitXor:
m_jit.xor32(Imm32(imm), op1, result);
break;
default:
RELEASE_ASSERT_NOT_REACHED();
}
}
void bitOp(NodeType op, GPRReg op1, GPRReg op2, GPRReg result)
{
switch (op) {
case BitAnd:
m_jit.and32(op1, op2, result);
break;
case BitOr:
m_jit.or32(op1, op2, result);
break;
case BitXor:
m_jit.xor32(op1, op2, result);
break;
default:
RELEASE_ASSERT_NOT_REACHED();
}
}
void shiftOp(NodeType op, GPRReg op1, int32_t shiftAmount, GPRReg result)
{
switch (op) {
case BitRShift:
m_jit.rshift32(op1, Imm32(shiftAmount), result);
break;
case BitLShift:
m_jit.lshift32(op1, Imm32(shiftAmount), result);
break;
case BitURShift:
m_jit.urshift32(op1, Imm32(shiftAmount), result);
break;
default:
RELEASE_ASSERT_NOT_REACHED();
}
}
void shiftOp(NodeType op, GPRReg op1, GPRReg shiftAmount, GPRReg result)
{
switch (op) {
case BitRShift:
m_jit.rshift32(op1, shiftAmount, result);
break;
case BitLShift:
m_jit.lshift32(op1, shiftAmount, result);
break;
case BitURShift:
m_jit.urshift32(op1, shiftAmount, result);
break;
default:
RELEASE_ASSERT_NOT_REACHED();
}
}
// Returns the index of the branch node if peephole is okay, UINT_MAX otherwise.
unsigned detectPeepHoleBranch()
{
// Check that no intervening nodes will be generated.
for (unsigned index = m_indexInBlock + 1; index < m_block->size() - 1; ++index) {
Node* node = m_block->at(index);
if (!node->shouldGenerate())
continue;
// Check if it's a Phantom that can be safely ignored.
if (node->op() == Phantom && !node->child1())
continue;
return UINT_MAX;
}
// Check if the lastNode is a branch on this node.
Node* lastNode = m_block->terminal();
return lastNode->op() == Branch && lastNode->child1() == m_currentNode ? m_block->size() - 1 : UINT_MAX;
}
void compileCheckTraps(Node*);
void compileMovHint(Node*);
void compileMovHintAndCheck(Node*);
void cachedGetById(CodeOrigin, JSValueRegs base, JSValueRegs result, unsigned identifierNumber, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill, AccessType = AccessType::Get);
#if USE(JSVALUE64)
void cachedGetById(CodeOrigin, GPRReg baseGPR, GPRReg resultGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill, AccessType = AccessType::Get);
void cachedPutById(CodeOrigin, GPRReg base, GPRReg value, GPRReg scratchGPR, unsigned identifierNumber, PutKind, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill);
void cachedGetByIdWithThis(CodeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, unsigned identifierNumber, JITCompiler::JumpList slowPathTarget = JITCompiler::JumpList());
#elif USE(JSVALUE32_64)
void cachedGetById(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill, AccessType = AccessType::Get);
void cachedPutById(CodeOrigin, GPRReg basePayloadGPR, GPRReg valueTagGPR, GPRReg valuePayloadGPR, GPRReg scratchGPR, unsigned identifierNumber, PutKind, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill);
void cachedGetByIdWithThis(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg thisTagGPROrNone, GPRReg thisPayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, unsigned identifierNumber, JITCompiler::JumpList slowPathTarget = JITCompiler::JumpList());
#endif
void compileDeleteById(Node*);
void compileDeleteByVal(Node*);
void compileTryGetById(Node*);
void compileIn(Node*);
void nonSpeculativeNonPeepholeCompareNullOrUndefined(Edge operand);
void nonSpeculativePeepholeBranchNullOrUndefined(Edge operand, Node* branchNode);
void nonSpeculativePeepholeBranch(Node*, Node* branchNode, MacroAssembler::RelationalCondition, S_JITOperation_EJJ helperFunction);
void nonSpeculativeNonPeepholeCompare(Node*, MacroAssembler::RelationalCondition, S_JITOperation_EJJ helperFunction);
bool nonSpeculativeCompare(Node*, MacroAssembler::RelationalCondition, S_JITOperation_EJJ helperFunction);
void nonSpeculativePeepholeStrictEq(Node*, Node* branchNode, bool invert = false);
void nonSpeculativeNonPeepholeStrictEq(Node*, bool invert = false);
bool nonSpeculativeStrictEq(Node*, bool invert = false);
void compileInstanceOfForObject(Node*, GPRReg valueReg, GPRReg prototypeReg, GPRReg scratchAndResultReg, GPRReg scratch2Reg);
void compileInstanceOf(Node*);
void compileInstanceOfCustom(Node*);
void compileIsCellWithType(Node*);
void compileIsTypedArrayView(Node*);
void emitCall(Node*);
void emitAllocateButterfly(GPRReg storageGPR, GPRReg sizeGPR, GPRReg scratch1, GPRReg scratch2, GPRReg scratch3, MacroAssembler::JumpList& slowCases);
void emitInitializeButterfly(GPRReg storageGPR, GPRReg sizeGPR, JSValueRegs emptyValueRegs, GPRReg scratchGPR);
void compileAllocateNewArrayWithSize(JSGlobalObject*, GPRReg resultGPR, GPRReg sizeGPR, IndexingType, bool shouldConvertLargeSizeToArrayStorage = true);
// Called once a node has completed code generation but prior to setting
// its result, to free up its children. (This must happen prior to setting
// the nodes result, since the node may have the same VirtualRegister as
// a child, and as such will use the same GeneratioInfo).
void useChildren(Node*);
// These method called to initialize the the GenerationInfo
// to describe the result of an operation.
void int32Result(GPRReg reg, Node* node, DataFormat format = DataFormatInt32, UseChildrenMode mode = CallUseChildren)
{
if (mode == CallUseChildren)
useChildren(node);
VirtualRegister virtualRegister = node->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
if (format == DataFormatInt32) {
m_jit.jitAssertIsInt32(reg);
m_gprs.retain(reg, virtualRegister, SpillOrderInteger);
info.initInt32(node, node->refCount(), reg);
} else {
#if USE(JSVALUE64)
RELEASE_ASSERT(format == DataFormatJSInt32);
m_jit.jitAssertIsJSInt32(reg);
m_gprs.retain(reg, virtualRegister, SpillOrderJS);
info.initJSValue(node, node->refCount(), reg, format);
#elif USE(JSVALUE32_64)
RELEASE_ASSERT_NOT_REACHED();
#endif
}
}
void int32Result(GPRReg reg, Node* node, UseChildrenMode mode)
{
int32Result(reg, node, DataFormatInt32, mode);
}
void int52Result(GPRReg reg, Node* node, DataFormat format, UseChildrenMode mode = CallUseChildren)
{
if (mode == CallUseChildren)
useChildren(node);
VirtualRegister virtualRegister = node->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
m_gprs.retain(reg, virtualRegister, SpillOrderJS);
info.initInt52(node, node->refCount(), reg, format);
}
void int52Result(GPRReg reg, Node* node, UseChildrenMode mode = CallUseChildren)
{
int52Result(reg, node, DataFormatInt52, mode);
}
void strictInt52Result(GPRReg reg, Node* node, UseChildrenMode mode = CallUseChildren)
{
int52Result(reg, node, DataFormatStrictInt52, mode);
}
void noResult(Node* node, UseChildrenMode mode = CallUseChildren)
{
if (mode == UseChildrenCalledExplicitly)
return;
useChildren(node);
}
void cellResult(GPRReg reg, Node* node, UseChildrenMode mode = CallUseChildren)
{
if (mode == CallUseChildren)
useChildren(node);
VirtualRegister virtualRegister = node->virtualRegister();
m_gprs.retain(reg, virtualRegister, SpillOrderCell);
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
info.initCell(node, node->refCount(), reg);
}
void blessedBooleanResult(GPRReg reg, Node* node, UseChildrenMode mode = CallUseChildren)
{
#if USE(JSVALUE64)
jsValueResult(reg, node, DataFormatJSBoolean, mode);
#else
booleanResult(reg, node, mode);
#endif
}
void unblessedBooleanResult(GPRReg reg, Node* node, UseChildrenMode mode = CallUseChildren)
{
#if USE(JSVALUE64)
blessBoolean(reg);
#endif
blessedBooleanResult(reg, node, mode);
}
#if USE(JSVALUE64)
void jsValueResult(GPRReg reg, Node* node, DataFormat format = DataFormatJS, UseChildrenMode mode = CallUseChildren)
{
if (format == DataFormatJSInt32)
m_jit.jitAssertIsJSInt32(reg);
if (mode == CallUseChildren)
useChildren(node);
VirtualRegister virtualRegister = node->virtualRegister();
m_gprs.retain(reg, virtualRegister, SpillOrderJS);
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
info.initJSValue(node, node->refCount(), reg, format);
}
void jsValueResult(GPRReg reg, Node* node, UseChildrenMode mode)
{
jsValueResult(reg, node, DataFormatJS, mode);
}
#elif USE(JSVALUE32_64)
void booleanResult(GPRReg reg, Node* node, UseChildrenMode mode = CallUseChildren)
{
if (mode == CallUseChildren)
useChildren(node);
VirtualRegister virtualRegister = node->virtualRegister();
m_gprs.retain(reg, virtualRegister, SpillOrderBoolean);
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
info.initBoolean(node, node->refCount(), reg);
}
void jsValueResult(GPRReg tag, GPRReg payload, Node* node, DataFormat format = DataFormatJS, UseChildrenMode mode = CallUseChildren)
{
if (mode == CallUseChildren)
useChildren(node);
VirtualRegister virtualRegister = node->virtualRegister();
m_gprs.retain(tag, virtualRegister, SpillOrderJS);
m_gprs.retain(payload, virtualRegister, SpillOrderJS);
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
info.initJSValue(node, node->refCount(), tag, payload, format);
}
void jsValueResult(GPRReg tag, GPRReg payload, Node* node, UseChildrenMode mode)
{
jsValueResult(tag, payload, node, DataFormatJS, mode);
}
#endif
void jsValueResult(JSValueRegs regs, Node* node, DataFormat format = DataFormatJS, UseChildrenMode mode = CallUseChildren)
{
#if USE(JSVALUE64)
jsValueResult(regs.gpr(), node, format, mode);
#else
jsValueResult(regs.tagGPR(), regs.payloadGPR(), node, format, mode);
#endif
}
void storageResult(GPRReg reg, Node* node, UseChildrenMode mode = CallUseChildren)
{
if (mode == CallUseChildren)
useChildren(node);
VirtualRegister virtualRegister = node->virtualRegister();
m_gprs.retain(reg, virtualRegister, SpillOrderStorage);
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
info.initStorage(node, node->refCount(), reg);
}
void doubleResult(FPRReg reg, Node* node, UseChildrenMode mode = CallUseChildren)
{
if (mode == CallUseChildren)
useChildren(node);
VirtualRegister virtualRegister = node->virtualRegister();
m_fprs.retain(reg, virtualRegister, SpillOrderDouble);
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
info.initDouble(node, node->refCount(), reg);
}
void initConstantInfo(Node* node)
{
ASSERT(node->hasConstant());
generationInfo(node).initConstant(node, node->refCount());
}
// These methods add calls to C++ helper functions.
// These methods are broadly value representation specific (i.e.
// deal with the fact that a JSValue may be passed in one or two
// machine registers, and delegate the calling convention specific
// decision as to how to fill the regsiters to setupArguments* methods.
JITCompiler::Call callOperation(V_JITOperation_E operation)
{
m_jit.setupArgumentsExecState();
return appendCall(operation);
}
JITCompiler::Call callOperation(P_JITOperation_E operation, GPRReg result)
{
m_jit.setupArgumentsExecState();
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EC operation, GPRReg result, GPRReg cell)
{
m_jit.setupArgumentsWithExecState(cell);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Jss_JITOperation_EJssUi operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EO operation, GPRReg result, GPRReg object)
{
m_jit.setupArgumentsWithExecState(object);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EOS operation, GPRReg result, GPRReg object, size_t size)
{
m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(size));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EOZ operation, GPRReg result, GPRReg object, int32_t size)
{
m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(size));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EOZ operation, GPRReg result, GPRReg object, int32_t size)
{
m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(static_cast<size_t>(size)));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EPS operation, GPRReg result, GPRReg old, size_t size)
{
m_jit.setupArgumentsWithExecState(old, TrustedImmPtr(size));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EPUi operation, GPRReg result, void* arg1, uint32_t arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(arg1), TrustedImm32(arg2));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_ES operation, GPRReg result, size_t size)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(size));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_ESJss operation, GPRReg result, size_t index, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(index), arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Z_JITOperation_EOI operation, GPRReg result, GPRReg obj, GPRReg impl)
{
m_jit.setupArgumentsWithExecState(obj, impl);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_ESt operation, GPRReg result, RegisteredStructure structure)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStZP operation, GPRReg result, RegisteredStructure structure, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStZP operation, GPRReg result, RegisteredStructure structure, size_t arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImm32(arg2), arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStZP operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStZB operation, GPRReg result, RegisteredStructure structure, GPRReg arg2, GPRReg butterfly)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2, butterfly);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStZB operation, GPRReg result, RegisteredStructure structure, size_t arg2, GPRReg butterfly)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImm32(arg2), butterfly);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStZB operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg butterfly)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, butterfly);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStZB operation, GPRReg result, GPRReg arg1, GPRReg arg2, Butterfly* butterfly)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(butterfly));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStPS operation, GPRReg result, RegisteredStructure structure, void* pointer, size_t size)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImmPtr(pointer), TrustedImmPtr(size));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStSS operation, GPRReg result, RegisteredStructure structure, size_t index, size_t size)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImmPtr(index), TrustedImmPtr(size));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_E operation, GPRReg result)
{
m_jit.setupArgumentsExecState();
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EC operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EC operation, GPRReg result, JSCell* cell)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), cell));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_ECZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_ECZC operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJscC operation, GPRReg result, GPRReg arg1, JSCell* cell)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr::weakPointer(m_jit.graph(), cell));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EIcf operation, GPRReg result, InlineCallFrame* inlineCallFrame)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(inlineCallFrame));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_ESt operation, GPRReg result, RegisteredStructure structure)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure));
return appendCallSetResult(operation, result);
}
#if USE(JSVALUE64)
JITCompiler::Call callOperation(C_JITOperation_EStJscSymtabJ operation, GPRReg result, RegisteredStructure structure, GPRReg scope, SymbolTable* table, TrustedImm64 initialValue)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), scope, TrustedImmPtr::weakPointer(m_jit.graph(), table), initialValue);
return appendCallSetResult(operation, result);
}
#else
JITCompiler::Call callOperation(C_JITOperation_EStJscSymtabJ operation, GPRReg result, RegisteredStructure structure, GPRReg scope, SymbolTable* table, TrustedImm32 tag, TrustedImm32 payload)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), scope, TrustedImmPtr::weakPointer(m_jit.graph(), table), payload, tag);
return appendCallSetResult(operation, result);
}
#endif
JITCompiler::Call callOperation(C_JITOperation_EStZ operation, GPRReg result, RegisteredStructure structure, unsigned knownLength)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImm32(knownLength));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EStZZ operation, GPRReg result, RegisteredStructure structure, unsigned knownLength, unsigned minCapacity)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImm32(knownLength), TrustedImm32(minCapacity));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EStZ operation, GPRReg result, RegisteredStructure structure, GPRReg length)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), length);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EStZZ operation, GPRReg result, RegisteredStructure structure, GPRReg length, unsigned minCapacity)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), length, TrustedImm32(minCapacity));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJssSt operation, GPRReg result, GPRReg arg1, RegisteredStructure structure)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(structure));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJssJss operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_B_EJssJss operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_TT operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArguments(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJssJssJss operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_ECC operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EGC operation, GPRReg result, JSGlobalObject* globalObject, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), globalObject), arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EGC operation, GPRReg result, JSGlobalObject* globalObject, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), globalObject), arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Jss_JITOperation_EZ operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(V_JITOperation_EC operation, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECliJsf operation, CallLinkInfo* callLinkInfo, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(callLinkInfo), arg1);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EC operation, JSCell* arg1)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), arg1));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECIcf operation, GPRReg arg1, InlineCallFrame* inlineCallFrame)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(inlineCallFrame));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECCIcf operation, GPRReg arg1, GPRReg arg2, InlineCallFrame* inlineCallFrame)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(inlineCallFrame));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECZ operation, GPRReg arg1, int arg2)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImm32(arg2));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECC operation, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECC operation, GPRReg arg1, JSCell* arg2)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr::weakPointer(m_jit.graph(), arg2));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECC operation, JSCell* arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), arg1), arg2);
return appendCall(operation);
}
JITCompiler::Call callOperationWithCallFrameRollbackOnException(V_JITOperation_ECb operation, void* pointer)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer));
return appendCallWithCallFrameRollbackOnException(operation);
}
JITCompiler::Call callOperationWithCallFrameRollbackOnException(Z_JITOperation_E operation, GPRReg result)
{
m_jit.setupArgumentsExecState();
return appendCallWithCallFrameRollbackOnExceptionSetResult(operation, result);
}
JITCompiler::Call callOperation(Z_JITOperation_EC operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(V_JITOperation_ECIZC operation, GPRReg regOp1, UniquedStringImpl* identOp2, int32_t op3, GPRReg regOp4)
{
m_jit.setupArgumentsWithExecState(regOp1, TrustedImmPtr(identOp2), TrustedImm32(op3), regOp4);
return appendCall(operation);
}
template<typename FunctionType, typename... Args>
JITCompiler::Call callOperation(FunctionType operation, NoResultTag, Args... args)
{
return callOperation(operation, args...);
}
JITCompiler::Call callOperation(D_JITOperation_ZZ operation, FPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArguments(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(D_JITOperation_D operation, FPRReg result, FPRReg arg1)
{
m_jit.setupArguments(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(D_JITOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
{
m_jit.setupArguments(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJss operation, JSValueRegs result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(T_JITOperation_EJss operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJscZ operation, GPRReg result, GPRReg arg1, int32_t arg2)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImm32(arg2));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EZ operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EZ operation, GPRReg result, int32_t arg1)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(arg1));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJscC operation, GPRReg result, GPRReg arg1, JSCell* cell)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr::weakPointer(m_jit.graph(), cell));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJscCJ operation, GPRReg result, GPRReg arg1, JSCell* cell, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr::weakPointer(m_jit.graph(), cell), arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EGReoJ operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EGReoJss operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(V_JITOperation_EWs operation, WatchpointSet* watchpointSet)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(watchpointSet));
return appendCall(operation);
}
JITCompiler::Call callOperation(C_JITOperation_ERUiUi operation, GPRReg result, GPRReg arg1, Imm32 arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.asTrustedImm32(), arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJscI operation, GPRReg result, GPRReg arg1, UniquedStringImpl* impl)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(impl));
return appendCallSetResult(operation, result);
}
#if USE(JSVALUE64)
JITCompiler::Call callOperation(Z_JITOperation_EOJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_ECJZ operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJMic operation, JSValueRegs result, JSValueRegs arg, TrustedImmPtr mathIC)
{
m_jit.setupArgumentsWithExecState(arg.gpr(), mathIC);
return appendCallSetResult(operation, result.gpr());
}
JITCompiler::Call callOperation(J_JITOperation_EJJMic operation, JSValueRegs result, JSValueRegs arg1, JSValueRegs arg2, TrustedImmPtr mathIC)
{
m_jit.setupArgumentsWithExecState(arg1.gpr(), arg2.gpr(), mathIC);
return appendCallSetResult(operation, result.gpr());
}
JITCompiler::Call callOperation(J_JITOperation_EJJI operation, GPRReg result, GPRReg arg1, GPRReg arg2, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(uid));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(V_JITOperation_EJJJI operation, GPRReg arg1, GPRReg arg2, GPRReg arg3, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3, TrustedImmPtr(uid));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EJJJJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3, arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJJZ operation, GPRReg arg1, JSValueRegs arg2, JSValueRegs arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg3.payloadGPR(), arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJssJZ operation, GPRReg arg1, GPRReg arg2, JSValueRegs arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3.payloadGPR(), arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOIJZ operation, GPRReg arg1, GPRReg arg2, JSValueRegs arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3.payloadGPR(), arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOSymJZ operation, GPRReg arg1, GPRReg arg2, JSValueRegs arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3.payloadGPR(), arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJOOZ operation, GPRReg arg1, JSValueRegs arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg3, arg4, arg5);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJssOOZ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3, arg4, arg5);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOIOOZ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3, arg4, arg5);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOSymOOZ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3, arg4, arg5);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJIUi operation, GPRReg arg1, GPRReg arg2, UniquedStringImpl* impl, unsigned value)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(impl), TrustedImm32(value));
return appendCall(operation);
}
JITCompiler::Call callOperation(J_JITOperation_EOIUi operation, GPRReg result, GPRReg arg1, UniquedStringImpl* impl, unsigned value)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(impl), TrustedImm32(value));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_E operation, GPRReg result)
{
m_jit.setupArgumentsExecState();
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EP operation, GPRReg result, void* pointer)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Z_JITOperation_D operation, GPRReg result, FPRReg arg1)
{
m_jit.setupArguments(arg1);
JITCompiler::Call call = m_jit.appendCall(operation);
m_jit.zeroExtend32ToPtr(GPRInfo::returnValueGPR, result);
return call;
}
JITCompiler::Call callOperation(Q_JITOperation_J operation, GPRReg result, GPRReg value)
{
m_jit.setupArguments(value);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Q_JITOperation_D operation, GPRReg result, FPRReg value)
{
m_jit.setupArguments(value);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EI operation, GPRReg result, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(uid));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EA operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EAZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJssReo operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJssReoJss operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJssZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EPS operation, GPRReg result, void* pointer, size_t size)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer), TrustedImmPtr(size));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ESS operation, GPRReg result, int startConstant, int numConstants)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(startConstant), TrustedImm32(numConstants));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EPP operation, GPRReg result, GPRReg arg1, void* pointer)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(pointer));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EC operation, GPRReg result, JSCell* cell)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), cell));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ECZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ECZZ operation, GPRReg result, GPRReg arg1, GPRReg arg2, int32_t constant)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImm32(constant));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ESsiCI operation, GPRReg result, StructureStubInfo* stubInfo, GPRReg arg1, const UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, TrustedImmPtr(uid));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ESsiJI operation, GPRReg result, StructureStubInfo* stubInfo, GPRReg arg1, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, TrustedImmPtr(uid));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ESsiJJI operation, GPRReg result, StructureStubInfo* stubInfo, GPRReg arg1, GPRReg arg2, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, arg2, TrustedImmPtr(uid));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EDA operation, GPRReg result, FPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJC operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJA operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EP operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EZ operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EZ operation, GPRReg result, int32_t arg1)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(arg1));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EZZ operation, GPRReg result, int32_t arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EZIcfZ operation, GPRReg result, int32_t arg1, InlineCallFrame* inlineCallFrame, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), TrustedImmPtr(inlineCallFrame), arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EJS operation, GPRReg result, GPRReg value, size_t index)
{
m_jit.setupArgumentsWithExecState(value, TrustedImmPtr(index));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStJ operation, GPRReg result, RegisteredStructure structure, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EGJ operation, GPRReg result, JSGlobalObject* globalObject, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), globalObject), arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EGJ operation, GPRReg result, JSGlobalObject* globalObject, JSValueRegs arg1)
{
return callOperation(operation, result, globalObject, arg1.gpr());
}
JITCompiler::Call callOperation(C_JITOperation_EJ operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJ operation, GPRReg result, JSValueRegs arg1)
{
m_jit.setupArgumentsWithExecState(arg1.gpr());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJJC operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJZC operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_J operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArguments(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EJ operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EJ operation, GPRReg result, JSValueRegs arg1)
{
return callOperation(operation, result, arg1.gpr());
}
JITCompiler::Call callOperation(J_JITOperation_EJ operation, JSValueRegs result, JSValueRegs arg1)
{
return callOperation(operation, result.payloadGPR(), arg1.payloadGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJ operation, GPRReg result, JSValueRegs arg1)
{
return callOperation(operation, result, arg1.payloadGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJ operation, GPRReg result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EJI operation, GPRReg result, GPRReg arg1, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(uid));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EJI operation, GPRReg result, JSValueRegs arg1, UniquedStringImpl* uid)
{
return callOperation(operation, result, arg1.gpr(), uid);
}
JITCompiler::Call callOperation(S_JITOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EJJ operation, GPRReg result, JSValueRegs arg1, JSValueRegs arg2)
{
return callOperation(operation, result, arg1.gpr(), arg2.gpr());
}
JITCompiler::Call callOperation(S_JITOperation_EGJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EGReoJ operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EGReoJss operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EPP operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EPPP operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EGP operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EGJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg result, GPRReg arg1, int32_t imm)
{
m_jit.setupArgumentsWithExecState(arg1, MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(imm))));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg result, int32_t imm, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(imm))), arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJJ operation, JSValueRegs result, JSValueRegs arg1, JSValueRegs arg2)
{
return callOperation(operation, result.payloadGPR(), arg1.payloadGPR(), arg2.payloadGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ECC operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ECJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_ECJ operation, GPRReg result, GPRReg arg1, JSValueRegs arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.gpr());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(V_JITOperation_EOZD operation, GPRReg arg1, GPRReg arg2, FPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EJ operation, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EJPP operation, GPRReg arg1, GPRReg arg2, void* pointer)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(pointer));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ESsiJJI operation, StructureStubInfo* stubInfo, GPRReg arg1, GPRReg arg2, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, arg2, TrustedImmPtr(uid));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EJJJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EPZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECJ operation, GPRReg arg1, JSValueRegs arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR());
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECJJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCall(operation);
}
JITCompiler::Call callOperation(Z_JITOperation_EJ operation, GPRReg result, JSValueRegs arg1)
{
m_jit.setupArgumentsWithExecState(arg1.payloadGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Z_JITOperation_EJZZ operation, GPRReg result, GPRReg arg1, unsigned arg2, unsigned arg3)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImm32(arg2), TrustedImm32(arg3));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(F_JITOperation_EFJZZ operation, GPRReg result, GPRReg arg1, GPRReg arg2, unsigned arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImm32(arg3), arg4);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Z_JITOperation_EJOJ operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Z_JITOperation_EJOJ operation, GPRReg result, JSValueRegs arg1, GPRReg arg2, JSValueRegs arg3)
{
return callOperation(operation, result, arg1.payloadGPR(), arg2, arg3.payloadGPR());
}
JITCompiler::Call callOperation(Z_JITOperation_EJZ operation, GPRReg result, GPRReg arg1, unsigned arg2)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImm32(arg2));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(V_JITOperation_EZJZZZ operation, unsigned arg1, GPRReg arg2, unsigned arg3, GPRReg arg4, unsigned arg5)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), arg2, TrustedImm32(arg3), arg4, TrustedImm32(arg5));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECJZC operation, GPRReg regOp1, GPRReg regOp2, int32_t op3, GPRReg regOp4)
{
m_jit.setupArgumentsWithExecState(regOp1, regOp2, TrustedImm32(op3), regOp4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_ECIZJJ operation, GPRReg regOp1, UniquedStringImpl* identOp2, int32_t op3, GPRReg regOp4, GPRReg regOp5)
{
m_jit.setupArgumentsWithExecState(regOp1, TrustedImmPtr(identOp2), TrustedImm32(op3), regOp4, regOp5);
return appendCall(operation);
}
JITCompiler::Call callOperation(D_JITOperation_EJ operation, FPRReg result, JSValueRegs arg1)
{
m_jit.setupArgumentsWithExecState(arg1.gpr());
return appendCallSetResult(operation, result);
}
#else // USE(JSVALUE32_64)
JITCompiler::Call callOperation(Z_JITOperation_EOJ operation, GPRReg result, GPRReg arg1, JSValueRegs arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg2.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_ECJZ operation, GPRReg result, GPRReg arg1, JSValueRegs arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg2.tagGPR(), arg3);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJMic operation, JSValueRegs result, JSValueRegs arg, TrustedImmPtr mathIC)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg.payloadGPR(), arg.tagGPR(), mathIC);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJZ operation, JSValueRegs result, JSValueRegs arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2);
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EJJMic operation, JSValueRegs result, JSValueRegs arg1, JSValueRegs arg2, TrustedImmPtr mathIC)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR(), mathIC);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJJI operation, JSValueRegs result, JSValueRegs arg1, JSValueRegs arg2, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR(), TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(V_JITOperation_EJJJI operation, JSValueRegs arg1, JSValueRegs arg2, JSValueRegs arg3, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR(), arg3.payloadGPR(), arg3.tagGPR(), TrustedImmPtr(uid));
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EJJJJ operation, JSValueRegs arg1, JSValueRegs arg2, JSValueRegs arg3, JSValueRegs arg4)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR(), arg3.payloadGPR(), arg3.tagGPR(), arg4.payloadGPR(), arg4.tagGPR());
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJJZ operation, GPRReg arg1, JSValueRegs arg2, JSValueRegs arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg2.tagGPR(), arg3.payloadGPR(), arg3.tagGPR(), arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJssJZ operation, GPRReg arg1, GPRReg arg2, JSValueRegs arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG arg3.payloadGPR(), arg3.tagGPR(), arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOIJZ operation, GPRReg arg1, GPRReg arg2, JSValueRegs arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG arg3.payloadGPR(), arg3.tagGPR(), arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOSymJZ operation, GPRReg arg1, GPRReg arg2, JSValueRegs arg3, GPRReg arg4)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG arg3.payloadGPR(), arg3.tagGPR(), arg4);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJOOZ operation, GPRReg arg1, JSValueRegs arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg2.tagGPR(), arg3, arg4, arg5);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJssOOZ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3, arg4, arg5);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOIOOZ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3, arg4, arg5);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOSymOOZ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3, arg4, arg5);
return appendCall(operation);
}
JITCompiler::Call callOperation(V_JITOperation_EOJIUi operation, GPRReg arg1, JSValueRegs arg2, UniquedStringImpl* impl, unsigned value)
{
m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg2.tagGPR(), TrustedImmPtr(impl), TrustedImm32(value));
return appendCall(operation);
}
JITCompiler::Call callOperation(J_JITOperation_EOIUi operation, JSValueRegs result, GPRReg arg1, UniquedStringImpl* impl, unsigned value)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(impl), TrustedImm32(value));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(D_JITOperation_G operation, FPRReg result, JSGlobalObject* globalObject)
{
m_jit.setupArguments(TrustedImmPtr::weakPointer(m_jit.graph(), globalObject));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(Z_JITOperation_D operation, GPRReg result, FPRReg arg1)
{
prepareForExternalCall();
m_jit.setupArguments(arg1);
JITCompiler::Call call = m_jit.appendCall(operation);
m_jit.zeroExtend32ToPtr(GPRInfo::returnValueGPR, result);
return call;
}
JITCompiler::Call callOperation(J_JITOperation_E operation, JSValueRegs result)
{
m_jit.setupArgumentsExecState();
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EP operation, JSValueRegs result, void* pointer)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EPP operation, JSValueRegs result, GPRReg arg1, void* pointer)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(pointer));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EPP operation, JSValueRegs result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EPPP operation, JSValueRegs result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EGP operation, JSValueRegs result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EP operation, JSValueRegs result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EI operation, JSValueRegs result, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EA operation, JSValueRegs result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EAZ operation, JSValueRegs result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJ operation, JSValueRegs result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJC operation, JSValueRegs result, JSValueRegs arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJssZ operation, JSValueRegs result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJssReo operation, JSValueRegs result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJssReoJss operation, JSValueRegs result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EPS operation, JSValueRegs result, void* pointer, size_t size)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer), TrustedImmPtr(size));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ESS operation, JSValueRegs result, int startConstant, int numConstants)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(startConstant), TrustedImm32(numConstants));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJP operation, JSValueRegs result, JSValueRegs arg1, void* pointer)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), TrustedImmPtr(pointer));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJP operation, JSValueRegs result, JSValueRegs arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EC operation, JSValueRegs result, JSCell* cell)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), cell));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ECZ operation, JSValueRegs result, GPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(arg1, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ECZZ operation, JSValueRegs result, GPRReg arg1, GPRReg arg2, int32_t constant)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImm32(constant));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJscC operation, JSValueRegs result, GPRReg arg1, JSCell* cell)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr::weakPointer(m_jit.graph(), cell));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJscCJ operation, GPRReg result, GPRReg arg1, JSCell* cell, JSValueRegs arg2)
{
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr::weakPointer(m_jit.graph(), cell), EABI_32BIT_DUMMY_ARG arg2.payloadGPR(), arg2.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(J_JITOperation_EGReoJ operation, JSValueRegs result, GPRReg arg1, GPRReg arg2, JSValueRegs arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG arg3.payloadGPR(), arg3.tagGPR());
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EGReoJss operation, JSValueRegs result, GPRReg arg1, GPRReg arg2, GPRReg arg3)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ESsiCI operation, JSValueRegs result, StructureStubInfo* stubInfo, GPRReg arg1, const UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ESsiJI operation, JSValueRegs result, StructureStubInfo* stubInfo, JSValueRegs arg1, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1.payloadGPR(), arg1.tagGPR(), TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ESsiJJI operation, JSValueRegs result, StructureStubInfo* stubInfo, JSValueRegs arg1, JSValueRegs arg2, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR(), TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ESsiJJI operation, JSValueRegs result, StructureStubInfo* stubInfo, int32_t arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1Payload, TrustedImm32(arg1Tag), arg2Payload, arg2Tag, TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ESsiJI operation, JSValueRegs result, StructureStubInfo* stubInfo, int32_t arg1Tag, GPRReg arg1Payload, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1Payload, TrustedImm32(arg1Tag), TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ESsiJJI operation, JSValueRegs result, StructureStubInfo* stubInfo, int32_t arg1Tag, GPRReg arg1Payload, int32_t arg2Tag, GPRReg arg2Payload, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1Payload, TrustedImm32(arg1Tag), arg2Payload, TrustedImm32(arg2Tag), TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_ESsiJI operation, JSValueRegs result, StructureStubInfo* stubInfo, GPRReg arg1Tag, GPRReg arg1Payload, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1Payload, arg1Tag, TrustedImmPtr(uid));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EDA operation, JSValueRegs result, FPRReg arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJA operation, JSValueRegs result, JSValueRegs arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJA operation, JSValueRegs result, TrustedImm32 arg1Tag, GPRReg arg1Payload, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJA operation, JSValueRegs result, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EJ operation, JSValueRegs result, JSValueRegs arg1)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR());
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EZ operation, JSValueRegs result, GPRReg arg1)
{
m_jit.setupArgumentsWithExecState(arg1);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EZ operation, JSValueRegs result, int32_t arg1)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(arg1));
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EZIcfZ operation, JSValueRegs result, int32_t arg1, InlineCallFrame* inlineCallFrame, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), TrustedImmPtr(inlineCallFrame), arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(J_JITOperation_EZZ operation, JSValueRegs result, int32_t arg1, GPRReg arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), arg2);
return appendCallSetResult(operation, result.payloadGPR(), result.tagGPR());
}
JITCompiler::Call callOperation(P_JITOperation_EJS operation, GPRReg result, JSValueRegs value, size_t index)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG value.payloadGPR(), value.tagGPR(), TrustedImmPtr(index));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(P_JITOperation_EStJ operation, GPRReg result, RegisteredStructure structure, JSValueRegs arg2)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2.payloadGPR(), arg2.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EGJ operation, GPRReg result, JSGlobalObject* globalObject, JSValueRegs arg1)
{
m_jit.setupArgumentsWithExecState(TrustedImmPtr::weakPointer(m_jit.graph(), globalObject), arg1.payloadGPR(), arg1.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJ operation, GPRReg result, JSValueRegs arg1)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJJ operation, GPRReg result, JSValueRegs arg1, JSValueRegs arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(C_JITOperation_EJJJ operation, GPRReg result, JSValueRegs arg1, JSValueRegs arg2, JSValueRegs arg3)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR(), arg3.payloadGPR(), arg3.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EJ operation, GPRReg result, JSValueRegs arg1)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EJI operation, GPRReg result, JSValueRegs arg1, UniquedStringImpl* uid)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), TrustedImmPtr(uid));
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EJJ operation, GPRReg result, JSValueRegs arg1, JSValueRegs arg2)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1.payloadGPR(), arg1.tagGPR(), arg2.payloadGPR(), arg2.tagGPR());
return appendCallSetResult(operation, result);
}
JITCompiler::Call callOperation(S_JITOperation_EGJJ operation, GPRReg result, GPRReg arg1, JSValueRegs arg2,