summaryrefslogtreecommitdiff
path: root/script-beta/vm/vm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/vm/vm.lua')
-rw-r--r--script-beta/vm/vm.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/script-beta/vm/vm.lua b/script-beta/vm/vm.lua
index 5028a67c..26f1f190 100644
--- a/script-beta/vm/vm.lua
+++ b/script-beta/vm/vm.lua
@@ -6,6 +6,7 @@ local assert = assert
local require = require
local type = type
local running = coroutine.running
+local ipairs = ipairs
_ENV = nil
@@ -139,6 +140,16 @@ function m.getKeyName(source)
return guide.getKeyName(source)
end
+function m.mergeResults(a, b)
+ for _, r in ipairs(b) do
+ if not a[r] then
+ a[r] = true
+ a[#a+1] = r
+ end
+ end
+ return a
+end
+
m.cacheTracker = setmetatable({}, { __mode = 'kv' })
--- 刷新缓存