MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / get_label

Method get_label

cranelift/codegen/src/machinst/buffer.rs:635–644  ·  view source on GitHub ↗

Allocate a `Label` to refer to some offset. May not be bound to a fixed offset yet.

(&mut self)

Source from the content-addressed store, hash-verified

633 /// Allocate a `Label` to refer to some offset. May not be bound to a fixed
634 /// offset yet.
635 pub fn get_label(&mut self) -> MachLabel {
636 let l = self.label_offsets.len() as u32;
637 self.label_offsets.push(UNKNOWN_LABEL_OFFSET);
638 self.label_aliases.push(UNKNOWN_LABEL);
639 trace!("MachBuffer: new label -> {:?}", MachLabel(l));
640 MachLabel(l)
641
642 // Post-invariant: the only mutation is to add a new label; it has no
643 // bound offset yet, so it trivially satisfies all invariants.
644 }
645
646 /// Reserve the first N MachLabels for blocks.
647 pub fn reserve_labels_for_blocks(&mut self, blocks: usize) {

Callers 14

defer_trapMethod · 0.45
emit_with_island_checkFunction · 0.45
emitMethod · 0.45
test_s390x_binemitFunction · 0.45
emitFunction · 0.45
test_x64_emitFunction · 0.45
emit_uncompressedMethod · 0.45
emitMethod · 0.45

Calls 3

MachLabelClass · 0.85
lenMethod · 0.45
pushMethod · 0.45

Tested by 3

test_s390x_binemitFunction · 0.36
test_x64_emitFunction · 0.36