From 4a740adb670a4d6d64f7ba3f3ebe623389447a63 Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Tue, 7 Jan 2020 22:48:55 +0000 Subject: [PATCH] Bug 1602530 - Part 21: Do not sort opcodes by name in documentation. r=tcampbell. Now that they're in a reasonable order in Opcodes.h, it's better to keep that order for the docs. Differential Revision: https://phabricator.services.mozilla.com/D57542 --HG-- extra : moz-landing-system : lando --- js/src/vm/make_opcode_doc.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/src/vm/make_opcode_doc.py b/js/src/vm/make_opcode_doc.py index 1974b665620b..fe73cb847abd 100755 --- a/js/src/vm/make_opcode_doc.py +++ b/js/src/vm/make_opcode_doc.py @@ -98,8 +98,7 @@ OPCODE_FORMAT = """\ def print_opcode(opcode): names_template = '{name} [-{nuses}, +{ndefs}]{flags}' - opcodes = sorted([opcode] + opcode.group, - key=lambda opcode: opcode.name) + opcodes = [opcode] + opcode.group names = [names_template.format(name=escape(code.name), nuses=override(code.nuses, opcode.nuses_override), @@ -170,9 +169,8 @@ def print_doc(index): name=type_name, id=make_element_id(category_name, type_name))) print('
') - for opcode_ in sorted(opcodes, - key=lambda opcode: opcode.sort_key): - print_opcode(opcode_) + for opcode in opcodes: + print_opcode(opcode) print('
')