MCPcopy Index your code
hub / github.com/yuin/gopher-lua / newFunctionProto

Function newFunctionProto

function.go:90–110  ·  view source on GitHub ↗

* }}} */ * FunctionProto {{{ */

(name string)

Source from the content-addressed store, hash-verified

88/* FunctionProto {{{ */
89
90func newFunctionProto(name string) *FunctionProto {
91 return &FunctionProto{
92 SourceName: name,
93 LineDefined: 0,
94 LastLineDefined: 0,
95 NumUpvalues: 0,
96 NumParameters: 0,
97 IsVarArg: 0,
98 NumUsedRegisters: 2,
99 Code: make([]uint32, 0, 128),
100 Constants: make([]LValue, 0, 32),
101 FunctionPrototypes: make([]*FunctionProto, 0, 16),
102
103 DbgSourcePositions: make([]int, 0, 128),
104 DbgLocals: make([]*DbgLocalInfo, 0, 16),
105 DbgCalls: make([]DbgCall, 0, 128),
106 DbgUpvalues: make([]string, 0, 16),
107
108 stringConstants: make([]string, 0, 32),
109 }
110}
111
112func (fp *FunctionProto) String() string {
113 return fp.str(1, 0)

Callers 1

newFuncContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…