Commits

Armin Rigo committed 9219bbb

Some more stm_assert_locals

Comments (0)

Files changed (1)

pypy/interpreter/pyframe.py

     def _new_popvalues():
         @jit.unroll_safe
         def popvalues(self, n):
+            hint(self, stm_assert_local=True)
             values_w = [None] * n
             while True:
                 n -= 1
 
     @jit.unroll_safe
     def peekvalues(self, n):
+        hint(self, stm_assert_local=True)
         values_w = [None] * n
         base = self.valuestackdepth - n
         assert base >= self.pycode.co_nlocals
 
     @jit.unroll_safe
     def dropvalues(self, n):
+        hint(self, stm_assert_local=True)
         n = hint(n, promote=True)
         finaldepth = self.valuestackdepth - n
         assert finaldepth >= self.pycode.co_nlocals, (
             self.pushvalue(w_value)
         
     def peekvalue(self, index_from_top=0):
+        hint(self, stm_assert_local=True)
         # NOTE: top of the stack is peekvalue(0).
         # Contrast this with CPython where it's PEEK(-1).
         index_from_top = hint(index_from_top, promote=True)
         return self.locals_stack_w[index]
 
     def settopvalue(self, w_object, index_from_top=0):
+        hint(self, stm_assert_local=True)
         index_from_top = hint(index_from_top, promote=True)
         index = self.valuestackdepth + ~index_from_top
         assert index >= self.pycode.co_nlocals, (