Chromium Code Reviews
        
  DescriptionGet rid of old code for union/intersection in HType.
Introduce the concept of an empty type mask and use it to represent
both truly non-nullable empty masks (conflicting) and nullable 
empty masks (null).
Here are the differences (old ==> new) between the output of the union
and intersection operations when running all our tests:
Unchecked
=========
intersection(BoundedType(mask=[null|exact=JSExtendableArray]), indexable) :: readable array ==> extendable array
intersection(BoundedType(mask=[null|exact=JSFixedArray]), indexable) :: readable array ==> fixed array
intersection(BoundedType(mask=[null|exact=JSFixedArray]), mutable array) :: mutable array ==> fixed array
intersection(BoundedType(mask=[subclass=Object]), null type) :: null type ==> conflicting
intersection(BoundedType(mask=[subclass=Object]), String or null) :: String or null ==> String
intersection(BoundedType(mask=[subclass=Object]), unknown) :: unknown ==> BoundedType(mask=[subclass=Object])
intersection(BoundedType(mask=[subtype=Map]), unknown) :: BoundedType(mask=[subtype=Map]) ==> conflicting
intersection(unknown, BoundedType(mask=[subtype=Map])) :: BoundedType(mask=[subtype=Map]) ==> conflicting
intersection(unknown, BoundedType(mask=[subtype=SendPortSync])) :: BoundedType(mask=[subtype=SendPortSync]) ==> conflicting
union(integer or null, String) :: unknown ==> BoundedType(mask=[null|subtype=Comparable])
union(integer, String) :: unknown ==> BoundedType(mask=[subtype=Comparable])
union(null type, BoundedType(mask=[exact=Function])) :: unknown ==> BoundedType(mask=[null|exact=Function])
union(null type, BoundedType(mask=[exact=HashMap])) :: unknown ==> BoundedType(mask=[null|exact=HashMap])
union(null type, BoundedType(mask=[exact=_NativeJsSendPort])) :: unknown ==> BoundedType(mask=[null|exact=_NativeJsSendPort])
union(readable array, BoundedType(mask=[subclass=Iterable])) :: unknown ==> BoundedType(mask=[subtype=Iterable])
Checked
=======
intersection(BoundedType(mask=[null|exact=JSExtendableArray]), indexable) :: readable array ==> extendable array
intersection(BoundedType(mask=[null|exact=JSFixedArray]), indexable) :: readable array ==> fixed array
intersection(BoundedType(mask=[null|exact=JSFixedArray]), mutable array) :: mutable array ==> fixed array
intersection(BoundedType(mask=[null|subtype=_FutureErrorTest]), unknown) :: BoundedType(mask=[null|subtype=_FutureErrorTest]) ==> null type
intersection(BoundedType(mask=[null|subtype=_FutureOnError]), unknown) :: BoundedType(mask=[null|subtype=_FutureOnError]) ==> null type
intersection(BoundedType(mask=[subclass=Object]), null type) :: null type ==> conflicting
intersection(BoundedType(mask=[subclass=Object]), unknown) :: unknown ==> BoundedType(mask=[subclass=Object])
intersection(BoundedType(mask=[subtype=Map]), unknown) :: BoundedType(mask=[subtype=Map]) ==> conflicting
intersection(unknown, BoundedType(mask=[null|subtype=_CheckExceptionFn])) :: BoundedType(mask=[null|subtype=_CheckExceptionFn]) ==> null type
intersection(unknown, BoundedType(mask=[null|subtype=Function])) :: BoundedType(mask=[null|subtype=Function]) ==> null type
intersection(unknown, BoundedType(mask=[null|subtype=Object])) :: BoundedType(mask=[null|subtype=Object]) ==> unknown
intersection(unknown, BoundedType(mask=[null|subtype=void])) :: BoundedType(mask=[null|subtype=void]) ==> null type
intersection(unknown, BoundedType(mask=[subtype=Map])) :: BoundedType(mask=[subtype=Map]) ==> conflicting
intersection(unknown, BoundedType(mask=[subtype=SendPortSync])) :: BoundedType(mask=[subtype=SendPortSync]) ==> conflicting
union(integer or null, String) :: unknown ==> BoundedType(mask=[null|subtype=Comparable])
union(integer, String) :: unknown ==> BoundedType(mask=[subtype=Comparable])
union(null type, BoundedType(mask=[exact=HashMap])) :: unknown ==> BoundedType(mask=[null|exact=HashMap])
union(null type, BoundedType(mask=[exact=_NativeJsSendPort])) :: unknown ==> BoundedType(mask=[null|exact=_NativeJsSendPort])
union(number or null, BoundedType(mask=[null|subtype=Comparable])) :: unknown ==> BoundedType(mask=[null|subtype=Comparable])
union(number or null, String or null) :: unknown ==> BoundedType(mask=[null|subtype=Comparable])
union(readable array, BoundedType(mask=[subclass=Iterable])) :: unknown ==> BoundedType(mask=[subtype=Iterable])
union(String or null, number or null) :: unknown ==> BoundedType(mask=[null|subtype=Comparable])
union(String or null, number) :: unknown ==> BoundedType(mask=[null|subtype=Comparable])
R=ngeoffray@google.com
BUG=
Committed: https://code.google.com/p/dart/source/detail?r=19838
   
  Patch Set 1 #Patch Set 2 : Remove unused factory methods. #
      Total comments: 6
      
     
  
  
  
  Patch Set 3 : Add comments. #Messages
    Total messages: 6 (0 generated)
     
  
  
       |