Explorar o código

Protect non-call JIT input implementation from GC

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

+ 4 - 0
kernel/modelverse_jit/jit.py

@@ -622,6 +622,7 @@ class AnalysisState(object):
         #
         #     _next = yield [("RD", [_input, "next"])]
         #     yield [("CD", [user_root, "input", _next])]
+        #     yield [("CE", [jit_locals, value])]
         #     yield [("DN", [_input])]
 
         user_root = self.retrieve_user_root()
@@ -664,6 +665,9 @@ class AnalysisState(object):
                         tree_ir.ReadDictionaryValueInstruction(
                             _input.create_load(),
                             tree_ir.LiteralInstruction('next'))),
+                    tree_ir.CreateEdgeInstruction(
+                        tree_ir.LoadLocalInstruction(LOCALS_NODE_NAME),
+                        value.create_load()),
                     tree_ir.DeleteNodeInstruction(_input.create_load())),
                 value.create_load()))
 

+ 1 - 1
kernel/modelverse_kernel/main.py

@@ -60,7 +60,7 @@ class ModelverseKernel(object):
         # To make the JIT compile 'input' instructions as calls to
         # modelverse_jit.runtime.get_input, uncomment the line below:
         #
-        self.jit.use_input_function()
+        #     self.jit.use_input_function()
         #
 
         self.debug_info = defaultdict(list)