mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
"Compiling" version
This commit is contained in:
parent
226d79eb4a
commit
3f5da24ea3
72 changed files with 3363 additions and 2061 deletions
23
Include/compile.h
Normal file
23
Include/compile.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* 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 *));
|
Loading…
Add table
Add a link
Reference in a new issue