Bug 844305 - Check that excluded type are included before generating guards. r=bhackett
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Mon, 25 Feb 2013 16:27:51 -0800
changeset 123047 9c97e01125cc15fc83ec327bdc29980fc7d8f9bf
parent 123046 729d41f6743b5e2711d530cc413f7499babb60a7
child 123048 018649ef8ce6b1404497be8c45311f9ef0f4b3be
push id24372
push useremorley@mozilla.com
push dateWed, 27 Feb 2013 13:22:59 +0000
treeherdermozilla-central@0a91da5f5eab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs844305
milestone22.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
Bug 844305 - Check that excluded type are included before generating guards. r=bhackett
js/src/ion/IonBuilder.cpp
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -3026,19 +3026,17 @@ IonBuilder::addTypeBarrier(uint32_t i, C
         ins = callinfo.thisArg();
         callerObs = callinfo.thisType();
     } else {
         ins = callinfo.getArg(i - 1);
         callerObs = callinfo.getArgType(i - 1);
     }
 
     while (excluded) {
-        if (excluded->target == calleeObs) {
-            JS_ASSERT(callerObs->hasType(excluded->type));
-
+        if (excluded->target == calleeObs && callerObs->hasType(excluded->type)) {
             if (excluded->type == types::Type::DoubleType() &&
                 calleeObs->hasType(types::Type::Int32Type())) {
                 // The double type also implies int32, so this implies that
                 // double should be coerced into int if possible, and other
                 // types should remain.
 
                 JSValueType callerType = callerObs->getKnownTypeTag();
                 if (callerType == JSVAL_TYPE_DOUBLE) {