diff options
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp index 2f3f12d6c..6aefe61e3 100644 --- a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp +++ b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp @@ -3739,6 +3739,8 @@ bool ByteCodeParser::parseBlock(unsigned limit) Node* base = get(VirtualRegister(currentInstruction[2].u.operand)); Node* property = get(VirtualRegister(currentInstruction[3].u.operand)); bool compiledAsGetById = false; + GetByIdStatus getByIdStatus; + unsigned identifierNumber = 0; { ConcurrentJITLocker locker(m_inlineStackTop->m_profiledBlock->m_lock); ByValInfo* byValInfo = m_inlineStackTop->m_byValInfos.get(CodeOrigin(currentCodeOrigin().bytecodeIndex)); @@ -3746,20 +3748,20 @@ bool ByteCodeParser::parseBlock(unsigned limit) // At that time, there is no information. if (byValInfo && byValInfo->stubInfo && !byValInfo->tookSlowPath && !m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadIdent)) { compiledAsGetById = true; - unsigned identifierNumber = m_graph.identifiers().ensure(byValInfo->cachedId.impl()); + identifierNumber = m_graph.identifiers().ensure(byValInfo->cachedId.impl()); UniquedStringImpl* uid = m_graph.identifiers()[identifierNumber]; addToGraph(CheckIdent, OpInfo(uid), property); - GetByIdStatus getByIdStatus = GetByIdStatus::computeForStubInfo( + getByIdStatus = GetByIdStatus::computeForStubInfo( locker, m_inlineStackTop->m_profiledBlock, byValInfo->stubInfo, currentCodeOrigin(), uid); - - handleGetById(currentInstruction[1].u.operand, prediction, base, identifierNumber, getByIdStatus); } } - if (!compiledAsGetById) { + if (compiledAsGetById) + handleGetById(currentInstruction[1].u.operand, prediction, base, identifierNumber, getByIdStatus); + else { ArrayMode arrayMode = getArrayMode(currentInstruction[4].u.arrayProfile, Array::Read); Node* getByVal = addToGraph(GetByVal, OpInfo(arrayMode.asWord()), OpInfo(prediction), base, property); m_exitOK = false; // GetByVal must be treated as if it clobbers exit state, since FixupPhase may make it generic. |