@@ -403,15 +403,15 @@ bool CodeBlock::finishCreation(VM& vm, ScriptExecutable* ownerExecutable, Unlink
403403 }
404404
405405 bool shouldUpdateFunctionHasExecutedCache = m_unlinkedCode->wasCompiledWithTypeProfilerOpcodes () || m_unlinkedCode->wasCompiledWithControlFlowProfilerOpcodes ();
406- m_functionDecls = RefCountedArray <WriteBarrier<FunctionExecutable>>(unlinkedCodeBlock->numberOfFunctionDecls ());
406+ m_functionDecls = FixedVector <WriteBarrier<FunctionExecutable>>(unlinkedCodeBlock->numberOfFunctionDecls ());
407407 for (size_t count = unlinkedCodeBlock->numberOfFunctionDecls (), i = 0 ; i < count; ++i) {
408408 UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionDecl (i);
409409 if (shouldUpdateFunctionHasExecutedCache)
410410 vm.functionHasExecutedCache ()->insertUnexecutedRange (ownerExecutable->sourceID (), unlinkedExecutable->typeProfilingStartOffset (), unlinkedExecutable->typeProfilingEndOffset ());
411411 m_functionDecls[i].set (vm, this , unlinkedExecutable->link (vm, topLevelExecutable, ownerExecutable->source (), WTF::nullopt , NoIntrinsic, ownerExecutable->isInsideOrdinaryFunction ()));
412412 }
413413
414- m_functionExprs = RefCountedArray <WriteBarrier<FunctionExecutable>>(unlinkedCodeBlock->numberOfFunctionExprs ());
414+ m_functionExprs = FixedVector <WriteBarrier<FunctionExecutable>>(unlinkedCodeBlock->numberOfFunctionExprs ());
415415 for (size_t count = unlinkedCodeBlock->numberOfFunctionExprs (), i = 0 ; i < count; ++i) {
416416 UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionExpr (i);
417417 if (shouldUpdateFunctionHasExecutedCache)
@@ -887,7 +887,7 @@ CodeBlock::~CodeBlock()
887887#endif // ENABLE(JIT)
888888}
889889
890- void CodeBlock::setConstantRegisters (const RefCountedArray <WriteBarrier<Unknown>>& constants, const RefCountedArray <SourceCodeRepresentation>& constantsSourceCodeRepresentation, ScriptExecutable* topLevelExecutable)
890+ void CodeBlock::setConstantRegisters (const FixedVector <WriteBarrier<Unknown>>& constants, const FixedVector <SourceCodeRepresentation>& constantsSourceCodeRepresentation, ScriptExecutable* topLevelExecutable)
891891{
892892 VM& vm = *m_vm;
893893 auto scope = DECLARE_THROW_SCOPE (vm);
@@ -949,7 +949,7 @@ void CodeBlock::setNumParameters(int newValue)
949949{
950950 m_numParameters = newValue;
951951
952- m_argumentValueProfiles = RefCountedArray <ValueProfile>(Options::useJIT () ? newValue : 0 );
952+ m_argumentValueProfiles = FixedVector <ValueProfile>(Options::useJIT () ? newValue : 0 );
953953}
954954
955955CodeBlock* CodeBlock::specialOSREntryBlockOrNull ()
@@ -1754,7 +1754,7 @@ CallLinkInfo* CodeBlock::getCallLinkInfoForBytecodeIndex(BytecodeIndex index)
17541754 return nullptr ;
17551755}
17561756
1757- void CodeBlock::setRareCaseProfiles (RefCountedArray <RareCaseProfile>&& rareCaseProfiles)
1757+ void CodeBlock::setRareCaseProfiles (FixedVector <RareCaseProfile>&& rareCaseProfiles)
17581758{
17591759 ConcurrentJSLocker locker (m_lock);
17601760 ensureJITData (locker).m_rareCaseProfiles = WTFMove (rareCaseProfiles);
@@ -3381,7 +3381,7 @@ void CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler()
33813381{
33823382 if (!unlinkedCodeBlock ()->hasOpProfileControlFlowBytecodeOffsets ())
33833383 return ;
3384- const RefCountedArray <InstructionStream::Offset>& bytecodeOffsets = unlinkedCodeBlock ()->opProfileControlFlowBytecodeOffsets ();
3384+ const FixedVector <InstructionStream::Offset>& bytecodeOffsets = unlinkedCodeBlock ()->opProfileControlFlowBytecodeOffsets ();
33853385 for (size_t i = 0 , offsetsLength = bytecodeOffsets.size (); i < offsetsLength; i++) {
33863386 // Because op_profile_control_flow is emitted at the beginning of every basic block, finding
33873387 // the next op_profile_control_flow will give us the text range of a single basic block.
0 commit comments