Simplify emitter::Label - Only bytecode_emitter cares about DV labels
Summary:
Currently the enum Label has variants for regular labels and default-arg labels,
and bytecode_printer formats them with "L" or "DV" prefixes respectively,
although the numbering space of LabelIds doesn't care -- the LabelId values
are unique regardless of the kind.
The HHAS assembler doesn't care either; it just builds a map from string labels
to bytecode offsets.
This diff pushes the L vs DV details down into bytecode_printer and simplifies
the Label enum down to just what was previously the LabelId. It also refactors
some label handling code to be more obvious what it's doing, as a side effect
of my attempts to understand it.
As a followup diff that *does* change HHAS (with no effect on bytecode), we could
just rip out the DV stuff and format all labels the same way.
Reviewed By: aorenste
Differential Revision:
D34282597
fbshipit-source-id:
90088aa9c81aec481fe3b273313434c6f6ff5192