diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/dfg/DFGArrayMode.cpp | |
parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
download | qtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGArrayMode.cpp')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGArrayMode.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArrayMode.cpp b/Source/JavaScriptCore/dfg/DFGArrayMode.cpp index ec4edc2e8..cd3944fb4 100644 --- a/Source/JavaScriptCore/dfg/DFGArrayMode.cpp +++ b/Source/JavaScriptCore/dfg/DFGArrayMode.cpp @@ -51,6 +51,11 @@ Array::Mode fromObserved(ArrayModes modes, bool makeSafe) } } +Array::Mode fromStructure(Structure* structure, bool makeSafe) +{ + return fromObserved(arrayModeFromStructure(structure), makeSafe); +} + Array::Mode refineArrayMode(Array::Mode arrayMode, SpeculatedType base, SpeculatedType index) { if (!base || !index) { @@ -64,17 +69,8 @@ Array::Mode refineArrayMode(Array::Mode arrayMode, SpeculatedType base, Speculat if (!isInt32Speculation(index) || !isCellSpeculation(base)) return Array::Generic; - // Pass through any array modes that would have been decided by the array profile, since - // the predictions of the inputs will not tell us anything useful that we didn't already - // get from the array profile. - switch (arrayMode) { - case Array::ForceExit: - case Array::JSArray: - case Array::JSArrayOutOfBounds: + if (arrayMode != Array::Undecided) return arrayMode; - default: - break; - } if (isStringSpeculation(base)) return Array::String; |