[pypy-commit] pypy default: Kill this specialization. It's mostly pointless and it gives
arigo
noreply at buildbot.pypy.org
Wed Feb 22 16:30:22 CET 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r52758:e0b455a97502
Date: 2012-02-22 16:24 +0100
http://bitbucket.org/pypy/pypy/changeset/e0b455a97502/
Log: Kill this specialization. It's mostly pointless and it gives
occasionally headaches because fatalerror() is called from several
levels.
(Manual transplant of c1db98c91413 and 8c8b4968177b.)
diff --git a/pypy/jit/backend/llsupport/gc.py b/pypy/jit/backend/llsupport/gc.py
--- a/pypy/jit/backend/llsupport/gc.py
+++ b/pypy/jit/backend/llsupport/gc.py
@@ -1,7 +1,6 @@
import os
from pypy.rlib import rgc
from pypy.rlib.objectmodel import we_are_translated, specialize
-from pypy.rlib.debug import fatalerror
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rpython.lltypesystem import lltype, llmemory, rffi, rclass, rstr
from pypy.rpython.lltypesystem import llgroup
diff --git a/pypy/jit/metainterp/warmspot.py b/pypy/jit/metainterp/warmspot.py
--- a/pypy/jit/metainterp/warmspot.py
+++ b/pypy/jit/metainterp/warmspot.py
@@ -453,7 +453,7 @@
if sys.stdout == sys.__stdout__:
import pdb; pdb.post_mortem(tb)
raise e.__class__, e, tb
- fatalerror('~~~ Crash in JIT! %s' % (e,), traceback=True)
+ fatalerror('~~~ Crash in JIT! %s' % (e,))
crash_in_jit._dont_inline_ = True
if self.translator.rtyper.type_system.name == 'lltypesystem':
diff --git a/pypy/rlib/debug.py b/pypy/rlib/debug.py
--- a/pypy/rlib/debug.py
+++ b/pypy/rlib/debug.py
@@ -19,14 +19,22 @@
hop.exception_cannot_occur()
hop.genop('debug_assert', vlist)
-def fatalerror(msg, traceback=False):
+def fatalerror(msg):
+ # print the RPython traceback and abort with a fatal error
from pypy.rpython.lltypesystem import lltype
from pypy.rpython.lltypesystem.lloperation import llop
- if traceback:
- llop.debug_print_traceback(lltype.Void)
+ llop.debug_print_traceback(lltype.Void)
llop.debug_fatalerror(lltype.Void, msg)
fatalerror._dont_inline_ = True
-fatalerror._annspecialcase_ = 'specialize:arg(1)'
+fatalerror._annenforceargs_ = [str]
+
+def fatalerror_notb(msg):
+ # a variant of fatalerror() that doesn't print the RPython traceback
+ from pypy.rpython.lltypesystem import lltype
+ from pypy.rpython.lltypesystem.lloperation import llop
+ llop.debug_fatalerror(lltype.Void, msg)
+fatalerror_notb._dont_inline_ = True
+fatalerror_notb._annenforceargs_ = [str]
class DebugLog(list):
More information about the pypy-commit
mailing list