diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-26 16:20:31 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-26 16:20:31 +0800 |
commit | 7a74219cc543dc2b25a5831e8a9f22a63909cd75 (patch) | |
tree | dc6126bdde9e8314999da2f92396ed906749e1ba /server/src/vm/library.lua | |
parent | 637253ee878d80add56c09ea5ecf3369e99cc40e (diff) | |
download | lua-language-server-7a74219cc543dc2b25a5831e8a9f22a63909cd75.zip |
统计存活的函数
Diffstat (limited to 'server/src/vm/library.lua')
-rw-r--r-- | server/src/vm/library.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/vm/library.lua b/server/src/vm/library.lua index 54dca81f..ed5c2e7f 100644 --- a/server/src/vm/library.lua +++ b/server/src/vm/library.lua @@ -1,7 +1,7 @@ local sourceMgr = require 'vm.source' local valueMgr -local createFunction +local functionMgr local CHILD_CACHE = {} local VALUE_CACHE = {} @@ -15,7 +15,7 @@ function buildLibValue(lib) end if not valueMgr then valueMgr = require 'vm.value' - createFunction = require 'vm.function' + functionMgr = require 'vm.function' end local tp = lib.type local value @@ -23,7 +23,7 @@ function buildLibValue(lib) value = valueMgr.create('table', sourceMgr.dummy()) elseif tp == 'function' then value = valueMgr.create('function', sourceMgr.dummy()) - local func = createFunction() + local func = functionMgr.create() value:setFunction(func) if lib.args then for _, arg in ipairs(lib.args) do @@ -69,7 +69,7 @@ end function buildLibChild(lib) if not valueMgr then valueMgr = require 'vm.value' - createFunction = require 'vm.function' + functionMgr = require 'vm.function' end if CHILD_CACHE[lib] then return CHILD_CACHE[lib] |