[pypy-commit] pypy default: Check more in-depth that we don't produce a JitCode for a function with
fijal
noreply at buildbot.pypy.org
Sat Jan 5 13:59:20 CET 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r59718:1c7011a1b5ed
Date: 2013-01-05 12:19 +0100
http://bitbucket.org/pypy/pypy/changeset/1c7011a1b5ed/
Log: Check more in-depth that we don't produce a JitCode for a function
with _gctransformer_hint_close_stack_ set
diff --git a/pypy/jit/codewriter/call.py b/pypy/jit/codewriter/call.py
--- a/pypy/jit/codewriter/call.py
+++ b/pypy/jit/codewriter/call.py
@@ -135,6 +135,8 @@
return 'residual'
targetgraph = funcobj.graph
if hasattr(targetgraph, 'func'):
+ # must never produce JitCode for a function with
+ # _gctransformer_hint_close_stack_ set!
if getattr(targetgraph.func,
'_gctransformer_hint_close_stack_', False):
return 'residual'
@@ -167,6 +169,13 @@
try:
return self.jitcodes[graph]
except KeyError:
+ # must never produce JitCode for a function with
+ # _gctransformer_hint_close_stack_ set!
+ if hasattr(graph, 'func') and getattr(graph.func,
+ '_gctransformer_hint_close_stack_', False):
+ raise AssertionError(
+ '%s has _gctransformer_hint_close_stack_' % (graph,))
+ #
fnaddr, calldescr = self.get_jitcode_calldescr(graph)
jitcode = JitCode(graph.name, fnaddr, calldescr,
called_from=called_from)
More information about the pypy-commit
mailing list