mirror of
https://github.com/python/cpython.git
synced 2024-11-27 11:55:13 +08:00
24 lines
604 B
C
24 lines
604 B
C
|
/* Definitions for compiled intermediate code */
|
||
|
|
||
|
|
||
|
/* An intermediate code fragment contains:
|
||
|
- a string that encodes the instructions,
|
||
|
- a list of the constants,
|
||
|
- and a list of the names used. */
|
||
|
|
||
|
typedef struct {
|
||
|
OB_HEAD
|
||
|
stringobject *co_code; /* instruction opcodes */
|
||
|
object *co_consts; /* list of immutable constant objects */
|
||
|
object *co_names; /* list of stringobjects */
|
||
|
object *co_filename; /* string */
|
||
|
} codeobject;
|
||
|
|
||
|
extern typeobject Codetype;
|
||
|
|
||
|
#define is_codeobject(op) ((op)->ob_type == &Codetype)
|
||
|
|
||
|
|
||
|
/* Public interface */
|
||
|
codeobject *compile PROTO((struct _node *, char *));
|