code: func (l *State) CheckStack(size int) bool {
  	callInfo := l.callInfo
  	ok := l.stackLast-l.top > size
  	if !ok && l.top+extraStack <= maxStack-size {
  		ok = l.protect(func() { l.growStack(size) }) == nil
  	}
  	if ok && callInfo.top < l.top+size {
  		callInfo.setTop(l.top + size)
  	}
  	return ok
  }
docs: // CheckStack ensures that there are at least size free stack slots in the
  // stack. This call will not panic(), unlike the other Check*() functions.
  //
  // http://www.lua.org/manual/5.2/manual.html#lua_checkstack