Package org.pkl.core.runtime
Class ModuleCache
java.lang.Object
org.pkl.core.runtime.ModuleCache
Caches modules by the URI originally specified in the importing module, and also by the resolved
URI from which the module was eventually loaded. Caching by original URI avoids any overhead
incurred by resolving a module multiple times. Caching by resolved URI avoids any overhead
incurred by evaluating a module multiple times, and also avoids any inconsistencies caused by
module contents changing during evaluation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOrLoad(ModuleKey moduleKey, SecurityManager securityManager, ModuleResolver moduleResolver, Supplier<VmTyped> moduleInstantiator, ModuleCache.ModuleInitializer moduleInitializer, @Nullable com.oracle.truffle.api.nodes.Node importNode)
-
Constructor Details
-
ModuleCache
public ModuleCache()
-
-
Method Details
-
getOrLoad
public VmTyped getOrLoad(ModuleKey moduleKey, SecurityManager securityManager, ModuleResolver moduleResolver, Supplier<VmTyped> moduleInstantiator, ModuleCache.ModuleInitializer moduleInitializer, @Nullable @Nullable com.oracle.truffle.api.nodes.Node importNode)
-