Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (283228 => 283229)
--- trunk/Source/_javascript_Core/ChangeLog 2021-09-29 16:37:07 UTC (rev 283228)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-09-29 16:44:10 UTC (rev 283229)
@@ -1,3 +1,53 @@
+2021-09-29 Yusuke Suzuki <[email protected]>
+
+ [JSC] Use FixedVector in JITConstantPool
+ https://bugs.webkit.org/show_bug.cgi?id=230937
+
+ Reviewed by Keith Miller.
+
+ This patch changes JITConstantPool to use FixedVector. This allocates exact size
+ of memory and Making sizeof(JITConstantPool) smaller. We also use CompactPointerTuple
+ for JITConstantPool::Value since it is faster for access.
+
+ To achieve that, in JIT, we append Value to normal Vector. And when finalizing BaselineJITCode
+ we construct JITConstantPool from that Vector.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::setupWithUnlinkedBaselineCode):
+ * jit/BaselineJITCode.h:
+ (JSC::JITConstantPool::JITConstantPool):
+ (JSC::JITConstantPool::add): Deleted.
+ * jit/JIT.cpp:
+ (JSC::JIT::JIT):
+ (JSC::JIT::addToConstantPool):
+ * jit/JIT.h:
+ * jit/JITCall.cpp:
+ (JSC::JIT::compileOpCall):
+ (JSC::JIT::emit_op_iterator_open):
+ (JSC::JIT::emit_op_iterator_next):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_instanceof):
+ (JSC::JIT::emitNewFuncCommon):
+ (JSC::JIT::emitNewFuncExprCommon):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emit_op_get_by_val):
+ (JSC::JIT::emit_op_get_private_name):
+ (JSC::JIT::emit_op_set_private_brand):
+ (JSC::JIT::emit_op_check_private_brand):
+ (JSC::JIT::emit_op_put_by_val):
+ (JSC::JIT::emit_op_put_private_name):
+ (JSC::JIT::emit_op_del_by_id):
+ (JSC::JIT::emit_op_del_by_val):
+ (JSC::JIT::emit_op_try_get_by_id):
+ (JSC::JIT::emit_op_get_by_id_direct):
+ (JSC::JIT::emit_op_get_by_id):
+ (JSC::JIT::emit_op_get_by_id_with_this):
+ (JSC::JIT::emit_op_put_by_id):
+ (JSC::JIT::emit_op_in_by_id):
+ (JSC::JIT::emit_op_in_by_val):
+ (JSC::JIT::emitHasPrivate):
+ (JSC::JIT::emit_op_enumerator_get_by_val):
+
2021-09-28 Saam Barati <[email protected]>
DoesGCCheck does not use enough bits for nodeIndex
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (283228 => 283229)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2021-09-29 16:37:07 UTC (rev 283228)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2021-09-29 16:44:10 UTC (rev 283229)
@@ -805,12 +805,12 @@
jitData.m_jitConstantPool = FixedVector<void*>(jitCode->m_constantPool.size());
for (size_t i = 0; i < jitCode->m_constantPool.size(); ++i) {
auto entry = jitCode->m_constantPool.at(i);
- switch (entry.type) {
+ switch (entry.type()) {
case JITConstantPool::Type::GlobalObject:
jitData.m_jitConstantPool[i] = m_globalObject.get();
break;
case JITConstantPool::Type::CallLinkInfo: {
- UnlinkedCallLinkInfo& unlinkedCallLinkInfo = *static_cast<UnlinkedCallLinkInfo*>(entry.payload.get());
+ UnlinkedCallLinkInfo& unlinkedCallLinkInfo = *static_cast<UnlinkedCallLinkInfo*>(entry.pointer());
CallLinkInfo* callLinkInfo = jitData.m_callLinkInfos.add(CodeOrigin(unlinkedCallLinkInfo.bytecodeIndex));
callLinkInfo->initializeDataIC(vm(), unlinkedCallLinkInfo, GPRInfo::regT0, GPRInfo::regT2);
jitData.m_jitConstantPool[i] = callLinkInfo;
@@ -817,7 +817,7 @@
break;
}
case JITConstantPool::Type::StructureStubInfo: {
- UnlinkedStructureStubInfo& unlinkedStubInfo = *static_cast<UnlinkedStructureStubInfo*>(entry.payload.get());
+ UnlinkedStructureStubInfo& unlinkedStubInfo = *static_cast<UnlinkedStructureStubInfo*>(entry.pointer());
StructureStubInfo* stubInfo = jitData.m_stubInfos.add(unlinkedStubInfo.accessType, CodeOrigin(unlinkedStubInfo.bytecodeIndex));
stubInfo->initializeFromUnlinkedStructureStubInfo(this, unlinkedStubInfo);
jitData.m_jitConstantPool[i] = stubInfo;
@@ -824,12 +824,12 @@
break;
}
case JITConstantPool::Type::FunctionDecl: {
- unsigned index = bitwise_cast<uintptr_t>(entry.payload.get());
+ unsigned index = bitwise_cast<uintptr_t>(entry.pointer());
jitData.m_jitConstantPool[i] = functionDecl(index);
break;
}
case JITConstantPool::Type::FunctionExpr: {
- unsigned index = bitwise_cast<uintptr_t>(entry.payload.get());
+ unsigned index = bitwise_cast<uintptr_t>(entry.pointer());
jitData.m_jitConstantPool[i] = functionExpr(index);
break;
}
Modified: trunk/Source/_javascript_Core/jit/BaselineJITCode.h (283228 => 283229)
--- trunk/Source/_javascript_Core/jit/BaselineJITCode.h 2021-09-29 16:37:07 UTC (rev 283228)
+++ trunk/Source/_javascript_Core/jit/BaselineJITCode.h 2021-09-29 16:44:10 UTC (rev 283229)
@@ -28,6 +28,7 @@
#include "CallLinkInfo.h"
#include "JITCode.h"
#include "JITCodeMap.h"
+#include <wtf/CompactPointerTuple.h>
#if ENABLE(JIT)
@@ -55,6 +56,7 @@
};
class JITConstantPool {
+ WTF_MAKE_NONCOPYABLE(JITConstantPool);
public:
using Constant = unsigned;
@@ -66,20 +68,15 @@
FunctionExpr,
};
- struct Value {
- Type type;
- PackedPtr<void> payload;
- };
+ using Value = CompactPointerTuple<void*, Type>;
JITConstantPool() = default;
JITConstantPool(JITConstantPool&&) = default;
JITConstantPool& operator=(JITConstantPool&&) = default;
- Constant add(Type type, void* payload = nullptr)
+ JITConstantPool(Vector<Value>&& constants)
+ : m_constants(WTFMove(constants))
{
- unsigned result = m_constants.size();
- m_constants.append(Value { type, payload });
- return result;
}
size_t size() const { return m_constants.size(); }
@@ -86,7 +83,7 @@
Value at(size_t i) const { return m_constants[i]; }
private:
- Vector<Value> m_constants;
+ FixedVector<Value> m_constants;
};
Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (283228 => 283229)
--- trunk/Source/_javascript_Core/jit/JIT.cpp 2021-09-29 16:37:07 UTC (rev 283228)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp 2021-09-29 16:44:10 UTC (rev 283229)
@@ -77,7 +77,7 @@
, m_shouldEmitProfiling(false)
, m_loopOSREntryBytecodeIndex(loopOSREntryBytecodeIndex)
{
- m_globalObjectConstant = m_constantPool.add(JITConstantPool::Type::GlobalObject);
+ m_globalObjectConstant = addToConstantPool(JITConstantPool::Type::GlobalObject);
m_profiledCodeBlock = codeBlock;
m_unlinkedCodeBlock = codeBlock->unlinkedCodeBlock();
}
@@ -86,6 +86,13 @@
{
}
+JITConstantPool::Constant JIT::addToConstantPool(JITConstantPool::Type type, void* payload)
+{
+ unsigned result = m_constantPool.size();
+ m_constantPool.append(JITConstantPool::Value { payload, type });
+ return result;
+}
+
#if ENABLE(DFG_JIT)
void JIT::emitEnterOptimizationCheck()
{
Modified: trunk/Source/_javascript_Core/jit/JIT.h (283228 => 283229)
--- trunk/Source/_javascript_Core/jit/JIT.h 2021-09-29 16:37:07 UTC (rev 283228)
+++ trunk/Source/_javascript_Core/jit/JIT.h 2021-09-29 16:44:10 UTC (rev 283229)
@@ -973,6 +973,8 @@
void resetSP();
+ JITConstantPool::Constant addToConstantPool(JITConstantPool::Type, void* payload = nullptr);
+
Interpreter* m_interpreter;
Vector<FarCallRecord> m_farCalls;
@@ -1040,7 +1042,7 @@
MathICHolder m_mathICs;
RefPtr<BaselineJITCode> m_jitCode;
- JITConstantPool m_constantPool;
+ Vector<JITConstantPool::Value> m_constantPool;
JITConstantPool::Constant m_globalObjectConstant { std::numeric_limits<unsigned>::max() };
Bag<UnlinkedCallLinkInfo> m_unlinkedCalls;
Bag<CallLinkInfo> m_evalCallLinkInfos;
Modified: trunk/Source/_javascript_Core/jit/JITCall.cpp (283228 => 283229)
--- trunk/Source/_javascript_Core/jit/JITCall.cpp 2021-09-29 16:37:07 UTC (rev 283228)
+++ trunk/Source/_javascript_Core/jit/JITCall.cpp 2021-09-29 16:44:10 UTC (rev 283229)
@@ -233,7 +233,7 @@
info->bytecodeIndex = m_bytecodeIndex;
info->callType = CallLinkInfo::callTypeFor(opcodeID);
- infoConstant = m_constantPool.add(JITConstantPool::Type::CallLinkInfo, info);
+ infoConstant = addToConstantPool(JITConstantPool::Type::CallLinkInfo, info);
ASSERT(m_callCompilationInfo.size() == callLinkInfoIndex);
m_callCompilationInfo.append(CallCompilationInfo());
@@ -421,7 +421,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetById;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -518,7 +518,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetById;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -553,7 +553,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetById;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
Modified: trunk/Source/_javascript_Core/jit/JITOpcodes.cpp (283228 => 283229)
--- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp 2021-09-29 16:37:07 UTC (rev 283228)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes.cpp 2021-09-29 16:44:10 UTC (rev 283229)
@@ -180,7 +180,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::InstanceOf;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1612,7 +1612,7 @@
#else
emitLoadPayload(bytecode.m_scope, argumentGPR1);
#endif
- auto constant = m_constantPool.add(JITConstantPool::Type::FunctionDecl, bitwise_cast<void*>(static_cast<uintptr_t>(bytecode.m_functionDecl)));
+ auto constant = addToConstantPool(JITConstantPool::Type::FunctionDecl, bitwise_cast<void*>(static_cast<uintptr_t>(bytecode.m_functionDecl)));
loadConstant(constant, argumentGPR2);
OpcodeID opcodeID = Op::opcodeID;
@@ -1659,7 +1659,7 @@
emitLoadPayload(bytecode.m_scope, argumentGPR1);
#endif
- auto constant = m_constantPool.add(JITConstantPool::Type::FunctionExpr, bitwise_cast<void*>(static_cast<uintptr_t>(bytecode.m_functionDecl)));
+ auto constant = addToConstantPool(JITConstantPool::Type::FunctionExpr, bitwise_cast<void*>(static_cast<uintptr_t>(bytecode.m_functionDecl)));
loadConstant(constant, argumentGPR2);
OpcodeID opcodeID = Op::opcodeID;
Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (283228 => 283229)
--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2021-09-29 16:37:07 UTC (rev 283228)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2021-09-29 16:44:10 UTC (rev 283229)
@@ -83,7 +83,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetByVal;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -226,7 +226,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetPrivateName;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -339,7 +339,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::SetPrivateBrand;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -415,7 +415,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::CheckPrivateBrand;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -502,7 +502,7 @@
stubInfo->putKind = std::is_same_v<Op, OpPutByValDirect> ? PutKind::Direct : PutKind::NotDirect;
stubInfo->ecmaMode = ecmaMode(bytecode);
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -651,7 +651,7 @@
stubInfo->accessType = AccessType::PutPrivateName;
stubInfo->privateFieldPutKind = bytecode.m_putKind;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -817,7 +817,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::DeleteByID;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -942,7 +942,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::DeleteByVal;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1065,7 +1065,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::TryGetById;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1140,7 +1140,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetByIdDirect;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1224,7 +1224,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetById;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1304,7 +1304,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetByIdWithThis;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1469,7 +1469,7 @@
stubInfo->putKind = direct ? PutKind::Direct : PutKind::NotDirect;
stubInfo->ecmaMode = ecmaMode(bytecode);
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1585,7 +1585,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::InById;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1664,7 +1664,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::InByVal;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -1741,7 +1741,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = type;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;
@@ -3062,7 +3062,7 @@
UnlinkedStructureStubInfo* stubInfo = m_unlinkedStubInfos.add();
stubInfo->accessType = AccessType::GetByVal;
stubInfo->bytecodeIndex = m_bytecodeIndex;
- JITConstantPool::Constant stubInfoIndex = m_constantPool.add(JITConstantPool::Type::StructureStubInfo, stubInfo);
+ JITConstantPool::Constant stubInfoIndex = addToConstantPool(JITConstantPool::Type::StructureStubInfo, stubInfo);
gen.m_unlinkedStubInfoConstantIndex = stubInfoIndex;
gen.m_unlinkedStubInfo = stubInfo;