From 284837daa07b29d6a63a748544a90b1f5842ac5c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 10 Sep 2012 19:10:20 +0200 Subject: Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073) New snapshot --- Source/JavaScriptCore/dfg/DFGArrayMode.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'Source/JavaScriptCore/dfg/DFGArrayMode.cpp') 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; -- cgit v1.2.1