diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-24 17:03:20 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-24 17:03:20 +0200 |
commit | 08d4a74d56ca431877819fc4566e27eafe150342 (patch) | |
tree | ebd8530838ab390c015c6b7e659a22852c1663ae /Source/JavaScriptCore/bytecode | |
parent | 1de6cd4794bbd5a52189384189a2b8df1848b39b (diff) | |
download | qtwebkit-08d4a74d56ca431877819fc4566e27eafe150342.tar.gz |
Imported WebKit commit 0fbd41c4e13f5a190faf160bf993eee614e6e18e (http://svn.webkit.org/repository/webkit/trunk@123477)
New snapshot that adapts to latest Qt API changes
Diffstat (limited to 'Source/JavaScriptCore/bytecode')
-rw-r--r-- | Source/JavaScriptCore/bytecode/CodeBlock.cpp | 6 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/GetByIdStatus.cpp | 11 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/GetByIdStatus.h | 4 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp | 2 |
4 files changed, 17 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp index 363efa28a..5374a537a 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp @@ -255,9 +255,9 @@ static void dumpStructure(const char* name, ExecState* exec, Structure* structur dataLog("%s = %p", name, structure); - size_t offset = structure->get(exec->globalData(), ident); - if (offset != notFound) - dataLog(" (offset = %lu)", static_cast<unsigned long>(offset)); + PropertyOffset offset = structure->get(exec->globalData(), ident); + if (offset != invalidOffset) + dataLog(" (offset = %d)", offset); } #endif diff --git a/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp b/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp index cb3e8e8b6..0df0f44e7 100644 --- a/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp +++ b/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp @@ -50,6 +50,8 @@ GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned JSCell* specificValue; PropertyOffset offset = structure->get( *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + if (structure->isDictionary()) + specificValue = 0; if (!isValidOffset(offset)) return GetByIdStatus(NoInformation, false); @@ -75,12 +77,13 @@ void GetByIdStatus::computeForChain(GetByIdStatus& result, CodeBlock* profiledBl Structure* currentStructure = structure; JSObject* currentObject = 0; for (unsigned i = 0; i < result.m_chain.size(); ++i) { + ASSERT(!currentStructure->isDictionary()); currentObject = asObject(currentStructure->prototypeForLookup(profiledBlock)); currentStructure = result.m_chain[i]; if (currentObject->structure() != currentStructure) return; } - + ASSERT(currentObject); unsigned attributesIgnored; @@ -88,6 +91,8 @@ void GetByIdStatus::computeForChain(GetByIdStatus& result, CodeBlock* profiledBl result.m_offset = currentStructure->get( *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + if (currentStructure->isDictionary()) + specificValue = 0; if (!isValidOffset(result.m_offset)) return; @@ -155,6 +160,8 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec JSCell* specificValue; result.m_offset = structure->get( *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + if (structure->isDictionary()) + specificValue = 0; if (isValidOffset(result.m_offset)) { result.m_structureSet.add(structure); @@ -178,6 +185,8 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec JSCell* specificValue; PropertyOffset myOffset = structure->get( *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + if (structure->isDictionary()) + specificValue = 0; if (!isValidOffset(myOffset)) { result.m_offset = invalidOffset; diff --git a/Source/JavaScriptCore/bytecode/GetByIdStatus.h b/Source/JavaScriptCore/bytecode/GetByIdStatus.h index 297ec335f..f38a19e8c 100644 --- a/Source/JavaScriptCore/bytecode/GetByIdStatus.h +++ b/Source/JavaScriptCore/bytecode/GetByIdStatus.h @@ -53,7 +53,7 @@ public: GetByIdStatus( State state, bool wasSeenInJIT, const StructureSet& structureSet = StructureSet(), - size_t offset = invalidOffset, JSValue specificValue = JSValue(), Vector<Structure*> chain = Vector<Structure*>()) + PropertyOffset offset = invalidOffset, JSValue specificValue = JSValue(), Vector<Structure*> chain = Vector<Structure*>()) : m_state(state) , m_structureSet(structureSet) , m_chain(chain) @@ -61,7 +61,7 @@ public: , m_offset(offset) , m_wasSeenInJIT(wasSeenInJIT) { - ASSERT((state == Simple) == (offset != notFound)); + ASSERT((state == Simple) == (offset != invalidOffset)); } static GetByIdStatus computeFor(CodeBlock*, unsigned bytecodeIndex, Identifier&); diff --git a/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp b/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp index 4afee248d..ddc7700c6 100644 --- a/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp +++ b/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp @@ -39,6 +39,8 @@ static ResolveGlobalStatus computeForStructure(CodeBlock* codeBlock, Structure* JSCell* specificValue; PropertyOffset offset = structure->get( *codeBlock->globalData(), identifier, attributesIgnored, specificValue); + if (structure->isDictionary()) + specificValue = 0; if (!isValidOffset(offset)) return ResolveGlobalStatus(); |