Bug 864101 - Improve precision of TypeSetIncludes, r=dvander.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 26 Apr 2013 17:56:38 -0600
changeset 130130 c94d73b1970ffbff8dfff325b643f692f3da2708
parent 130129 ab534b63501a84782d2ee98bd6e66ece9220f593
child 130131 4ad22d42b4f56b49959f6114f3da0fdfcd58152a
push id24599
push userryanvm@gmail.com
push dateSun, 28 Apr 2013 01:24:06 +0000
treeherdermozilla-central@9d8977cbbfc6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs864101
milestone23.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 864101 - Improve precision of TypeSetIncludes, r=dvander.
js/src/ion/IonBuilder.cpp
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -5851,34 +5851,31 @@ IonBuilder::jsop_getgname(HandleProperty
     current->push(load);
     return pushTypeBarrier(load, types, barrier);
 }
 
 // Whether 'types' includes all possible values represented by input/inputTypes.
 bool
 ion::TypeSetIncludes(types::TypeSet *types, MIRType input, types::TypeSet *inputTypes)
 {
-    if (inputTypes)
-        return inputTypes->isSubset(types);
-
     switch (input) {
       case MIRType_Undefined:
       case MIRType_Null:
       case MIRType_Boolean:
       case MIRType_Int32:
       case MIRType_Double:
       case MIRType_String:
       case MIRType_Magic:
         return types->hasType(types::Type::PrimitiveType(ValueTypeFromMIRType(input)));
 
       case MIRType_Object:
-        return types->unknownObject();
+        return types->unknownObject() || (inputTypes && inputTypes->isSubset(types));
 
       case MIRType_Value:
-        return types->unknown();
+        return types->unknown() || (inputTypes && inputTypes->isSubset(types));
 
       default:
         JS_NOT_REACHED("Bad input type");
         return false;
     }
 }
 
 bool