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

Method CloseConstructor

code.go:1100–1115  ·  view source on GitHub ↗
(pc, tableRegister, pending, arrayCount, hashCount int, e exprDesc)

Source from the content-addressed store, hash-verified

1098}
1099
1100func (f *function) CloseConstructor(pc, tableRegister, pending, arrayCount, hashCount int, e exprDesc) {
1101 if pending != 0 {
1102 if e.hasMultipleReturns() {
1103 f.SetMultipleReturns(e)
1104 f.setList(tableRegister, arrayCount, MultipleReturns)
1105 arrayCount--
1106 } else {
1107 if e.kind != kindVoid {
1108 f.ExpressionToNextRegister(e)
1109 }
1110 f.setList(tableRegister, arrayCount, pending)
1111 }
1112 }
1113 f.f.code[pc].setB(int(float8FromInt(arrayCount)))
1114 f.f.code[pc].setC(int(float8FromInt(hashCount)))
1115}
1116
1117func (f *function) OpenForBody(base, n int, isNumeric bool) (prep int) {
1118 if isNumeric {

Callers 1

constructorMethod · 0.80

Calls 7

SetMultipleReturnsMethod · 0.95
setListMethod · 0.95
float8FromIntFunction · 0.85
hasMultipleReturnsMethod · 0.80
setBMethod · 0.80
setCMethod · 0.80

Tested by

no test coverage detected