[pypy-svn] pypy commit 4959e3dccca7: Fix various tests crashing because of my recent changes at rlib.rstack.
Bitbucket
commits-noreply at bitbucket.org
Tue Dec 14 13:50:18 CET 2010
# HG changeset patch -- Bitbucket.org
# Project pypy
# URL http://bitbucket.org/pypy/pypy/overview
# User Armin Rigo <arigo at tunes.org>
# Date 1292331005 -3600
# Node ID 4959e3dccca7ab37617ae8532e90cc6cb94efd72
# Parent 987ea90229b55267e39fda11f2933dce10182a12
Fix various tests crashing because of my recent changes at rlib.rstack.
--- a/pypy/rpython/llinterp.py
+++ b/pypy/rpython/llinterp.py
@@ -948,6 +948,9 @@ class LLFrame(object):
def op_set_stack_depth_limit(self):
raise NotImplementedError("set_stack_depth_limit")
+ def op_stack_current(self):
+ return 0
+
# operations on pyobjects!
for opname in lloperation.opimpls.keys():
exec py.code.Source("""
--- a/pypy/translator/c/test/test_stackless.py
+++ b/pypy/translator/c/test/test_stackless.py
@@ -3,7 +3,7 @@ from pypy.translator.backendopt.all impo
from pypy.translator.c.genc import CStandaloneBuilder
from pypy.translator.c import gc
from pypy.annotation.listdef import s_list_of_strings
-from pypy.rlib.rstack import stack_unwind, stack_frames_depth, stack_too_big
+from pypy.rlib.rstack import stack_unwind, stack_frames_depth
from pypy.rlib.rstack import yield_current_frame_to_caller, set_stack_depth_limit
from pypy.config.config import Config
import os
--- a/pypy/rlib/rstack.py
+++ b/pypy/rlib/rstack.py
@@ -37,14 +37,18 @@ def stack_frames_depth():
compilation_info = ExternalCompilationInfo(includes=['src/stack.h'])
-def llexternal(name, args, res):
+def llexternal(name, args, res, _callable=None):
return rffi.llexternal(name, args, res, compilation_info=compilation_info,
- sandboxsafe=True, _nowrapper=True)
+ sandboxsafe=True, _nowrapper=True,
+ _callable=_callable)
-_stack_get_start = llexternal('LL_stack_get_start', [], lltype.Signed)
-_stack_get_length = llexternal('LL_stack_get_length', [], lltype.Signed)
+_stack_get_start = llexternal('LL_stack_get_start', [], lltype.Signed,
+ lambda: 0)
+_stack_get_length = llexternal('LL_stack_get_length', [], lltype.Signed,
+ lambda: 1)
_stack_too_big_slowpath = llexternal('LL_stack_too_big_slowpath',
- [lltype.Signed], lltype.Char)
+ [lltype.Signed], lltype.Char,
+ lambda cur: '\x00')
# the following is used by the JIT
_stack_get_start_adr = llexternal('LL_stack_get_start_adr', [], lltype.Signed)
More information about the Pypy-commit
mailing list