MCPcopy Index your code
hub / github.com/google/mtail / writeJumps

Method writeJumps

internal/runtime/compiler/codegen/codegen.go:615–632  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

613}
614
615func (c *codegen) writeJumps() {
616 for j, i := range c.obj.Program {
617 switch i.Opcode {
618 case code.Jmp, code.Jm, code.Jnm:
619 index := i.Operand.(int)
620 if index > len(c.l) {
621 c.errorf(nil, "no jump at label %v, table is %v", i.Operand, c.l)
622 continue
623 }
624 offset := c.l[index]
625 if offset < 0 {
626 c.errorf(nil, "offset for label %v is negative, table is %v", i.Operand, c.l)
627 continue
628 }
629 c.obj.Program[j].Operand = c.l[index]
630 }
631 }
632}

Callers 1

CodeGenFunction · 0.95

Calls 1

errorfMethod · 0.95

Tested by

no test coverage detected