MCPcopy Index your code
hub / github.com/expr-lang/expr / emitCond

Method emitCond

compiler/compiler.go:1183–1193  ·  view source on GitHub ↗
(body func())

Source from the content-addressed store, hash-verified

1181}
1182
1183func (c *compiler) emitCond(body func()) {
1184 noop := c.emit(OpJumpIfFalse, placeholder)
1185 c.emit(OpPop)
1186
1187 body()
1188
1189 jmp := c.emit(OpJump, placeholder)
1190 c.patchJump(noop)
1191 c.emit(OpPop)
1192 c.patchJump(jmp)
1193}
1194
1195func (c *compiler) emitLoop(body func()) {
1196 begin := len(c.bytecode)

Callers 1

BuiltinNodeMethod · 0.95

Calls 2

emitMethod · 0.95
patchJumpMethod · 0.95

Tested by

no test coverage detected