diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-14 16:29:47 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-14 16:29:47 +0200 |
commit | d0424a769059c84ae20beb3c217812792ea6726b (patch) | |
tree | 6f94a5c3db8c52c6694ee56498542a6c35417350 /Source/JavaScriptCore/dfg/DFGArrayMode.cpp | |
parent | 88a04ac016f57c2d78e714682445dff2e7db4ade (diff) | |
download | qtwebkit-d0424a769059c84ae20beb3c217812792ea6726b.tar.gz |
Imported WebKit commit 37c5e5041d39a14ea0d429a77ebd352e4bd26516 (http://svn.webkit.org/repository/webkit/trunk@128608)
New snapshot that enables WebKit2 build on Windows (still some bugs) and allows for WebKit to be built with qmake && make
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGArrayMode.cpp')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGArrayMode.cpp | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArrayMode.cpp b/Source/JavaScriptCore/dfg/DFGArrayMode.cpp index cd3944fb4..eda578205 100644 --- a/Source/JavaScriptCore/dfg/DFGArrayMode.cpp +++ b/Source/JavaScriptCore/dfg/DFGArrayMode.cpp @@ -40,8 +40,12 @@ Array::Mode fromObserved(ArrayModes modes, bool makeSafe) switch (modes) { case 0: return Array::Undecided; - case IsJSArray: - return makeSafe ? Array::JSArrayOutOfBounds : Array::JSArray; + case asArrayModes(NonArrayWithArrayStorage): + return makeSafe ? Array::ArrayStorageOutOfBounds : Array::ArrayStorage; + case asArrayModes(ArrayWithArrayStorage): + return makeSafe ? Array::ArrayWithArrayStorageOutOfBounds : Array::ArrayWithArrayStorage; + case asArrayModes(NonArrayWithArrayStorage) | asArrayModes(ArrayWithArrayStorage): + return makeSafe ? Array::PossiblyArrayWithArrayStorageOutOfBounds : Array::PossiblyArrayWithArrayStorage; default: // We know that this is possibly a kind of array for which, though there is no // useful data in the array profile, we may be able to extract useful data from @@ -120,10 +124,14 @@ bool modeAlreadyChecked(AbstractValue& value, Array::Mode arrayMode) case Array::String: return isStringSpeculation(value.m_type); - case Array::JSArray: - case Array::JSArrayOutOfBounds: + case NON_ARRAY_ARRAY_STORAGE_MODES: return value.m_currentKnownStructure.hasSingleton() - && value.m_currentKnownStructure.singleton()->classInfo() == &JSArray::s_info; + && (value.m_currentKnownStructure.singleton()->indexingType() & HasArrayStorage); + + case ARRAY_WITH_ARRAY_STORAGE_MODES: + return value.m_currentKnownStructure.hasSingleton() + && (value.m_currentKnownStructure.singleton()->indexingType() & HasArrayStorage) + && (value.m_currentKnownStructure.singleton()->indexingType() & IsArray); case Array::Arguments: return isArgumentsSpeculation(value.m_type); @@ -174,10 +182,18 @@ const char* modeToString(Array::Mode mode) return "ForceExit"; case Array::String: return "String"; - case Array::JSArray: - return "JSArray"; - case Array::JSArrayOutOfBounds: - return "JSArrayOutOfBounds"; + case Array::ArrayStorage: + return "ArrayStorage"; + case Array::ArrayStorageOutOfBounds: + return "ArrayStorageOutOfBounds"; + case Array::ArrayWithArrayStorage: + return "ArrayWithArrayStorage"; + case Array::ArrayWithArrayStorageOutOfBounds: + return "ArrayWithArrayStorageOutOfBounds"; + case Array::PossiblyArrayWithArrayStorage: + return "PossiblyArrayWithArrayStorage"; + case Array::PossiblyArrayWithArrayStorageOutOfBounds: + return "PossiblyArrayWithArrayStorageOutOfBounds"; case Array::Arguments: return "Arguments"; case Array::Int8Array: |