summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-10-18 17:06:59 (GMT)
committerGuido van Rossum <guido@python.org>1993-10-18 17:06:59 (GMT)
commitdb3165e6559c6b83373e7fed9cdf4371552a9a8e (patch)
tree97b057363244668ebec6630553a86ad2206e3fd2 /Include
parentcacd9579d48cb1e2acc3536c9701987b118edf8c (diff)
downloadcpython-db3165e6559c6b83373e7fed9cdf4371552a9a8e.zip
cpython-db3165e6559c6b83373e7fed9cdf4371552a9a8e.tar.gz
cpython-db3165e6559c6b83373e7fed9cdf4371552a9a8e.tar.bz2
* bltinmodule.c: removed exec() built-in function.
* Grammar: add exec statement; allow testlist in expr statement. * ceval.c, compile.c, opcode.h: support exec statement; avoid optimizing locals when it is used * fileobject.{c,h}: add getfilename() internal function.
Diffstat (limited to 'Include')
-rw-r--r--Include/fileobject.h1
-rw-r--r--Include/graminit.h53
-rw-r--r--Include/opcode.h2
3 files changed, 30 insertions, 26 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h
index 14c345f..00e4ca9 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -38,6 +38,7 @@ extern object *newfileobject PROTO((char *, char *));
extern object *newopenfileobject
PROTO((FILE *, char *, char *, int (*)FPROTO((FILE *))));
extern FILE *getfilefile PROTO((object *));
+extern object *getfilename PROTO((object *));
extern object *filegetline PROTO((object *, int));
#ifdef __cplusplus
diff --git a/Include/graminit.h b/Include/graminit.h
index 0ba02a6..288e333 100644
--- a/Include/graminit.h
+++ b/Include/graminit.h
@@ -23,29 +23,30 @@
#define global_stmt 278
#define access_stmt 279
#define accesstype 280
-#define compound_stmt 281
-#define if_stmt 282
-#define while_stmt 283
-#define for_stmt 284
-#define try_stmt 285
-#define except_clause 286
-#define suite 287
-#define test 288
-#define and_test 289
-#define not_test 290
-#define comparison 291
-#define comp_op 292
-#define expr 293
-#define xor_expr 294
-#define and_expr 295
-#define shift_expr 296
-#define arith_expr 297
-#define term 298
-#define factor 299
-#define atom 300
-#define trailer 301
-#define subscript 302
-#define exprlist 303
-#define testlist 304
-#define dictmaker 305
-#define classdef 306
+#define exec_stmt 281
+#define compound_stmt 282
+#define if_stmt 283
+#define while_stmt 284
+#define for_stmt 285
+#define try_stmt 286
+#define except_clause 287
+#define suite 288
+#define test 289
+#define and_test 290
+#define not_test 291
+#define comparison 292
+#define comp_op 293
+#define expr 294
+#define xor_expr 295
+#define and_expr 296
+#define shift_expr 297
+#define arith_expr 298
+#define term 299
+#define factor 300
+#define atom 301
+#define trailer 302
+#define subscript 303
+#define exprlist 304
+#define testlist 305
+#define dictmaker 306
+#define classdef 307
diff --git a/Include/opcode.h b/Include/opcode.h
index b53b44d..53ce333 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -78,6 +78,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define RAISE_EXCEPTION 81
#define LOAD_LOCALS 82
#define RETURN_VALUE 83
+#define LOAD_GLOBALS 84
+#define EXEC_STMT 85
#define BUILD_FUNCTION 86
#define POP_BLOCK 87