summaryrefslogtreecommitdiff
path: root/server/src/core/vm.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-29 10:28:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-29 10:28:18 +0800
commit7d2e059198799acd874e8399bcb25920414e28da (patch)
tree6e9ac8315be5e0daee1649288f8a05eefd543eb4 /server/src/core/vm.lua
parentf7cd883a6a75fe9afb1700b8472bcd58ac34cbbe (diff)
downloadlua-language-server-7d2e059198799acd874e8399bcb25920414e28da.zip
根据影响范围来打包嵌套
Diffstat (limited to 'server/src/core/vm.lua')
-rw-r--r--server/src/core/vm.lua3
1 files changed, 0 insertions, 3 deletions
diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua
index f60fcb57..5ccada8e 100644
--- a/server/src/core/vm.lua
+++ b/server/src/core/vm.lua
@@ -119,7 +119,6 @@ function mt:createLocal(key, source, value)
self.scope.locals[key] = loc
self.results.locals[#self.results.locals+1] = loc
- self.chunk.locals[#self.chunk.locals+1] = loc
self:addInfo(loc, 'local', source)
self:setValue(loc, value, source)
@@ -401,7 +400,6 @@ function mt:buildFunction(exp, object)
self.chunk:cut 'dots'
self.chunk:cut 'labels'
self.chunk.func = func
- self.chunk.locals = {}
if object then
local var = self:createArg('self', object.source, self:getValue(object))
@@ -1436,7 +1434,6 @@ function mt:createEnvironment()
self.scope.block = { start = 0, finish = math.maxinteger }
-- 整个文件是一个函数
self.chunk.func = self:buildFunction()
- self.chunk.locals = {}
self.results.main = self.chunk.func
-- 隐藏的上值`_ENV`
local parent = self:createLocal('_ENV')