Commit e0bc9cb3 authored by Guido van Rossum's avatar Guido van Rossum

Add global Py_OptimizeFlag. SET_LINENO is omitted again unless this is

nonzero.
parent 4fb3ab22
...@@ -59,6 +59,8 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -59,6 +59,8 @@ PERFORMANCE OF THIS SOFTWARE.
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
int Py_OptimizeFlag = 0;
#define OP_DELETE 0 #define OP_DELETE 0
#define OP_ASSIGN 1 #define OP_ASSIGN 1
#define OP_APPLY 2 #define OP_APPLY 2
...@@ -579,12 +581,13 @@ com_addoparg(c, op, arg) ...@@ -579,12 +581,13 @@ com_addoparg(c, op, arg)
int op; int op;
int arg; int arg;
{ {
if (op == SET_LINENO) if (op == SET_LINENO) {
com_set_lineno(c, arg); com_set_lineno(c, arg);
else { if (Py_OptimizeFlag)
com_addbyte(c, op); return;
com_addint(c, arg);
} }
com_addbyte(c, op);
com_addint(c, arg);
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment