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
This commit is contained in:
Jason Orendorff 2020-01-07 22:48:55 +00:00
Родитель bd70926dd0
Коммит 4a740adb67
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -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('<dl>')
for opcode_ in sorted(opcodes,
key=lambda opcode: opcode.sort_key):
print_opcode(opcode_)
for opcode in opcodes:
print_opcode(opcode)
print('</dl>')