mirror of
https://github.com/python/cpython.git
synced 2025-11-13 15:40:05 +00:00
(I suggest a recompile after getting this, the ceval.c bugfix may be crucial!)
* Makefile: removed superfluous AR=ar, fixed misleading comment. * ceval.c: fixed debugging code; save/restore errors in locals_2_fast. * intrcheck.c: for SunOS etc., turn off syscall resumption. * regexpr.h: bump number of registers to 100.
This commit is contained in:
parent
8a0c3456c2
commit
acbe8da4f8
3 changed files with 24 additions and 6 deletions
|
|
@ -24,7 +24,7 @@ Last modified: Mon Nov 4 15:49:46 1991 ylo
|
||||||
#define HAVE_PROTOTYPES
|
#define HAVE_PROTOTYPES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RE_NREGS 10 /* number of registers available */
|
#define RE_NREGS 100 /* number of registers available */
|
||||||
|
|
||||||
typedef struct re_pattern_buffer
|
typedef struct re_pattern_buffer
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,15 @@ initintr()
|
||||||
{
|
{
|
||||||
if (signal(SIGINT, SIG_IGN) != SIG_IGN)
|
if (signal(SIGINT, SIG_IGN) != SIG_IGN)
|
||||||
signal(SIGINT, intcatcher);
|
signal(SIGINT, intcatcher);
|
||||||
|
#ifdef SV_INTERRUPT
|
||||||
|
/* This is for SunOS and other modern BSD derivatives.
|
||||||
|
It means that system calls (like read()) are not restarted
|
||||||
|
after an interrupt. This is necessary so interrupting a
|
||||||
|
read() or readline() call works as expected.
|
||||||
|
XXX On old BSD (pure 4.2 or older) you may have to do this
|
||||||
|
differently! */
|
||||||
|
siginterrupt(SIGINT, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
|
|
@ -39,14 +39,16 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
/* Turn this on if your compiler chokes on the big switch: */
|
/* Turn this on if your compiler chokes on the big switch: */
|
||||||
/* #define CASE_TOO_BIG 1 /**/
|
/* #define CASE_TOO_BIG 1 /**/
|
||||||
|
|
||||||
#ifndef NDEBUG
|
/* Turn this on if you want to debug the interpreter: */
|
||||||
|
/* (This can be on even if NDEBUG is defined) */
|
||||||
|
/* #define DEBUG 1 /**/
|
||||||
|
|
||||||
|
#if defined(DEBUG) || !defined(NDEBUG)
|
||||||
/* For debugging the interpreter: */
|
/* For debugging the interpreter: */
|
||||||
#define LLTRACE 1 /* Low-level trace feature */
|
#define LLTRACE 1 /* Low-level trace feature */
|
||||||
#define CHECKEXC 1 /* Double-check exception checking */
|
#define CHECKEXC 1 /* Double-check exception checking */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG
|
|
||||||
|
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
|
||||||
|
|
@ -183,7 +185,7 @@ eval_code(co, globals, locals, arg)
|
||||||
char *name; /* Name used by some instructions */
|
char *name; /* Name used by some instructions */
|
||||||
int needmerge = 0;
|
int needmerge = 0;
|
||||||
#ifdef LLTRACE
|
#ifdef LLTRACE
|
||||||
int lltrace = dictlookup(globals, "__lltrace__") != NULL;
|
int lltrace;
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
/* Make it easier to find out where we are with dbx */
|
/* Make it easier to find out where we are with dbx */
|
||||||
|
|
@ -233,6 +235,10 @@ eval_code(co, globals, locals, arg)
|
||||||
locals = globals;
|
locals = globals;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LLTRACE
|
||||||
|
lltrace = dictlookup(globals, "__lltrace__") != NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
f = newframeobject(
|
f = newframeobject(
|
||||||
current_frame, /*back*/
|
current_frame, /*back*/
|
||||||
co, /*code*/
|
co, /*code*/
|
||||||
|
|
@ -1523,6 +1529,7 @@ locals_2_fast(f, clear)
|
||||||
{
|
{
|
||||||
/* Merge f->f_locals into f->f_fastlocals */
|
/* Merge f->f_locals into f->f_fastlocals */
|
||||||
object *locals, *fast, *map;
|
object *locals, *fast, *map;
|
||||||
|
object *error_type, *error_value;
|
||||||
int i;
|
int i;
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
@ -1534,6 +1541,7 @@ locals_2_fast(f, clear)
|
||||||
if (!is_dictobject(locals) || !is_listobject(fast) ||
|
if (!is_dictobject(locals) || !is_listobject(fast) ||
|
||||||
!is_dictobject(map))
|
!is_dictobject(map))
|
||||||
return;
|
return;
|
||||||
|
err_get(&error_type, &error_value);
|
||||||
i = getdictsize(map);
|
i = getdictsize(map);
|
||||||
while (--i >= 0) {
|
while (--i >= 0) {
|
||||||
object *key;
|
object *key;
|
||||||
|
|
@ -1555,6 +1563,7 @@ locals_2_fast(f, clear)
|
||||||
if (setlistitem(fast, j, value) != 0)
|
if (setlistitem(fast, j, value) != 0)
|
||||||
err_clear();
|
err_clear();
|
||||||
}
|
}
|
||||||
|
err_setval(error_type, error_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue