summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h')
-rw-r--r--JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h b/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h
index af3c3be..599be14 100644
--- a/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h
+++ b/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h
@@ -27,8 +27,6 @@
#ifndef AssemblerBufferWithConstantPool_h
#define AssemblerBufferWithConstantPool_h
-#include <wtf/Platform.h>
-
#if ENABLE(ASSEMBLER)
#include "AssemblerBuffer.h"
@@ -192,6 +190,8 @@ public:
void putIntWithConstantInt(uint32_t insn, uint32_t constant, bool isReusable = false)
{
+ if (!m_numConsts)
+ m_maxDistance = maxPoolSize;
flushIfNoSpaceFor(4, 4);
m_loadOffsets.append(AssemblerBuffer::size());
@@ -281,7 +281,6 @@ private:
m_loadOffsets.clear();
m_numConsts = 0;
- m_maxDistance = maxPoolSize;
}
void flushIfNoSpaceFor(int nextInsnSize)