Explorar o código

Wire up the JIT's compiled_function_lookup member in the kernel

jonathanvdc %!s(int64=8) %!d(string=hai) anos
pai
achega
6cdf50bda4
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      kernel/modelverse_kernel/main.py

+ 4 - 0
kernel/modelverse_kernel/main.py

@@ -20,6 +20,10 @@ class ModelverseKernel(object):
 
         # `self.jit` handles most JIT-related functionality.
         self.jit = jit.ModelverseJit()
+        if self.allow_compiled:
+            self.jit.compiled_function_lookup = lambda func_name: \
+                getattr(compiled_functions, func_name, None)
+
         # To disable the JIT, uncomment the line below:
         #     self.jit.set_jit_enabled(False)
         self.debug_info = "(no debug information found)"