diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/compile.h | 1 | ||||
-rw-r--r-- | Include/frameobject.h | 2 | ||||
-rw-r--r-- | Include/graminit.h | 89 | ||||
-rw-r--r-- | Include/opcode.h | 1 | ||||
-rw-r--r-- | Include/symtable.h | 1 |
5 files changed, 50 insertions, 44 deletions
diff --git a/Include/compile.h b/Include/compile.h index e60af59..74b068d 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -33,6 +33,7 @@ typedef struct { #define CO_VARARGS 0x0004 #define CO_VARKEYWORDS 0x0008 #define CO_NESTED 0x0010 +#define CO_GENERATOR 0x0020 extern DL_IMPORT(PyTypeObject) PyCode_Type; diff --git a/Include/frameobject.h b/Include/frameobject.h index 10d4935..b620f76 100644 --- a/Include/frameobject.h +++ b/Include/frameobject.h @@ -21,6 +21,8 @@ typedef struct _frame { PyObject *f_globals; /* global symbol table (PyDictObject) */ PyObject *f_locals; /* local symbol table (PyDictObject) */ PyObject **f_valuestack; /* points after the last local */ + PyObject **f_stackbottom; /* points to the last item on the stack if + frame has yielded. */ PyObject *f_trace; /* Trace function */ PyObject *f_exc_type, *f_exc_value, *f_exc_traceback; PyThreadState *f_tstate; diff --git a/Include/graminit.h b/Include/graminit.h index 350df35..219be94 100644 --- a/Include/graminit.h +++ b/Include/graminit.h @@ -18,47 +18,48 @@ #define break_stmt 273 #define continue_stmt 274 #define return_stmt 275 -#define raise_stmt 276 -#define import_stmt 277 -#define import_as_name 278 -#define dotted_as_name 279 -#define dotted_name 280 -#define global_stmt 281 -#define exec_stmt 282 -#define assert_stmt 283 -#define compound_stmt 284 -#define if_stmt 285 -#define while_stmt 286 -#define for_stmt 287 -#define try_stmt 288 -#define except_clause 289 -#define suite 290 -#define test 291 -#define and_test 292 -#define not_test 293 -#define comparison 294 -#define comp_op 295 -#define expr 296 -#define xor_expr 297 -#define and_expr 298 -#define shift_expr 299 -#define arith_expr 300 -#define term 301 -#define factor 302 -#define power 303 -#define atom 304 -#define listmaker 305 -#define lambdef 306 -#define trailer 307 -#define subscriptlist 308 -#define subscript 309 -#define sliceop 310 -#define exprlist 311 -#define testlist 312 -#define dictmaker 313 -#define classdef 314 -#define arglist 315 -#define argument 316 -#define list_iter 317 -#define list_for 318 -#define list_if 319 +#define yield_stmt 276 +#define raise_stmt 277 +#define import_stmt 278 +#define import_as_name 279 +#define dotted_as_name 280 +#define dotted_name 281 +#define global_stmt 282 +#define exec_stmt 283 +#define assert_stmt 284 +#define compound_stmt 285 +#define if_stmt 286 +#define while_stmt 287 +#define for_stmt 288 +#define try_stmt 289 +#define except_clause 290 +#define suite 291 +#define test 292 +#define and_test 293 +#define not_test 294 +#define comparison 295 +#define comp_op 296 +#define expr 297 +#define xor_expr 298 +#define and_expr 299 +#define shift_expr 300 +#define arith_expr 301 +#define term 302 +#define factor 303 +#define power 304 +#define atom 305 +#define listmaker 306 +#define lambdef 307 +#define trailer 308 +#define subscriptlist 309 +#define subscript 310 +#define sliceop 311 +#define exprlist 312 +#define testlist 313 +#define dictmaker 314 +#define classdef 315 +#define arglist 316 +#define argument 317 +#define list_iter 318 +#define list_for 319 +#define list_if 320 diff --git a/Include/opcode.h b/Include/opcode.h index 0cace8e..c1e8362 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -71,6 +71,7 @@ extern "C" { #define RETURN_VALUE 83 #define IMPORT_STAR 84 #define EXEC_STMT 85 +#define YIELD_VALUE 86 #define POP_BLOCK 87 #define END_FINALLY 88 diff --git a/Include/symtable.h b/Include/symtable.h index 315ce1f..9ceecf0 100644 --- a/Include/symtable.h +++ b/Include/symtable.h @@ -46,6 +46,7 @@ typedef struct _symtable_entry { int ste_nested; /* true if scope is nested */ int ste_child_free; /* true if a child scope has free variables, including free refs to globals */ + int ste_generator; /* true if namespace is a generator */ int ste_opt_lineno; /* lineno of last exec or import * */ struct symtable *ste_table; } PySymtableEntryObject; |