[INFER] Fix disabled hoisting on x.length checks.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 17 Apr 2011 07:36:55 -0700
changeset 75722 ac0989a03bf1fd0c5157207f3288016de0a77d9c
parent 75721 f01b61fd6f49a216a0a748f25fa5a16f321b9b8d
child 75723 9d469a96c49613ec8fa26353582d353f72fc0786
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
[INFER] Fix disabled hoisting on x.length checks.
js/src/methodjit/LoopState.cpp
--- a/js/src/methodjit/LoopState.cpp
+++ b/js/src/methodjit/LoopState.cpp
@@ -993,17 +993,17 @@ LoopState::analyzeLoopTest()
 
     if (lhs == UNASSIGNED)
         return;
 
     /* Only consider comparisons on known integers. */
     types::TypeSet *lhsTypes = cc.getTypeSet(lhs);
     if (!lhsTypes || lhsTypes->getKnownTypeTag(cx) != JSVAL_TYPE_INT32)
         return;
-    if (rhs != UNASSIGNED) {
+    if (rhs != UNASSIGNED && !rhsLength) {
         types::TypeSet *rhsTypes = cc.getTypeSet(rhs);
         if (!rhsTypes || rhsTypes->getKnownTypeTag(cx) != JSVAL_TYPE_INT32)
             return;
     }
 
     int32 constant;
     if (!SafeSub(rhsConstant, lhsConstant, &constant))
         return;