Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/generator.py

Issue 1847683004: Mojom compiler backend: Stop re-computing interface version numbers and consume method declaration o (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebasing. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/pylib/mojom/generate/generator.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/generator.py b/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
index 0e6258a875816ed72c33ef1410b438a2f0e700a6..5b722896c0f5ebf73946463658d8346c3e710212 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
@@ -169,25 +169,10 @@ class Generator(object):
def _AddInterfaceComputedData(self, interface):
"""Adds computed data to the given interface. The data is computed once and
used repeatedly in the generation process."""
- # Here we set the interface's |version| attribute to be the maximum value
- # of the |min_version| attributes of all methods in the interface and all
- # parameters in those methods.
- # TODO(rudominer) Consider adding this value to the intermediate
- # representation.
- interface.version = 0
for method in interface.methods:
- if method.min_version is not None:
- interface.version = max(interface.version, method.min_version)
-
method.param_struct = self._GetStructFromMethod(method)
- interface.version = max(interface.version,
- method.param_struct.versions[-1].version)
-
if method.response_parameters is not None:
method.response_param_struct = self._GetResponseStructFromMethod(method)
- interface.version = max(
- interface.version,
- method.response_param_struct.versions[-1].version)
else:
method.response_param_struct = None
return interface
« no previous file with comments | « no previous file | mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698