mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Bug 1607773 - Part 10: Revise presentation of JOF_ flags. r=arai.
I think it makes sense to include JOF_ in what is shown. However, many flags are completely redundant with the operands or even just the opcode name. Depends on D59176 Differential Revision: https://phabricator.services.mozilla.com/D59177 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2a02c4d592
commit
a2d1a67a2c
@ -2083,7 +2083,7 @@
|
||||
*
|
||||
* Category: Functions
|
||||
* Type: Generators and async functions
|
||||
* Operands: resumeKind (GeneratorResumeKind)
|
||||
* Operands: GeneratorResumeKind resumeKind (encoded as uint8_t)
|
||||
* Stack: => resumeKind
|
||||
*/ \
|
||||
MACRO(JSOP_RESUMEKIND, "resumekind", NULL, 2, 0, 1, JOF_UINT8) \
|
||||
|
@ -62,13 +62,26 @@ except ImportError as exc:
|
||||
|
||||
SOURCE_BASE = 'http://dxr.mozilla.org/mozilla-central/source'
|
||||
|
||||
FLAGS_TO_IGNORE = {
|
||||
"JOF_BYTE",
|
||||
"JOF_UINT8",
|
||||
"JOF_UINT16",
|
||||
"JOF_UINT24",
|
||||
"JOF_UINT32",
|
||||
"JOF_INT8",
|
||||
"JOF_INT32",
|
||||
"JOF_TABLESWITCH",
|
||||
"JOF_REGEXP",
|
||||
"JOF_DOUBLE",
|
||||
"JOF_LOOPHEAD",
|
||||
"JOF_BIGINT",
|
||||
}
|
||||
|
||||
|
||||
def format_flags(flags):
|
||||
flags = [flag for flag in flags if flag != 'JOF_BYTE']
|
||||
flags = [flag for flag in flags if flag not in FLAGS_TO_IGNORE]
|
||||
if len(flags) == 0:
|
||||
return ''
|
||||
|
||||
flags = map(lambda x: x.replace('JOF_', ''), flags)
|
||||
return '<p>Flags: {flags}</p>\n'.format(flags=', '.join(flags))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user