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

Method Set

state.go:599–613  ·  view source on GitHub ↗
(regi int, vali LValue)

Source from the content-addressed store, hash-verified

597}
598
599func (rg *registry) Set(regi int, vali LValue) { // +inline-start
600 newSize := regi + 1
601 // this section is inlined by go-inline
602 // source function is 'func (rg *registry) checkSize(requiredSize int) ' in '_state.go'
603 {
604 requiredSize := newSize
605 if requiredSize > cap(rg.array) {
606 rg.resize(requiredSize)
607 }
608 }
609 rg.array[regi] = vali
610 if regi >= rg.top {
611 rg.top = regi + 1
612 }
613} // +inline-end
614
615func (rg *registry) SetNumber(regi int, vali LNumber) { // +inline-start
616 newSize := regi + 1

Callers 5

SetValueMethod · 0.45
ReplaceMethod · 0.45
InsertMethod · 0.45
RemoveMethod · 0.45
SetLocalMethod · 0.45

Calls 1

resizeMethod · 0.95

Tested by

no test coverage detected