X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/14957cd040308e3eeec43d26bae5d76da13fcd85..93a3786624b2768d89bfa27e46598dc64e2fb70a:/assembler/AssemblerBufferWithConstantPool.h?ds=sidebyside diff --git a/assembler/AssemblerBufferWithConstantPool.h b/assembler/AssemblerBufferWithConstantPool.h index cd9ff9c..852f86d 100644 --- a/assembler/AssemblerBufferWithConstantPool.h +++ b/assembler/AssemblerBufferWithConstantPool.h @@ -83,7 +83,7 @@ namespace JSC { */ template -class AssemblerBufferWithConstantPool: public AssemblerBuffer { +class AssemblerBufferWithConstantPool : public AssemblerBuffer { typedef SegmentedVector LoadOffsets; using AssemblerBuffer::putIntegral; using AssemblerBuffer::putIntegralUnchecked; @@ -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); } - void* executableCopy(JSGlobalData& globalData, ExecutablePool* allocator) + PassRefPtr executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { flushConstantPool(false); - return AssemblerBuffer::executableCopy(globalData, allocator); + 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); }