From a8b245d5738630728464099d142ac7e4f9498c9f Mon Sep 17 00:00:00 2001 From: Brian Hackett Date: Fri, 26 Apr 2013 17:56:38 -0600 Subject: [PATCH] Bug 864101 - Improve precision of TypeSetIncludes, r=dvander. --- js/src/ion/IonBuilder.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/src/ion/IonBuilder.cpp b/js/src/ion/IonBuilder.cpp index 055a0b8a1f5..826c2ce8ff1 100644 --- a/js/src/ion/IonBuilder.cpp +++ b/js/src/ion/IonBuilder.cpp @@ -5856,9 +5856,6 @@ IonBuilder::jsop_getgname(HandlePropertyName name) 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: @@ -5870,10 +5867,10 @@ ion::TypeSetIncludes(types::TypeSet *types, MIRType input, types::TypeSet *input 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");