aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-08-20 11:48:54 +0200
committerMs2ger <ms2ger@gmail.com>2014-08-20 11:48:57 +0200
commit863e46dabe5b38717fd1755b73e2fef80cb6229b (patch)
treefa2a003d6817edc7a2d3569b154f69b63ae7018f /src/components/script/dom/bindings/codegen/CodegenRust.py
parent75bb92f384185e270f7fb5b04a503c29e3bd4e55 (diff)
downloadservo-863e46dabe5b38717fd1755b73e2fef80cb6229b.tar.gz
servo-863e46dabe5b38717fd1755b73e2fef80cb6229b.zip
Stop resorting dictionaries.
Rust is more forgiving about the order of definitions than C++, so there is no need to try to sort them. Worse, the "sorting" actually causes the order in the generated file to be non-deterministic.
Diffstat (limited to 'src/components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--src/components/script/dom/bindings/codegen/CodegenRust.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py
index 9a02b2531eb..9e34153aefa 100644
--- a/src/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/src/components/script/dom/bindings/codegen/CodegenRust.py
@@ -4423,29 +4423,6 @@ class CGBindingRoot(CGThing):
# Do codegen for all the enums
cgthings = [CGEnum(e) for e in config.getEnums(webIDLFile)]
- # 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.
- #
- # XXXbz this will fail if we have two webidl files A and B such that A
- # declares a dictionary which inherits from a dictionary in B and B
- # declares a dictionary (possibly a different one!) that inherits from a
- # dictionary in A. The good news is that I expect this to never happen.
- reSortedDictionaries = []
- dictionaries = set(dictionaries)
- while len(dictionaries) != 0:
- # Find the dictionaries that don't depend on anything else anymore
- # and move them over.
- toMove = [d for d in dictionaries if
- len(CGDictionary.getDictionaryDependencies(d) &
- dictionaries) == 0]
- if len(toMove) == 0:
- raise TypeError("Loop in dictionary dependency graph")
- dictionaries = dictionaries - set(toMove)
- reSortedDictionaries.extend(toMove)
-
- dictionaries = reSortedDictionaries
cgthings.extend([CGDictionary(d, config.getDescriptorProvider())
for d in dictionaries])