Commits

timfel committed aa6a443

(krono, timfel) fix closure detection when creating a MethodContext shadow

  • Participants
  • Parent commits 15149ca

Comments (0)

Files changed (1)

File spyvm/shadow.py

     
     @jit.dont_look_inside
     def attach_shadow(self):
-        # Make sure the method is updated first
+        # Make sure the method and closure_or_nil are updated first,
+        # otherwise tempsize may be wrong
         self.copy_from_w_self(constants.MTHDCTX_METHOD)
+        self.copy_from_w_self(constants.MTHDCTX_CLOSURE_OR_NIL)
         self.init_stack_and_temps()
         ContextPartShadow.attach_shadow(self)