X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174..8b637bb680022adfddad653280734877951535a9:/assembler/AssemblerBufferWithConstantPool.h?ds=inline diff --git a/assembler/AssemblerBufferWithConstantPool.h b/assembler/AssemblerBufferWithConstantPool.h index e2ea261..852f86d 100644 --- a/assembler/AssemblerBufferWithConstantPool.h +++ b/assembler/AssemblerBufferWithConstantPool.h @@ -127,9 +127,9 @@ public: AssemblerBuffer::ensureSpace(insnSpace); } - void ensureSpaceForAnyOneInstruction() + void ensureSpaceForAnyInstruction(int amount = 1) { - flushIfNoSpaceFor(maxInstructionSize, sizeof(uint64_t)); + flushIfNoSpaceFor(amount * maxInstructionSize, amount * sizeof(uint64_t)); } bool isAligned(int alignment) @@ -195,10 +195,10 @@ public: putIntegralUnchecked(value.low); } - PassRefPtr executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort) + PassRefPtr executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { flushConstantPool(false); - return AssemblerBuffer::executableCopy(globalData, ownerUID, effort); + return AssemblerBuffer::executableCopy(vm, ownerUID, effort); } void putShortWithConstantInt(uint16_t insn, uint32_t constant, bool isReusable = false) @@ -215,7 +215,7 @@ public: void flushWithoutBarrier(bool isForced = false) { // Flush if constant pool is more than 60% full to avoid overuse of this function. - if (isForced || 5 * m_numConsts > 3 * maxPoolSize / sizeof(uint32_t)) + if (isForced || 5 * static_cast(m_numConsts) > 3 * maxPoolSize / sizeof(uint32_t)) flushConstantPool(false); }