(options Options)
| 662 | } |
| 663 | |
| 664 | func newLState(options Options) *LState { |
| 665 | al := newAllocator(32) |
| 666 | ls := &LState{ |
| 667 | G: newGlobal(), |
| 668 | Parent: nil, |
| 669 | Panic: panicWithTraceback, |
| 670 | Dead: false, |
| 671 | Options: options, |
| 672 | |
| 673 | stop: 0, |
| 674 | alloc: al, |
| 675 | currentFrame: nil, |
| 676 | wrapped: false, |
| 677 | uvcache: nil, |
| 678 | hasErrorFunc: false, |
| 679 | mainLoop: mainLoop, |
| 680 | ctx: nil, |
| 681 | } |
| 682 | if options.MinimizeStackMemory { |
| 683 | ls.stack = newAutoGrowingCallFrameStack(options.CallStackSize) |
| 684 | } else { |
| 685 | ls.stack = newFixedCallFrameStack(options.CallStackSize) |
| 686 | } |
| 687 | ls.reg = newRegistry(ls, options.RegistrySize, options.RegistryGrowStep, options.RegistryMaxSize, al) |
| 688 | ls.Env = ls.G.Global |
| 689 | return ls |
| 690 | } |
| 691 | |
| 692 | func (ls *LState) printReg() { |
| 693 | println("-------------------------") |
no test coverage detected
searching dependent graphs…