MCPcopy
hub / github.com/google/mtail / emit

Method emit

internal/runtime/compiler/codegen/codegen.go:51–54  ·  view source on GitHub ↗
(n ast.Node, opcode code.Opcode, operand interface{})

Source from the content-addressed store, hash-verified

49}
50
51func (c *codegen) emit(n ast.Node, opcode code.Opcode, operand interface{}) {
52 glog.V(2).Infof("emitting `%s %v' from line %d node %#v\n", opcode, operand, n.Pos().Line, n)
53 c.obj.Program = append(c.obj.Program, code.Instr{opcode, operand, n.Pos().Line})
54}
55
56// newLabel creates a new label to jump to.
57func (c *codegen) newLabel() (l int) {

Callers 3

VisitBeforeMethod · 0.95
VisitAfterMethod · 0.95
emitConversionMethod · 0.95

Calls 1

PosMethod · 0.65

Tested by

no test coverage detected