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

Method GoIfFalse

code.go:803–816  ·  view source on GitHub ↗
(e exprDesc)

Source from the content-addressed store, hash-verified

801}
802
803func (f *function) GoIfFalse(e exprDesc) exprDesc {
804 pc := noJump
805 switch e = f.DischargeVariables(e); e.kind {
806 case kindJump:
807 pc = e.info
808 case kindNil, kindFalse:
809 default:
810 pc = f.jumpOnCondition(e, 1)
811 }
812 e.t = f.Concatenate(e.t, pc)
813 f.PatchToHere(e.f)
814 e.f = noJump
815 return e
816}
817
818func (f *function) encodeNot(e exprDesc) exprDesc {
819 switch e = f.DischargeVariables(e); e.kind {

Callers 2

InfixMethod · 0.95
testThenBlockMethod · 0.80

Calls 4

DischargeVariablesMethod · 0.95
jumpOnConditionMethod · 0.95
ConcatenateMethod · 0.95
PatchToHereMethod · 0.95

Tested by

no test coverage detected