summaryrefslogtreecommitdiff
path: root/server/src/vm/library.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/library.lua')
-rw-r--r--server/src/vm/library.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/server/src/vm/library.lua b/server/src/vm/library.lua
index 4545b1b5..65a70219 100644
--- a/server/src/vm/library.lua
+++ b/server/src/vm/library.lua
@@ -1,5 +1,5 @@
-local createValue = require 'vm.value'
-local createFunction = require 'vm.function'
+local createValue
+local createFunction
local CHILD_CACHE = {}
@@ -7,6 +7,10 @@ local buildLibValue
local buildLibChild
function buildLibValue(lib)
+ if not createValue then
+ createValue = require 'vm.value'
+ createFunction = require 'vm.function'
+ end
local tp = lib.type
local value
if tp == 'table' then
@@ -55,6 +59,10 @@ function buildLibValue(lib)
end
function buildLibChild(lib)
+ if not createValue then
+ createValue = require 'vm.value'
+ createFunction = require 'vm.function'
+ end
if CHILD_CACHE[lib] then
return CHILD_CACHE[lib]
end