summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-04-15 15:33:52 (GMT)
committerGuido van Rossum <guido@python.org>1993-04-15 15:33:52 (GMT)
commitacbe8da4f886ad733401631a870ff58f8c0ad9a4 (patch)
tree648c6b7454c184e30332fc612826fd45f64cd188 /Python
parent8a0c3456c2020d1a1f87619c4651e4eab831938a (diff)
downloadcpython-acbe8da4f886ad733401631a870ff58f8c0ad9a4.zip
cpython-acbe8da4f886ad733401631a870ff58f8c0ad9a4.tar.gz
cpython-acbe8da4f886ad733401631a870ff58f8c0ad9a4.tar.bz2
(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.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 1206570..935ce52 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -37,16 +37,18 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "traceback.h"
/* 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: */
#define LLTRACE 1 /* Low-level trace feature */
#define CHECKEXC 1 /* Double-check exception checking */
#endif
-#define DEBUG
-
/* Forward declarations */
@@ -183,7 +185,7 @@ eval_code(co, globals, locals, arg)
char *name; /* Name used by some instructions */
int needmerge = 0;
#ifdef LLTRACE
- int lltrace = dictlookup(globals, "__lltrace__") != NULL;
+ int lltrace;
#endif
#ifdef DEBUG
/* Make it easier to find out where we are with dbx */
@@ -233,6 +235,10 @@ eval_code(co, globals, locals, arg)
locals = globals;
}
+#ifdef LLTRACE
+ lltrace = dictlookup(globals, "__lltrace__") != NULL;
+#endif
+
f = newframeobject(
current_frame, /*back*/
co, /*code*/
@@ -1523,6 +1529,7 @@ locals_2_fast(f, clear)
{
/* Merge f->f_locals into f->f_fastlocals */
object *locals, *fast, *map;
+ object *error_type, *error_value;
int i;
if (f == NULL)
return;
@@ -1534,6 +1541,7 @@ locals_2_fast(f, clear)
if (!is_dictobject(locals) || !is_listobject(fast) ||
!is_dictobject(map))
return;
+ err_get(&error_type, &error_value);
i = getdictsize(map);
while (--i >= 0) {
object *key;
@@ -1555,6 +1563,7 @@ locals_2_fast(f, clear)
if (setlistitem(fast, j, value) != 0)
err_clear();
}
+ err_setval(error_type, error_value);
}
void