diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2017-03-30 15:27:58 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-03-31 10:31:00 +0000 |
commit | be770ca621f6463339b7d15be088e1b9acd851e5 (patch) | |
tree | 1a843019f693c100adea3f3acd47999f3eba2796 /Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp | |
parent | eaaf1391d58f17bde794d6c8634e092209898941 (diff) | |
download | qtwebkit-be770ca621f6463339b7d15be088e1b9acd851e5.tar.gz |
Import WebKit commit 13ac532967b6ac2d18d6fc4ea72c4ca35eccff20
Change-Id: I12a5c8f98aeaac1b542ce20c0ff297c57b5d84d1
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
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. |