From be770ca621f6463339b7d15be088e1b9acd851e5 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Thu, 30 Mar 2017 15:27:58 +0300 Subject: Import WebKit commit 13ac532967b6ac2d18d6fc4ea72c4ca35eccff20 Change-Id: I12a5c8f98aeaac1b542ce20c0ff297c57b5d84d1 Reviewed-by: Konstantin Tokarev --- Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Source/JavaScriptCore') 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. -- cgit v1.2.1