MCPcopy Index your code
hub / github.com/Shopify/go-lua / encode

Method encode

code.go:306–312  ·  view source on GitHub ↗
(i instruction)

Source from the content-addressed store, hash-verified

304}
305
306func (f *function) encode(i instruction) int {
307 f.assert(len(f.f.code) == len(f.f.lineInfo))
308 f.dischargeJumpPC()
309 f.f.code = append(f.f.code, i)
310 f.f.lineInfo = append(f.f.lineInfo, int32(f.p.lastLine))
311 return len(f.f.code) - 1
312}
313
314func (f *function) dropLastInstruction() {
315 f.assert(len(f.f.code) == len(f.f.lineInfo))

Callers 3

EncodeABCMethod · 0.95
encodeABxMethod · 0.95
encodeExtraArgMethod · 0.95

Calls 2

assertMethod · 0.95
dischargeJumpPCMethod · 0.95

Tested by

no test coverage detected