Make WASM codegen output to be alphabetically ordered.

PiperOrigin-RevId: 836680575
Change-Id: I7ddb7267c0db4911b2e84528f948dee6fccdf81d
This commit is contained in:
Google DeepMind
2025-11-25 08:28:32 -08:00
committed by Copybara-Service
parent 6208730744
commit 6e59f61c70
6 changed files with 4069 additions and 4060 deletions
+5 -3
View File
@@ -37,7 +37,9 @@ class BindingBuilder:
def set_enums(self):
"""Generates and sets the enum bindings."""
self.markers_and_content += enums.generate(introspect_enums.ENUMS)
self.markers_and_content += enums.generate(
list(introspect_enums.ENUMS.values())
)
return self
def set_structs(self):
@@ -48,10 +50,10 @@ class BindingBuilder:
def set_functions(self):
"""Generates and sets the function wrappers and bindings."""
functions_to_bind: dict[str, ast_nodes.FunctionDecl] = {}
functions_to_bind = []
for name, func in introspect_functions.FUNCTIONS.items():
if not functions.is_excluded_function_name(name):
functions_to_bind[name] = func
functions_to_bind.append(func)
self.markers_and_content += functions.generate(functions_to_bind)
return self