[pypy-commit] pypy tealet: Add asserts.

arigo noreply at buildbot.pypy.org
Wed Jul 6 20:28:39 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: tealet
Changeset: r45378:c1f87a237e06
Date: 2011-06-11 18:15 +0200
http://bitbucket.org/pypy/pypy/changeset/c1f87a237e06/

Log:	Add asserts.

diff --git a/pypy/rpython/memory/gctransform/framework.py b/pypy/rpython/memory/gctransform/framework.py
--- a/pypy/rpython/memory/gctransform/framework.py
+++ b/pypy/rpython/memory/gctransform/framework.py
@@ -1009,11 +1009,15 @@
     def gct_gc_walk_stack_roots(self, hop):
         # only available if tealet support is enabled
         assert self.translator.config.translation.tealet
+        # no gc root in the stack around such an llop!
+        assert not self.push_roots(hop)
         hop.genop("direct_call", [self.root_walker.ll_walk_stack_roots_ptr]
                                  + hop.spaceop.args)
 
     def gct_gc_set_stack_roots_count(self, hop):
         assert self.translator.config.translation.tealet
+        # no gc root in the stack around such an llop!
+        assert not self.push_roots(hop)
         if hasattr(self.root_walker, 'set_stack_roots_count_ptr'):
             hop.genop("direct_call",
                       [self.root_walker.set_stack_roots_count_ptr]


More information about the pypy-commit mailing list