Bug 1298410. Remove support for IDL arrays, since those are not a thing anymore. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 01 Sep 2016 21:31:23 -0400
changeset 312372 b7e5426f358a1ffb9ca6ac458a8537ba794ea52a
parent 312371 6d30a609081db505484615065263515faa225ca1
child 312373 c2bacde849ce570486fe81bdd370038ff86d224d
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1298410
milestone51.0a1
Bug 1298410. Remove support for IDL arrays, since those are not a thing anymore. r=peterv
dom/bindings/Codegen.py
dom/bindings/parser/WebIDL.py
dom/bindings/parser/tests/test_array.py
dom/bindings/parser/tests/test_array_of_interface.py
dom/bindings/parser/tests/test_arraybuffer.py
dom/bindings/parser/tests/test_attr.py
dom/bindings/parser/tests/test_distinguishability.py
dom/bindings/parser/tests/test_method.py
dom/bindings/parser/tests/test_nullable_equivalency.py
dom/bindings/parser/tests/test_union.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -4474,19 +4474,16 @@ def getJSToNativeConversionInfo(type, de
 
     def incrementNestingLevel():
         if nestingLevel is "":
             return 1
         return nestingLevel + 1
 
     assert not (isEnforceRange and isClamp)  # These are mutually exclusive
 
-    if type.isArray():
-        raise TypeError("Can't handle array arguments yet")
-
     if type.isSequence():
         assert not isEnforceRange and not isClamp
 
         if failureCode is None:
             notSequence = ('ThrowErrorMessage(cx, MSG_NOT_SEQUENCE, "%s");\n'
                            "%s" % (firstCap(sourceDescription), exceptionCode))
         else:
             notSequence = failureCode
@@ -4749,26 +4746,26 @@ def getJSToNativeConversionInfo(type, de
                     CGGeneric("(failed = !%s.TrySetTo%s(cx, ${val}, tryNext, ${passedToJSImpl})) || !tryNext" %
                               (unionArgumentObj, name)))
                 names.append(name)
             interfaceObject = CGWrapper(CGList(interfaceObject, " ||\n"),
                                         pre="done = ", post=";\n\n", reindent=True)
         else:
             interfaceObject = None
 
-        arrayObjectMemberTypes = filter(lambda t: t.isArray() or t.isSequence(), memberTypes)
-        if len(arrayObjectMemberTypes) > 0:
-            assert len(arrayObjectMemberTypes) == 1
-            name = getUnionMemberName(arrayObjectMemberTypes[0])
-            arrayObject = CGGeneric(
+        sequenceObjectMemberTypes = filter(lambda t: t.isSequence(), memberTypes)
+        if len(sequenceObjectMemberTypes) > 0:
+            assert len(sequenceObjectMemberTypes) == 1
+            name = getUnionMemberName(sequenceObjectMemberTypes[0])
+            sequenceObject = CGGeneric(
                 "done = (failed = !%s.TrySetTo%s(cx, ${val}, tryNext, ${passedToJSImpl})) || !tryNext;\n" %
                 (unionArgumentObj, name))
             names.append(name)
         else:
-            arrayObject = None
+            sequenceObject = None
 
         dateObjectMemberTypes = filter(lambda t: t.isDate(), memberTypes)
         if len(dateObjectMemberTypes) > 0:
             assert len(dateObjectMemberTypes) == 1
             memberType = dateObjectMemberTypes[0]
             name = getUnionMemberName(memberType)
             dateObject = CGGeneric("%s.SetTo%s(cx, ${val});\n"
                                    "done = true;\n" % (unionArgumentObj, name))
@@ -4820,26 +4817,26 @@ def getJSToNativeConversionInfo(type, de
             object = CGGeneric("if (!%s.SetToObject(cx, &${val}.toObject(), ${passedToJSImpl})) {\n"
                                "%s"
                                "}\n"
                                "done = true;\n" % (unionArgumentObj, indent(exceptionCode)))
             names.append(objectMemberTypes[0].name)
         else:
             object = None
 
-        hasObjectTypes = interfaceObject or arrayObject or dateObject or callbackObject or object or mozMapObject
+        hasObjectTypes = interfaceObject or sequenceObject or dateObject or callbackObject or object or mozMapObject
         if hasObjectTypes:
             # "object" is not distinguishable from other types
-            assert not object or not (interfaceObject or arrayObject or dateObject or callbackObject or mozMapObject)
-            if arrayObject or dateObject or callbackObject:
-                # An object can be both an array object and a callback or
+            assert not object or not (interfaceObject or sequenceObject or dateObject or callbackObject or mozMapObject)
+            if sequenceObject or dateObject or callbackObject:
+                # An object can be both an sequence object and a callback or
                 # dictionary, but we shouldn't have both in the union's members
                 # because they are not distinguishable.
-                assert not (arrayObject and callbackObject)
-                templateBody = CGElseChain([arrayObject, dateObject, callbackObject])
+                assert not (sequenceObject and callbackObject)
+                templateBody = CGElseChain([sequenceObject, dateObject, callbackObject])
             else:
                 templateBody = None
             if interfaceObject:
                 assert not object
                 if templateBody:
                     templateBody = CGIfWrapper(templateBody, "!done")
                 templateBody = CGList([interfaceObject, templateBody])
             else:
@@ -6235,19 +6232,16 @@ def getWrapTemplateForType(type, descrip
             """,
             wrapCall=wrapCall,
             failureCode=failureCode,
             successCode=successCode)
 
     if type is None or type.isVoid():
         return (setUndefined(), True)
 
-    if type.isArray():
-        raise TypeError("Can't handle array return values yet")
-
     if (type.isSequence() or type.isMozMap()) and type.nullable():
         # These are both wrapped in Nullable<>
         recTemplate, recInfall = getWrapTemplateForType(type.inner, descriptorProvider,
                                                         "%s.Value()" % result, successCode,
                                                         returnsNewObject, exceptionCode,
                                                         typedArraysAreStructs)
         code = fill(
             """
@@ -6647,17 +6641,17 @@ def typeNeedsScopeObject(type, retVal=Fa
                              lambda t: leafTypeNeedsScopeObject(t, retVal))
 
 
 def typeMatchesLambda(type, func):
     if type is None:
         return False
     if type.nullable():
         return typeMatchesLambda(type.inner, func)
-    if type.isSequence() or type.isMozMap() or type.isArray():
+    if type.isSequence() or type.isMozMap():
         return typeMatchesLambda(type.inner, func)
     if type.isUnion():
         return any(typeMatchesLambda(t, func) for t in
                    type.unroll().flatMemberTypes)
     if type.isDictionary():
         return dictionaryMatchesLambda(type.inner, func)
     return func(type)
 
@@ -7833,33 +7827,32 @@ class CGMethodCall(CGThing):
             # And all the overloads that take callbacks
             objectSigs.extend(s for s in possibleSignatures
                               if distinguishingType(s).isCallback())
 
             # And all the overloads that take sequences
             objectSigs.extend(s for s in possibleSignatures
                               if distinguishingType(s).isSequence())
 
-            # Now append all the overloads that take an array or dictionary or
-            # callback interface or MozMap.  There should be only one of these!
+            # Now append all the overloads that take a dictionary or callback
+            # interface or MozMap.  There should be only one of these!
             genericObjectSigs = [
                 s for s in possibleSignatures
-                if (distinguishingType(s).isArray() or
-                    distinguishingType(s).isDictionary() or
+                if (distinguishingType(s).isDictionary() or
                     distinguishingType(s).isMozMap() or
                     distinguishingType(s).isCallbackInterface())]
             assert len(genericObjectSigs) <= 1
             objectSigs.extend(genericObjectSigs)
 
             # There might be more than one thing in objectSigs; we need to check
             # which ones we unwrap to.
             if len(objectSigs) > 0:
                 # Here it's enough to guard on our argument being an object. The
                 # code for unwrapping non-callback interfaces, typed arrays,
-                # sequences, arrays, and Dates will just bail out and move on to
+                # sequences, and Dates will just bail out and move on to
                 # the next overload if the object fails to unwrap correctly,
                 # while "object" accepts any object anyway.  We could even not
                 # do the isObject() check up front here, but in cases where we
                 # have multiple object overloads it makes sense to do it only
                 # once instead of for each overload.  That will also allow the
                 # unwrapping test to skip having to do codegen for the
                 # null-or-undefined case, which we already handled above.
                 caseBody.append(CGGeneric("if (%s.isObject()) {\n" %
@@ -9081,19 +9074,16 @@ class CGMemberJITInfo(CGThing):
     @staticmethod
     def getJSReturnTypeTag(t):
         if t.nullable():
             # Sometimes it might return null, sometimes not
             return "JSVAL_TYPE_UNKNOWN"
         if t.isVoid():
             # No return, every time
             return "JSVAL_TYPE_UNDEFINED"
-        if t.isArray():
-            # No idea yet
-            assert False
         if t.isSequence():
             return "JSVAL_TYPE_OBJECT"
         if t.isMozMap():
             return "JSVAL_TYPE_OBJECT"
         if t.isGeckoInterface():
             return "JSVAL_TYPE_OBJECT"
         if t.isString():
             return "JSVAL_TYPE_STRING"
@@ -9159,19 +9149,16 @@ class CGMemberJITInfo(CGThing):
         return "JSVAL_TYPE_UNKNOWN"
 
     @staticmethod
     def getJSArgType(t):
         assert not t.isVoid()
         if t.nullable():
             # Sometimes it might return null, sometimes not
             return "JSJitInfo::ArgType(JSJitInfo::Null | %s)" % CGMemberJITInfo.getJSArgType(t.inner)
-        if t.isArray():
-            # No idea yet
-            assert False
         if t.isSequence():
             return "JSJitInfo::Object"
         if t.isGeckoInterface():
             return "JSJitInfo::Object"
         if t.isString():
             return "JSJitInfo::String"
         if t.isEnum():
             return "JSJitInfo::String"
@@ -9350,19 +9337,16 @@ class CGEnum(CGThing):
 def getUnionAccessorSignatureType(type, descriptorProvider):
     """
     Returns the types that are used in the getter and setter signatures for
     union types
     """
     # Flat member types have already unwrapped nullables.
     assert not type.nullable()
 
-    if type.isArray():
-        raise TypeError("Can't handle array arguments yet")
-
     if type.isSequence() or type.isMozMap():
         if type.isSequence():
             wrapperType = "Sequence"
         else:
             wrapperType = "MozMap"
         # We don't use the returned template here, so it's OK to just pass no
         # sourceDescription.
         elementInfo = getJSToNativeConversionInfo(type.inner,
@@ -13412,17 +13396,17 @@ class CGBindingRoot(CGThing):
         # Do codegen for all the dictionaries.  We have to be a bit careful
         # here, because we have to generate these in order from least derived
         # to most derived so that class inheritance works out.  We also have to
         # generate members before the dictionary that contains them.
 
         def getDependenciesFromType(type):
             if type.isDictionary():
                 return set([type.unroll().inner])
-            if type.isSequence() or type.isArray():
+            if type.isSequence():
                 return getDependenciesFromType(type.unroll())
             if type.isUnion():
                 return set([type.unroll()])
             return set()
 
         def getDependencies(unionTypeOrDictionary):
             if isinstance(unionTypeOrDictionary, IDLDictionary):
                 deps = set()
@@ -13791,19 +13775,16 @@ class CGNativeMember(ClassMethod):
         """
         The main work of getArgType.  Returns a string type decl, whether this
         is a const ref, as well as whether the type should be wrapped in
         Nullable as needed.
 
         isMember can be false or one of the strings "Sequence", "Variadic",
                  "MozMap"
         """
-        if type.isArray():
-            raise TypeError("Can't handle array arguments yet")
-
         if type.isSequence():
             nullable = type.nullable()
             if nullable:
                 type = type.inner
             elementType = type.inner
             argType = self.getArgType(elementType, False, "Sequence")[0]
             decl = CGTemplatedType("Sequence", argType)
             return decl.define(), True, True
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -1851,17 +1851,16 @@ class IDLDictionary(IDLObjectWithScope):
                     A list of locations that leads from the type that was passed in
                     the memberType argument, to the dictionary being validated,
                     if the boolean value in the first element is True.
 
                     None, if the boolean value in the first element is False.
             """
 
             if (memberType.nullable() or
-                memberType.isArray() or
                 memberType.isSequence() or
                 memberType.isMozMap()):
                 return typeContainsDictionary(memberType.inner, dictionary)
 
             if memberType.isDictionary():
                 if memberType.inner == dictionary:
                     return (True, [memberType.location])
 
@@ -1974,18 +1973,17 @@ class IDLType(IDLObject):
         'void',
         # Funny stuff
         'interface',
         'dictionary',
         'enum',
         'callback',
         'union',
         'sequence',
-        'mozmap',
-        'array'
+        'mozmap'
         )
 
     def __init__(self, location, name):
         IDLObject.__init__(self, location)
         self.name = name
         self.builtin = False
 
     def __eq__(self, other):
@@ -2028,19 +2026,16 @@ class IDLType(IDLObject):
         return self.name == "Void"
 
     def isSequence(self):
         return False
 
     def isMozMap(self):
         return False
 
-    def isArray(self):
-        return False
-
     def isArrayBuffer(self):
         return False
 
     def isArrayBufferView(self):
         return False
 
     def isSharedArrayBuffer(self):
         return False
@@ -2256,19 +2251,16 @@ class IDLNullableType(IDLParameterizedTy
         return False
 
     def isSequence(self):
         return self.inner.isSequence()
 
     def isMozMap(self):
         return self.inner.isMozMap()
 
-    def isArray(self):
-        return self.inner.isArray()
-
     def isArrayBuffer(self):
         return self.inner.isArrayBuffer()
 
     def isArrayBufferView(self):
         return self.inner.isArrayBufferView()
 
     def isSharedArrayBuffer(self):
         return self.inner.isSharedArrayBuffer()
@@ -2361,19 +2353,16 @@ class IDLSequenceType(IDLParameterizedTy
         return False
 
     def isVoid(self):
         return False
 
     def isSequence(self):
         return True
 
-    def isArray(self):
-        return False
-
     def isDictionary(self):
         return False
 
     def isInterface(self):
         return False
 
     def isEnum(self):
         return False
@@ -2568,116 +2557,16 @@ class IDLUnionType(IDLType):
     def hasPossiblyEmptyDictionaryType(self):
         return (self._dictionaryType is not None and
                 self._dictionaryType.inner.canBeEmpty())
 
     def _getDependentObjects(self):
         return set(self.memberTypes)
 
 
-class IDLArrayType(IDLType):
-    def __init__(self, location, parameterType):
-        assert not parameterType.isVoid()
-        if parameterType.isSequence():
-            raise WebIDLError("Array type cannot parameterize over a sequence type",
-                              [location])
-        if parameterType.isMozMap():
-            raise WebIDLError("Array type cannot parameterize over a MozMap type",
-                              [location])
-        if parameterType.isDictionary():
-            raise WebIDLError("Array type cannot parameterize over a dictionary type",
-                              [location])
-
-        IDLType.__init__(self, location, parameterType.name)
-        self.inner = parameterType
-        self.builtin = False
-
-    def __eq__(self, other):
-        return isinstance(other, IDLArrayType) and self.inner == other.inner
-
-    def __str__(self):
-        return self.inner.__str__() + "Array"
-
-    def nullable(self):
-        return False
-
-    def isPrimitive(self):
-        return False
-
-    def isString(self):
-        return False
-
-    def isByteString(self):
-        return False
-
-    def isDOMString(self):
-        return False
-
-    def isUSVString(self):
-        return False
-
-    def isVoid(self):
-        return False
-
-    def isSequence(self):
-        assert not self.inner.isSequence()
-        return False
-
-    def isArray(self):
-        return True
-
-    def isDictionary(self):
-        assert not self.inner.isDictionary()
-        return False
-
-    def isInterface(self):
-        return False
-
-    def isEnum(self):
-        return False
-
-    def tag(self):
-        return IDLType.Tags.array
-
-    def resolveType(self, parentScope):
-        assert isinstance(parentScope, IDLScope)
-        self.inner.resolveType(parentScope)
-
-    def isComplete(self):
-        return self.inner.isComplete()
-
-    def complete(self, scope):
-        self.inner = self.inner.complete(scope)
-        self.name = self.inner.name
-
-        if self.inner.isDictionary():
-            raise WebIDLError("Array type must not contain "
-                              "dictionary as element type.",
-                              [self.inner.location])
-
-        assert not self.inner.isSequence()
-
-        return self
-
-    def unroll(self):
-        return self.inner.unroll()
-
-    def isDistinguishableFrom(self, other):
-        if other.isPromise():
-            return False
-        if other.isUnion():
-            # Just forward to the union; it'll deal
-            return other.isDistinguishableFrom(self)
-        return (other.isPrimitive() or other.isString() or other.isEnum() or
-                other.isDate() or other.isNonCallbackInterface())
-
-    def _getDependentObjects(self):
-        return self.inner._getDependentObjects()
-
-
 class IDLTypedefType(IDLType):
     def __init__(self, location, innerType, name):
         IDLType.__init__(self, location, name)
         self.inner = innerType
         self.builtin = False
 
     def __eq__(self, other):
         return isinstance(other, IDLTypedefType) and self.inner == other.inner
@@ -2713,19 +2602,16 @@ class IDLTypedefType(IDLType):
         return self.inner.isVoid()
 
     def isSequence(self):
         return self.inner.isSequence()
 
     def isMozMap(self):
         return self.inner.isMozMap()
 
-    def isArray(self):
-        return self.inner.isArray()
-
     def isDictionary(self):
         return self.inner.isDictionary()
 
     def isArrayBuffer(self):
         return self.inner.isArrayBuffer()
 
     def isArrayBufferView(self):
         return self.inner.isArrayBufferView()
@@ -2831,19 +2717,16 @@ class IDLWrapperType(IDLType):
         return False
 
     def isVoid(self):
         return False
 
     def isSequence(self):
         return False
 
-    def isArray(self):
-        return False
-
     def isDictionary(self):
         return isinstance(self.inner, IDLDictionary)
 
     def isInterface(self):
         return (isinstance(self.inner, IDLInterface) or
                 isinstance(self.inner, IDLExternalInterface))
 
     def isCallbackInterface(self):
@@ -2900,18 +2783,17 @@ class IDLWrapperType(IDLType):
             return False
         if other.isUnion():
             # Just forward to the union; it'll deal
             return other.isDistinguishableFrom(self)
         assert self.isInterface() or self.isEnum() or self.isDictionary()
         if self.isEnum():
             return (other.isPrimitive() or other.isInterface() or other.isObject() or
                     other.isCallback() or other.isDictionary() or
-                    other.isSequence() or other.isMozMap() or other.isArray() or
-                    other.isDate())
+                    other.isSequence() or other.isMozMap() or other.isDate())
         if self.isDictionary() and other.nullable():
             return False
         if (other.isPrimitive() or other.isString() or other.isEnum() or
             other.isDate() or other.isSequence()):
             return True
         if self.isDictionary():
             return other.isNonCallbackInterface()
 
@@ -2923,17 +2805,17 @@ class IDLWrapperType(IDLType):
             assert self.isGeckoInterface() and other.isGeckoInterface()
             if self.inner.isExternal() or other.unroll().inner.isExternal():
                 return self != other
             return (len(self.inner.interfacesBasedOnSelf &
                         other.unroll().inner.interfacesBasedOnSelf) == 0 and
                     (self.isNonCallbackInterface() or
                      other.isNonCallbackInterface()))
         if (other.isDictionary() or other.isCallback() or
-            other.isMozMap() or other.isArray()):
+            other.isMozMap()):
             return self.isNonCallbackInterface()
 
         # Not much else |other| can be
         assert other.isObject()
         return False
 
     def isExposedInAllOf(self, exposureSet):
         if not self.isInterface():
@@ -3133,49 +3015,45 @@ class IDLBuiltinType(IDLType):
             return False
         if other.isUnion():
             # Just forward to the union; it'll deal
             return other.isDistinguishableFrom(self)
         if self.isBoolean():
             return (other.isNumeric() or other.isString() or other.isEnum() or
                     other.isInterface() or other.isObject() or
                     other.isCallback() or other.isDictionary() or
-                    other.isSequence() or other.isMozMap() or other.isArray() or
-                    other.isDate())
+                    other.isSequence() or other.isMozMap() or other.isDate())
         if self.isNumeric():
             return (other.isBoolean() or other.isString() or other.isEnum() or
                     other.isInterface() or other.isObject() or
                     other.isCallback() or other.isDictionary() or
-                    other.isSequence() or other.isMozMap() or other.isArray() or
-                    other.isDate())
+                    other.isSequence() or other.isMozMap() or other.isDate())
         if self.isString():
             return (other.isPrimitive() or other.isInterface() or
                     other.isObject() or
                     other.isCallback() or other.isDictionary() or
-                    other.isSequence() or other.isMozMap() or other.isArray() or
-                    other.isDate())
+                    other.isSequence() or other.isMozMap() or other.isDate())
         if self.isAny():
             # Can't tell "any" apart from anything
             return False
         if self.isObject():
             return other.isPrimitive() or other.isString() or other.isEnum()
         if self.isDate():
             return (other.isPrimitive() or other.isString() or other.isEnum() or
                     other.isInterface() or other.isCallback() or
                     other.isDictionary() or other.isSequence() or
-                    other.isMozMap() or other.isArray())
+                    other.isMozMap())
         if self.isVoid():
             return not other.isVoid()
         # Not much else we could be!
         assert self.isSpiderMonkeyInterface()
         # Like interfaces, but we know we're not a callback
         return (other.isPrimitive() or other.isString() or other.isEnum() or
                 other.isCallback() or other.isDictionary() or
-                other.isSequence() or other.isMozMap() or other.isArray() or
-                other.isDate() or
+                other.isSequence() or other.isMozMap() or other.isDate() or
                 (other.isInterface() and (
                  # ArrayBuffer is distinguishable from everything
                  # that's not an ArrayBuffer or a callback interface
                  (self.isArrayBuffer() and not other.isArrayBuffer()) or
                  (self.isSharedArrayBuffer() and not other.isSharedArrayBuffer()) or
                  # ArrayBufferView is distinguishable from everything
                  # that's not an ArrayBufferView or typed array.
                  (self.isArrayBufferView() and not other.isArrayBufferView() and
@@ -4591,22 +4469,16 @@ class IDLMethod(IDLInterfaceMember, IDLS
         'Getter',
         'Setter',
         'Creator',
         'Deleter',
         'LegacyCaller',
         base=IDLInterfaceMember.Special
     )
 
-    TypeSuffixModifier = enum(
-        'None',
-        'QMark',
-        'Brackets'
-    )
-
     NamedOrIndexed = enum(
         'Neither',
         'Named',
         'Indexed'
     )
 
     def __init__(self, location, identifier, returnType, arguments,
                  static=False, getter=False, setter=False, creator=False,
@@ -6398,128 +6270,114 @@ class Parser(Tokenizer):
     def p_TypeSingleType(self, p):
         """
             Type : SingleType
         """
         p[0] = p[1]
 
     def p_TypeUnionType(self, p):
         """
-            Type : UnionType TypeSuffix
-        """
-        p[0] = self.handleModifiers(p[1], p[2])
+            Type : UnionType Null
+        """
+        p[0] = self.handleNullable(p[1], p[2])
 
     def p_SingleTypeNonAnyType(self, p):
         """
             SingleType : NonAnyType
         """
         p[0] = p[1]
 
     def p_SingleTypeAnyType(self, p):
         """
-            SingleType : ANY TypeSuffixStartingWithArray
-        """
-        p[0] = self.handleModifiers(BuiltinTypes[IDLBuiltinType.Types.any], p[2])
+            SingleType : ANY
+        """
+        p[0] = BuiltinTypes[IDLBuiltinType.Types.any]
 
     def p_UnionType(self, p):
         """
             UnionType : LPAREN UnionMemberType OR UnionMemberType UnionMemberTypes RPAREN
         """
         types = [p[2], p[4]]
         types.extend(p[5])
         p[0] = IDLUnionType(self.getLocation(p, 1), types)
 
     def p_UnionMemberTypeNonAnyType(self, p):
         """
             UnionMemberType : NonAnyType
         """
         p[0] = p[1]
 
-    def p_UnionMemberTypeArrayOfAny(self, p):
-        """
-            UnionMemberTypeArrayOfAny : ANY LBRACKET RBRACKET
-        """
-        p[0] = IDLArrayType(self.getLocation(p, 2),
-                            BuiltinTypes[IDLBuiltinType.Types.any])
-
     def p_UnionMemberType(self, p):
         """
-            UnionMemberType : UnionType TypeSuffix
-                            | UnionMemberTypeArrayOfAny TypeSuffix
-        """
-        p[0] = self.handleModifiers(p[1], p[2])
+            UnionMemberType : UnionType Null
+        """
+        p[0] = self.handleNullable(p[1], p[2])
 
     def p_UnionMemberTypes(self, p):
         """
             UnionMemberTypes : OR UnionMemberType UnionMemberTypes
         """
         p[0] = [p[2]]
         p[0].extend(p[3])
 
     def p_UnionMemberTypesEmpty(self, p):
         """
             UnionMemberTypes :
         """
         p[0] = []
 
     def p_NonAnyType(self, p):
         """
-            NonAnyType : PrimitiveOrStringType TypeSuffix
-                       | ARRAYBUFFER TypeSuffix
-                       | SHAREDARRAYBUFFER TypeSuffix
-                       | OBJECT TypeSuffix
+            NonAnyType : PrimitiveOrStringType Null
+                       | ARRAYBUFFER Null
+                       | SHAREDARRAYBUFFER Null
+                       | OBJECT Null
         """
         if p[1] == "object":
             type = BuiltinTypes[IDLBuiltinType.Types.object]
         elif p[1] == "ArrayBuffer":
             type = BuiltinTypes[IDLBuiltinType.Types.ArrayBuffer]
         elif p[1] == "SharedArrayBuffer":
             type = BuiltinTypes[IDLBuiltinType.Types.SharedArrayBuffer]
         else:
             type = BuiltinTypes[p[1]]
 
-        p[0] = self.handleModifiers(type, p[2])
+        p[0] = self.handleNullable(type, p[2])
 
     def p_NonAnyTypeSequenceType(self, p):
         """
             NonAnyType : SEQUENCE LT Type GT Null
         """
         innerType = p[3]
         type = IDLSequenceType(self.getLocation(p, 1), innerType)
-        if p[5]:
-            type = IDLNullableType(self.getLocation(p, 5), type)
-        p[0] = type
+        p[0] = self.handleNullable(type, p[5])
 
     # Note: Promise<void> is allowed, so we want to parametrize on
     # ReturnType, not Type.  Also, we want this to end up picking up
     # the Promise interface for now, hence the games with IDLUnresolvedType.
     def p_NonAnyTypePromiseType(self, p):
         """
             NonAnyType : PROMISE LT ReturnType GT Null
         """
         innerType = p[3]
         promiseIdent = IDLUnresolvedIdentifier(self.getLocation(p, 1), "Promise")
         type = IDLUnresolvedType(self.getLocation(p, 1), promiseIdent, p[3])
-        if p[5]:
-            type = IDLNullableType(self.getLocation(p, 5), type)
-        p[0] = type
+        p[0] = self.handleNullable(type, p[5])
 
     def p_NonAnyTypeMozMapType(self, p):
         """
             NonAnyType : MOZMAP LT Type GT Null
         """
         innerType = p[3]
         type = IDLMozMapType(self.getLocation(p, 1), innerType)
-        if p[5]:
-            type = IDLNullableType(self.getLocation(p, 5), type)
-        p[0] = type
+        p[0] = self.handleNullable(type, p[5])
 
     def p_NonAnyTypeScopedName(self, p):
         """
-            NonAnyType : ScopedName TypeSuffix
+            NonAnyType : ScopedName Null
         """
         assert isinstance(p[1], IDLUnresolvedIdentifier)
 
         if p[1].name == "Promise":
             raise WebIDLError("Promise used without saying what it's "
                               "parametrized over",
                               [self.getLocation(p, 1)])
 
@@ -6531,50 +6389,46 @@ class Parser(Tokenizer):
                 assert not obj.isType()
                 if obj.isTypedef():
                     type = IDLTypedefType(self.getLocation(p, 1), obj.innerType,
                                           obj.identifier.name)
                 elif obj.isCallback() and not obj.isInterface():
                     type = IDLCallbackType(self.getLocation(p, 1), obj)
                 else:
                     type = IDLWrapperType(self.getLocation(p, 1), p[1])
-                p[0] = self.handleModifiers(type, p[2])
+                p[0] = self.handleNullable(type, p[2])
                 return
         except:
             pass
 
         type = IDLUnresolvedType(self.getLocation(p, 1), p[1])
-        p[0] = self.handleModifiers(type, p[2])
+        p[0] = self.handleNullable(type, p[2])
 
     def p_NonAnyTypeDate(self, p):
         """
-            NonAnyType : DATE TypeSuffix
-        """
-        p[0] = self.handleModifiers(BuiltinTypes[IDLBuiltinType.Types.date],
-                                    p[2])
+            NonAnyType : DATE Null
+        """
+        p[0] = self.handleNullable(BuiltinTypes[IDLBuiltinType.Types.date],
+                                   p[2])
 
     def p_ConstType(self, p):
         """
             ConstType : PrimitiveOrStringType Null
         """
         type = BuiltinTypes[p[1]]
-        if p[2]:
-            type = IDLNullableType(self.getLocation(p, 1), type)
-        p[0] = type
+        p[0] = self.handleNullable(type, p[2])
 
     def p_ConstTypeIdentifier(self, p):
         """
             ConstType : IDENTIFIER Null
         """
         identifier = IDLUnresolvedIdentifier(self.getLocation(p, 1), p[1])
 
         type = IDLUnresolvedType(self.getLocation(p, 1), identifier)
-        if p[2]:
-            type = IDLNullableType(self.getLocation(p, 1), type)
-        p[0] = type
+        p[0] = self.handleNullable(type, p[2])
 
     def p_PrimitiveOrStringTypeUint(self, p):
         """
             PrimitiveOrStringType : UnsignedIntegerType
         """
         p[0] = p[1]
 
     def p_PrimitiveOrStringTypeBoolean(self, p):
@@ -6672,58 +6526,25 @@ class Parser(Tokenizer):
         p[0] = True
 
     def p_OptionalLongEmpty(self, p):
         """
             OptionalLong :
         """
         p[0] = False
 
-    def p_TypeSuffixBrackets(self, p):
-        """
-            TypeSuffix : LBRACKET RBRACKET TypeSuffix
-        """
-        p[0] = [(IDLMethod.TypeSuffixModifier.Brackets, self.getLocation(p, 1))]
-        p[0].extend(p[3])
-
-    def p_TypeSuffixQMark(self, p):
-        """
-            TypeSuffix : QUESTIONMARK TypeSuffixStartingWithArray
-        """
-        p[0] = [(IDLMethod.TypeSuffixModifier.QMark, self.getLocation(p, 1))]
-        p[0].extend(p[2])
-
-    def p_TypeSuffixEmpty(self, p):
-        """
-            TypeSuffix :
-        """
-        p[0] = []
-
-    def p_TypeSuffixStartingWithArray(self, p):
-        """
-            TypeSuffixStartingWithArray : LBRACKET RBRACKET TypeSuffix
-        """
-        p[0] = [(IDLMethod.TypeSuffixModifier.Brackets, self.getLocation(p, 1))]
-        p[0].extend(p[3])
-
-    def p_TypeSuffixStartingWithArrayEmpty(self, p):
-        """
-            TypeSuffixStartingWithArray :
-        """
-        p[0] = []
-
     def p_Null(self, p):
         """
             Null : QUESTIONMARK
                  |
         """
         if len(p) > 1:
-            p[0] = True
+            p[0] = self.getLocation(p, 1)
         else:
-            p[0] = False
+            p[0] = None
 
     def p_ReturnTypeType(self, p):
         """
             ReturnType : Type
         """
         p[0] = p[1]
 
     def p_ReturnTypeVoid(self, p):
@@ -6871,25 +6692,19 @@ class Parser(Tokenizer):
 
         # xrange omits the last value.
         for x in xrange(IDLBuiltinType.Types.ArrayBuffer, IDLBuiltinType.Types.Float64Array + 1):
             builtin = BuiltinTypes[x]
             name = builtin.name
             typedef = IDLTypedef(BuiltinLocation("<builtin type>"), scope, builtin, name)
 
     @ staticmethod
-    def handleModifiers(type, modifiers):
-        for (modifier, modifierLocation) in modifiers:
-            assert (modifier == IDLMethod.TypeSuffixModifier.QMark or
-                    modifier == IDLMethod.TypeSuffixModifier.Brackets)
-
-            if modifier == IDLMethod.TypeSuffixModifier.QMark:
-                type = IDLNullableType(modifierLocation, type)
-            elif modifier == IDLMethod.TypeSuffixModifier.Brackets:
-                type = IDLArrayType(modifierLocation, type)
+    def handleNullable(type, questionMarkLocation):
+        if questionMarkLocation is not None:
+            type = IDLNullableType(questionMarkLocation, type)
 
         return type
 
     def parse(self, t, filename=None):
         self.lexer.input(t)
 
         # for tok in iter(self.lexer.token, None):
         #    print tok
deleted file mode 100644
--- a/dom/bindings/parser/tests/test_array.py
+++ /dev/null
@@ -1,18 +0,0 @@
-def WebIDLTest(parser, harness):
-    threw = False
-    try:
-        parser.parse("""
-          dictionary Foo {
-            short a;
-          };
-
-          dictionary Foo1 {
-            Foo[] b;
-          };
-        """)
-        results = parser.finish()
-    except:
-        threw = True
-
-    harness.ok(threw, "Array must not contain dictionary "
-                      "as element type.")
deleted file mode 100644
--- a/dom/bindings/parser/tests/test_array_of_interface.py
+++ /dev/null
@@ -1,13 +0,0 @@
-import WebIDL
-
-def WebIDLTest(parser, harness):
-    parser.parse("""
-      interface A {
-        attribute long a;
-      };
-
-      interface B {
-        attribute A[] b;
-      };
-    """);
-    parser.finish()
--- a/dom/bindings/parser/tests/test_arraybuffer.py
+++ b/dom/bindings/parser/tests/test_arraybuffer.py
@@ -1,45 +1,45 @@
 import WebIDL
 
 def WebIDLTest(parser, harness):
     parser.parse("""
         interface TestArrayBuffer {
           attribute ArrayBuffer bufferAttr;
-          void bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, ArrayBuffer[] arg3, sequence<ArrayBuffer> arg4);
+          void bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, sequence<ArrayBuffer> arg3);
 
           attribute ArrayBufferView viewAttr;
-          void viewMethod(ArrayBufferView arg1, ArrayBufferView? arg2, ArrayBufferView[] arg3, sequence<ArrayBufferView> arg4);
+          void viewMethod(ArrayBufferView arg1, ArrayBufferView? arg2, sequence<ArrayBufferView> arg3);
 
           attribute Int8Array int8ArrayAttr;
-          void int8ArrayMethod(Int8Array arg1, Int8Array? arg2, Int8Array[] arg3, sequence<Int8Array> arg4);
+          void int8ArrayMethod(Int8Array arg1, Int8Array? arg2, sequence<Int8Array> arg3);
 
           attribute Uint8Array uint8ArrayAttr;
-          void uint8ArrayMethod(Uint8Array arg1, Uint8Array? arg2, Uint8Array[] arg3, sequence<Uint8Array> arg4);
+          void uint8ArrayMethod(Uint8Array arg1, Uint8Array? arg2, sequence<Uint8Array> arg3);
 
           attribute Uint8ClampedArray uint8ClampedArrayAttr;
-          void uint8ClampedArrayMethod(Uint8ClampedArray arg1, Uint8ClampedArray? arg2, Uint8ClampedArray[] arg3, sequence<Uint8ClampedArray> arg4);
+          void uint8ClampedArrayMethod(Uint8ClampedArray arg1, Uint8ClampedArray? arg2, sequence<Uint8ClampedArray> arg3);
 
           attribute Int16Array int16ArrayAttr;
-          void int16ArrayMethod(Int16Array arg1, Int16Array? arg2, Int16Array[] arg3, sequence<Int16Array> arg4);
+          void int16ArrayMethod(Int16Array arg1, Int16Array? arg2, sequence<Int16Array> arg3);
 
           attribute Uint16Array uint16ArrayAttr;
-          void uint16ArrayMethod(Uint16Array arg1, Uint16Array? arg2, Uint16Array[] arg3, sequence<Uint16Array> arg4);
+          void uint16ArrayMethod(Uint16Array arg1, Uint16Array? arg2, sequence<Uint16Array> arg3);
 
           attribute Int32Array int32ArrayAttr;
-          void int32ArrayMethod(Int32Array arg1, Int32Array? arg2, Int32Array[] arg3, sequence<Int32Array> arg4);
+          void int32ArrayMethod(Int32Array arg1, Int32Array? arg2, sequence<Int32Array> arg3);
 
           attribute Uint32Array uint32ArrayAttr;
-          void uint32ArrayMethod(Uint32Array arg1, Uint32Array? arg2, Uint32Array[] arg3, sequence<Uint32Array> arg4);
+          void uint32ArrayMethod(Uint32Array arg1, Uint32Array? arg2, sequence<Uint32Array> arg3);
 
           attribute Float32Array float32ArrayAttr;
-          void float32ArrayMethod(Float32Array arg1, Float32Array? arg2, Float32Array[] arg3, sequence<Float32Array> arg4);
+          void float32ArrayMethod(Float32Array arg1, Float32Array? arg2, sequence<Float32Array> arg3);
 
           attribute Float64Array float64ArrayAttr;
-          void float64ArrayMethod(Float64Array arg1, Float64Array? arg2, Float64Array[] arg3, sequence<Float64Array> arg4);
+          void float64ArrayMethod(Float64Array arg1, Float64Array? arg2, sequence<Float64Array> arg3);
         };
     """)
 
     results = parser.finish()
 
     iface = results[0]
 
     harness.ok(True, "TestArrayBuffer interface parsed without error")
@@ -51,30 +51,27 @@ def WebIDLTest(parser, harness):
         harness.ok(isinstance(attr, WebIDL.IDLAttribute), "Expect an IDLAttribute")
         harness.ok(isinstance(method, WebIDL.IDLMethod), "Expect an IDLMethod")
 
         harness.check(str(attr.type), t, "Expect an ArrayBuffer type")
         harness.ok(attr.type.isSpiderMonkeyInterface(), "Should test as a js interface")
 
         (retType, arguments) = method.signatures()[0]
         harness.ok(retType.isVoid(), "Should have a void return type")
-        harness.check(len(arguments), 4, "Expect 4 arguments")
+        harness.check(len(arguments), 3, "Expect 3 arguments")
 
         harness.check(str(arguments[0].type), t,  "Expect an ArrayBuffer type")
         harness.ok(arguments[0].type.isSpiderMonkeyInterface(), "Should test as a js interface")
 
         harness.check(str(arguments[1].type), t + "OrNull",  "Expect an ArrayBuffer type")
         harness.ok(arguments[1].type.inner.isSpiderMonkeyInterface(), "Should test as a js interface")
 
-        harness.check(str(arguments[2].type), t + "Array",  "Expect an ArrayBuffer type")
+        harness.check(str(arguments[2].type), t + "Sequence",  "Expect an ArrayBuffer type")
         harness.ok(arguments[2].type.inner.isSpiderMonkeyInterface(), "Should test as a js interface")
 
-        harness.check(str(arguments[3].type), t + "Sequence",  "Expect an ArrayBuffer type")
-        harness.ok(arguments[3].type.inner.isSpiderMonkeyInterface(), "Should test as a js interface")
-
 
     checkStuff(members[0],  members[1],  "ArrayBuffer")
     checkStuff(members[2],  members[3],  "ArrayBufferView")
     checkStuff(members[4],  members[5],  "Int8Array")
     checkStuff(members[6],  members[7],  "Uint8Array")
     checkStuff(members[8],  members[9],  "Uint8ClampedArray")
     checkStuff(members[10], members[11], "Int16Array")
     checkStuff(members[12], members[13], "Uint16Array")
--- a/dom/bindings/parser/tests/test_attr.py
+++ b/dom/bindings/parser/tests/test_attr.py
@@ -72,137 +72,33 @@ def WebIDLTest(parser, harness):
           attribute DOMString? str;
           readonly attribute DOMString? rstr;
           attribute object? obj;
           readonly attribute object? robj;
           attribute object? _object;
           attribute float? f;
           readonly attribute float? rf;
         };
-
-        interface TestAttrArray {
-          attribute byte[] b;
-          readonly attribute byte[] rb;
-          attribute octet[] o;
-          readonly attribute octet[] ro;
-          attribute short[] s;
-          readonly attribute short[] rs;
-          attribute unsigned short[] us;
-          readonly attribute unsigned short[] rus;
-          attribute long[] l;
-          readonly attribute long[] rl;
-          attribute unsigned long[] ul;
-          readonly attribute unsigned long[] rul;
-          attribute long long[] ll;
-          readonly attribute long long[] rll;
-          attribute unsigned long long[] ull;
-          readonly attribute unsigned long long[] rull;
-          attribute DOMString[] str;
-          readonly attribute DOMString[] rstr;
-          attribute object[] obj;
-          readonly attribute object[] robj;
-          attribute object[] _object;
-          attribute float[] f;
-          readonly attribute float[] rf;
-        };
-
-        interface TestAttrNullableArray {
-          attribute byte[]? b;
-          readonly attribute byte[]? rb;
-          attribute octet[]? o;
-          readonly attribute octet[]? ro;
-          attribute short[]? s;
-          readonly attribute short[]? rs;
-          attribute unsigned short[]? us;
-          readonly attribute unsigned short[]? rus;
-          attribute long[]? l;
-          readonly attribute long[]? rl;
-          attribute unsigned long[]? ul;
-          readonly attribute unsigned long[]? rul;
-          attribute long long[]? ll;
-          readonly attribute long long[]? rll;
-          attribute unsigned long long[]? ull;
-          readonly attribute unsigned long long[]? rull;
-          attribute DOMString[]? str;
-          readonly attribute DOMString[]? rstr;
-          attribute object[]? obj;
-          readonly attribute object[]? robj;
-          attribute object[]? _object;
-          attribute float[]? f;
-          readonly attribute float[]? rf;
-        };
-
-        interface TestAttrArrayOfNullableTypes {
-          attribute byte?[] b;
-          readonly attribute byte?[] rb;
-          attribute octet?[] o;
-          readonly attribute octet?[] ro;
-          attribute short?[] s;
-          readonly attribute short?[] rs;
-          attribute unsigned short?[] us;
-          readonly attribute unsigned short?[] rus;
-          attribute long?[] l;
-          readonly attribute long?[] rl;
-          attribute unsigned long?[] ul;
-          readonly attribute unsigned long?[] rul;
-          attribute long long?[] ll;
-          readonly attribute long long?[] rll;
-          attribute unsigned long long?[] ull;
-          readonly attribute unsigned long long?[] rull;
-          attribute DOMString?[] str;
-          readonly attribute DOMString?[] rstr;
-          attribute object?[] obj;
-          readonly attribute object?[] robj;
-          attribute object?[] _object;
-          attribute float?[] f;
-          readonly attribute float?[] rf;
-        };
-
-        interface TestAttrNullableArrayOfNullableTypes {
-          attribute byte?[]? b;
-          readonly attribute byte?[]? rb;
-          attribute octet?[]? o;
-          readonly attribute octet?[]? ro;
-          attribute short?[]? s;
-          readonly attribute short?[]? rs;
-          attribute unsigned short?[]? us;
-          readonly attribute unsigned short?[]? rus;
-          attribute long?[]? l;
-          readonly attribute long?[]? rl;
-          attribute unsigned long?[]? ul;
-          readonly attribute unsigned long?[]? rul;
-          attribute long long?[]? ll;
-          readonly attribute long long?[]? rll;
-          attribute unsigned long long?[]? ull;
-          readonly attribute unsigned long long?[]? rull;
-          attribute DOMString?[]? str;
-          readonly attribute DOMString?[]? rstr;
-          attribute object?[]? obj;
-          readonly attribute object?[]? robj;
-          attribute object?[]? _object;
-          attribute float?[]? f;
-          readonly attribute float?[]? rf;
-        };
     """)
 
     results = parser.finish()
 
     def checkAttr(attr, QName, name, type, readonly):
         harness.ok(isinstance(attr, WebIDL.IDLAttribute),
                   "Should be an IDLAttribute")
         harness.ok(attr.isAttr(), "Attr is an Attr")
         harness.ok(not attr.isMethod(), "Attr is not an method")
         harness.ok(not attr.isConst(), "Attr is not a const")
         harness.check(attr.identifier.QName(), QName, "Attr has the right QName")
         harness.check(attr.identifier.name, name, "Attr has the right name")
         harness.check(str(attr.type), type, "Attr has the right type")
         harness.check(attr.readonly, readonly, "Attr's readonly state is correct")
 
     harness.ok(True, "TestAttr interface parsed without error.")
-    harness.check(len(results), 6, "Should be six productions.")
+    harness.check(len(results), 2, "Should be two productions.")
     iface = results[0]
     harness.ok(isinstance(iface, WebIDL.IDLInterface),
                "Should be an IDLInterface")
     harness.check(iface.identifier.QName(), "::TestAttr", "Interface has the right QName")
     harness.check(iface.identifier.name, "TestAttr", "Interface has the right name")
     harness.check(len(iface.members), len(testData), "Expect %s members" % len(testData))
 
     attrs = iface.members
@@ -223,76 +119,16 @@ def WebIDLTest(parser, harness):
     attrs = iface.members
 
     for i in range(len(attrs)):
         data = testData[i]
         attr = attrs[i]
         (QName, name, type, readonly) = data
         checkAttr(attr, QName % "Nullable", name, type % "OrNull", readonly)
 
-    iface = results[2]
-    harness.ok(isinstance(iface, WebIDL.IDLInterface),
-               "Should be an IDLInterface")
-    harness.check(iface.identifier.QName(), "::TestAttrArray", "Interface has the right QName")
-    harness.check(iface.identifier.name, "TestAttrArray", "Interface has the right name")
-    harness.check(len(iface.members), len(testData), "Expect %s members" % len(testData))
-
-    attrs = iface.members
-
-    for i in range(len(attrs)):
-        data = testData[i]
-        attr = attrs[i]
-        (QName, name, type, readonly) = data
-        checkAttr(attr, QName % "Array", name, type % "Array", readonly)
-
-    iface = results[3]
-    harness.ok(isinstance(iface, WebIDL.IDLInterface),
-               "Should be an IDLInterface")
-    harness.check(iface.identifier.QName(), "::TestAttrNullableArray", "Interface has the right QName")
-    harness.check(iface.identifier.name, "TestAttrNullableArray", "Interface has the right name")
-    harness.check(len(iface.members), len(testData), "Expect %s members" % len(testData))
-
-    attrs = iface.members
-
-    for i in range(len(attrs)):
-        data = testData[i]
-        attr = attrs[i]
-        (QName, name, type, readonly) = data
-        checkAttr(attr, QName % "NullableArray", name, type % "ArrayOrNull", readonly)
-
-    iface = results[4]
-    harness.ok(isinstance(iface, WebIDL.IDLInterface),
-               "Should be an IDLInterface")
-    harness.check(iface.identifier.QName(), "::TestAttrArrayOfNullableTypes", "Interface has the right QName")
-    harness.check(iface.identifier.name, "TestAttrArrayOfNullableTypes", "Interface has the right name")
-    harness.check(len(iface.members), len(testData), "Expect %s members" % len(testData))
-
-    attrs = iface.members
-
-    for i in range(len(attrs)):
-        data = testData[i]
-        attr = attrs[i]
-        (QName, name, type, readonly) = data
-        checkAttr(attr, QName % "ArrayOfNullableTypes", name, type % "OrNullArray", readonly)
-
-    iface = results[5]
-    harness.ok(isinstance(iface, WebIDL.IDLInterface),
-               "Should be an IDLInterface")
-    harness.check(iface.identifier.QName(), "::TestAttrNullableArrayOfNullableTypes", "Interface has the right QName")
-    harness.check(iface.identifier.name, "TestAttrNullableArrayOfNullableTypes", "Interface has the right name")
-    harness.check(len(iface.members), len(testData), "Expect %s members" % len(testData))
-
-    attrs = iface.members
-
-    for i in range(len(attrs)):
-        data = testData[i]
-        attr = attrs[i]
-        (QName, name, type, readonly) = data
-        checkAttr(attr, QName % "NullableArrayOfNullableTypes", name, type % "OrNullArrayOrNull", readonly)
-
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
           interface A {
             [SetterThrows] readonly attribute boolean foo;
           };
         """)
--- a/dom/bindings/parser/tests/test_distinguishability.py
+++ b/dom/bindings/parser/tests/test_distinguishability.py
@@ -154,17 +154,17 @@ def WebIDLTest(parser, harness):
                  "boolean?", "DOMString", "ByteString", "Enum", "Enum2",
                  "Interface", "Interface?",
                  "AncestorInterface", "UnrelatedInterface",
                  "ImplementedInterface", "CallbackInterface",
                  "CallbackInterface?", "CallbackInterface2",
                  "object", "Callback", "Callback2", "optional Dict",
                  "optional Dict2", "sequence<long>", "sequence<short>",
                  "MozMap<object>", "MozMap<Dict>", "MozMap<long>",
-                 "long[]", "short[]", "Date", "Date?", "any",
+                 "Date", "Date?", "any",
                  "Promise<any>", "Promise<any>?",
                  "USVString", "ArrayBuffer", "ArrayBufferView", "SharedArrayBuffer",
                  "Uint8Array", "Uint16Array" ]
     # When we can parse Date and RegExp, we need to add them here.
 
     # Try to categorize things a bit to keep list lengths down
     def allBut(list1, list2):
         return [a for a in list1 if a not in list2 and
@@ -182,17 +182,16 @@ def WebIDLTest(parser, harness):
     sharedBufferSourceTypes = ["SharedArrayBuffer"]
     interfaces = [ "Interface", "Interface?", "AncestorInterface",
                    "UnrelatedInterface", "ImplementedInterface" ] + bufferSourceTypes + sharedBufferSourceTypes
     nullables = ["long?", "short?", "boolean?", "Interface?",
                  "CallbackInterface?", "optional Dict", "optional Dict2",
                  "Date?", "any", "Promise<any>?"]
     dates = [ "Date", "Date?" ]
     sequences = [ "sequence<long>", "sequence<short>" ]
-    arrays = [ "long[]", "short[]" ]
     nonUserObjects = nonObjects + interfaces + dates + sequences
     otherObjects = allBut(argTypes, nonUserObjects + ["object"])
     notRelatedInterfaces = (nonObjects + ["UnrelatedInterface"] +
                             otherObjects + dates + sequences + bufferSourceTypes + sharedBufferSourceTypes)
     mozMaps = [ "MozMap<object>", "MozMap<Dict>", "MozMap<long>" ]
 
     # Build a representation of the distinguishability table as a dict
     # of dicts, holding True values where needed, holes elsewhere.
@@ -224,24 +223,22 @@ def WebIDLTest(parser, harness):
     setDistinguishable("CallbackInterface?", allBut(nonUserObjects, nullables))
     setDistinguishable("CallbackInterface2", nonUserObjects)
     setDistinguishable("object", nonObjects)
     setDistinguishable("Callback", nonUserObjects)
     setDistinguishable("Callback2", nonUserObjects)
     setDistinguishable("optional Dict", allBut(nonUserObjects, nullables))
     setDistinguishable("optional Dict2", allBut(nonUserObjects, nullables))
     setDistinguishable("sequence<long>",
-                       allBut(argTypes, sequences + arrays + ["object"]))
+                       allBut(argTypes, sequences + ["object"]))
     setDistinguishable("sequence<short>",
-                       allBut(argTypes, sequences + arrays + ["object"]))
+                       allBut(argTypes, sequences + ["object"]))
     setDistinguishable("MozMap<object>", nonUserObjects)
     setDistinguishable("MozMap<Dict>", nonUserObjects)
     setDistinguishable("MozMap<long>", nonUserObjects)
-    setDistinguishable("long[]", allBut(nonUserObjects, sequences))
-    setDistinguishable("short[]", allBut(nonUserObjects, sequences))
     setDistinguishable("Date", allBut(argTypes, dates + ["object"]))
     setDistinguishable("Date?", allBut(argTypes, dates + nullables + ["object"]))
     setDistinguishable("any", [])
     setDistinguishable("Promise<any>", [])
     setDistinguishable("Promise<any>?", [])
     setDistinguishable("ArrayBuffer", allBut(argTypes, ["ArrayBuffer", "object"]))
     setDistinguishable("ArrayBufferView", allBut(argTypes, ["ArrayBufferView", "Uint8Array", "Uint16Array", "object"]))
     setDistinguishable("Uint8Array", allBut(argTypes, ["ArrayBufferView", "Uint8Array", "object"]))
--- a/dom/bindings/parser/tests/test_method.py
+++ b/dom/bindings/parser/tests/test_method.py
@@ -6,34 +6,33 @@ def WebIDLTest(parser, harness):
           void basic();
           static void basicStatic();
           void basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
           boolean basicBoolean();
           static boolean basicStaticBoolean();
           boolean basicBooleanWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
           void optionalArg(optional byte? arg1, optional sequence<byte> arg2);
           void variadicArg(byte?... arg1);
-          void crazyTypes(sequence<long?[]>? arg1, boolean?[][]? arg2);
           object getObject();
           void setObject(object arg1);
           void setAny(any arg1);
           float doFloats(float arg1);
         };
     """)
 
     results = parser.finish()
 
     harness.ok(True, "TestMethods interface parsed without error.")
     harness.check(len(results), 1, "Should be one production.")
     iface = results[0]
     harness.ok(isinstance(iface, WebIDL.IDLInterface),
                "Should be an IDLInterface")
     harness.check(iface.identifier.QName(), "::TestMethods", "Interface has the right QName")
     harness.check(iface.identifier.name, "TestMethods", "Interface has the right name")
-    harness.check(len(iface.members), 13, "Expect 13 members")
+    harness.check(len(iface.members), 12, "Expect 12 members")
 
     methods = iface.members
 
     def checkArgument(argument, QName, name, type, optional, variadic):
         harness.ok(isinstance(argument, WebIDL.IDLArgument),
                    "Should be an IDLArgument")
         harness.check(argument.identifier.QName(), QName, "Argument has the right QName")
         harness.check(argument.identifier.name, name, "Argument has the right name")
@@ -93,32 +92,27 @@ def WebIDLTest(parser, harness):
                 "optionalArg",
        [("Void",
         [("::TestMethods::optionalArg::arg1", "arg1", "ByteOrNull", True, False),
          ("::TestMethods::optionalArg::arg2", "arg2", "ByteSequence", True, False)])])
     checkMethod(methods[7], "::TestMethods::variadicArg",
                 "variadicArg",
        [("Void",
         [("::TestMethods::variadicArg::arg1", "arg1", "ByteOrNull", True, True)])])
-    checkMethod(methods[8], "::TestMethods::crazyTypes",
-                "crazyTypes",
-       [("Void",
-        [("::TestMethods::crazyTypes::arg1", "arg1", "LongOrNullArraySequenceOrNull", False, False),
-         ("::TestMethods::crazyTypes::arg2", "arg2", "BooleanOrNullArrayArrayOrNull", False, False)])])
-    checkMethod(methods[9], "::TestMethods::getObject",
+    checkMethod(methods[8], "::TestMethods::getObject",
                 "getObject", [("Object", [])])
-    checkMethod(methods[10], "::TestMethods::setObject",
+    checkMethod(methods[9], "::TestMethods::setObject",
                 "setObject",
        [("Void",
         [("::TestMethods::setObject::arg1", "arg1", "Object", False, False)])])
-    checkMethod(methods[11], "::TestMethods::setAny",
+    checkMethod(methods[10], "::TestMethods::setAny",
                 "setAny",
        [("Void",
         [("::TestMethods::setAny::arg1", "arg1", "Any", False, False)])])
-    checkMethod(methods[12], "::TestMethods::doFloats",
+    checkMethod(methods[11], "::TestMethods::doFloats",
                 "doFloats",
        [("Float",
         [("::TestMethods::doFloats::arg1", "arg1", "Float", False, False)])])
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
--- a/dom/bindings/parser/tests/test_nullable_equivalency.py
+++ b/dom/bindings/parser/tests/test_nullable_equivalency.py
@@ -48,26 +48,16 @@ def WebIDLTest(parser, harness):
           attribute double  a;
           attribute double? b;
         };
 
         interface TestNullableEquivalency10 {
           attribute object  a;
           attribute object? b;
         };
-
-        interface TestNullableEquivalency11 {
-          attribute double[]  a;
-          attribute double[]? b;
-        };
-
-        interface TestNullableEquivalency12 {
-          attribute TestNullableEquivalency9[]  a;
-          attribute TestNullableEquivalency9[]? b;
-        };
     """)
 
     for decl in parser.finish():
         if decl.isInterface():
             checkEquivalent(decl, harness)
 
 def checkEquivalent(iface, harness):
     type1 = iface.members[0].type
--- a/dom/bindings/parser/tests/test_union.py
+++ b/dom/bindings/parser/tests/test_union.py
@@ -134,19 +134,16 @@ def WebIDLTest(parser, harness):
     interface = testPre + """
         interface TestUnion {
         """
     for (i, type) in enumerate(validUnionTypes):
         interface += string.Template("""
           void method${i}(${type} arg);
           ${type} returnMethod${i}();
           attribute ${type} attr${i};
-          void arrayMethod${i}(${type}[] arg);
-          ${type}[] arrayReturnMethod${i}();
-          attribute ${type}[] arrayAttr${i};
           void optionalMethod${i}(${type}? arg);
         """).substitute(i=i, type=type)
     interface += """
         };
         """
     parser.parse(interface)
     results = parser.finish()