Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
884afd65
Kaydet (Commit)
884afd65
authored
Tem 18, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
keyword arguments and faster function calls
üst
e15dee5e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
32 deletions
+38
-32
ceval.h
Include/ceval.h
+2
-0
compile.h
Include/compile.h
+21
-16
eval.h
Include/eval.h
+1
-2
frameobject.h
Include/frameobject.h
+0
-1
funcobject.h
Include/funcobject.h
+4
-5
object.h
Include/object.h
+1
-1
opcode.h
Include/opcode.h
+4
-6
patchlevel.h
Include/patchlevel.h
+1
-1
traceback.h
Include/traceback.h
+4
-0
No files found.
Include/ceval.h
Dosyayı görüntüle @
884afd65
...
@@ -31,6 +31,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -31,6 +31,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Interface to random parts in ceval.c */
/* Interface to random parts in ceval.c */
PyObject
*
PyEval_CallObject
Py_PROTO
((
PyObject
*
,
PyObject
*
));
PyObject
*
PyEval_CallObject
Py_PROTO
((
PyObject
*
,
PyObject
*
));
PyObject
*
PyEval_CallObjectWithKeywords
Py_PROTO
((
PyObject
*
,
PyObject
*
,
PyObject
*
));
PyObject
*
PyEval_GetBuiltins
Py_PROTO
((
void
));
PyObject
*
PyEval_GetBuiltins
Py_PROTO
((
void
));
PyObject
*
PyEval_GetGlobals
Py_PROTO
((
void
));
PyObject
*
PyEval_GetGlobals
Py_PROTO
((
void
));
...
...
Include/compile.h
Dosyayı görüntüle @
884afd65
...
@@ -28,25 +28,29 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -28,25 +28,29 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
******************************************************************/
/* Definitions for compiled intermediate code */
/* Definitions for bytecode */
/* An intermediate code fragment contains:
- a string that encodes the instructions,
- a list of the constants,
- a list of the names used,
- the filename from which it was compiled,
- the name of the object for which it was compiled. */
/* Bytecode object */
typedef
struct
{
typedef
struct
{
PyObject_HEAD
PyObject_HEAD
PyStringObject
*
co_code
;
/* instruction opcodes */
int
co_argcount
;
/* #arguments, except *args */
PyObject
*
co_consts
;
/* list of immutable constant objects */
int
co_nlocals
;
/* #local variables */
PyObject
*
co_names
;
/* list of stringobjects */
int
co_flags
;
/* CO_..., see below */
PyObject
*
co_filename
;
/* string */
PyStringObject
*
co_code
;
/* instruction opcodes */
PyObject
*
co_name
;
/* string */
PyObject
*
co_consts
;
/* list (constants used) */
PyObject
*
co_names
;
/* list of strings (names used) */
PyObject
*
co_varnames
;
/* tuple of strings (local variable names) */
/* The rest doesn't count for hash/cmp */
PyObject
*
co_filename
;
/* string (where it was loaded from) */
PyObject
*
co_name
;
/* string (name, for reference) */
}
PyCodeObject
;
}
PyCodeObject
;
/* Masks for co_flags above */
#define CO_OPTIMIZED 0x0001
#define CO_NEWLOCALS 0x0002
#define CO_VARARGS 0x0004
#define CO_VARKEYWORDS 0x0008
extern
DL_IMPORT
(
PyTypeObject
)
PyCode_Type
;
extern
DL_IMPORT
(
PyTypeObject
)
PyCode_Type
;
#define PyCode_Check(op) ((op)->ob_type == &PyCode_Type)
#define PyCode_Check(op) ((op)->ob_type == &PyCode_Type)
...
@@ -55,8 +59,9 @@ extern DL_IMPORT(PyTypeObject) PyCode_Type;
...
@@ -55,8 +59,9 @@ extern DL_IMPORT(PyTypeObject) PyCode_Type;
/* Public interface */
/* Public interface */
struct
_node
;
/* Declare the existence of this type */
struct
_node
;
/* Declare the existence of this type */
PyCodeObject
*
PyNode_Compile
Py_PROTO
((
struct
_node
*
,
char
*
));
PyCodeObject
*
PyNode_Compile
Py_PROTO
((
struct
_node
*
,
char
*
));
PyCodeObject
*
PyCode_New
PyCodeObject
*
PyCode_New
Py_PROTO
((
Py_PROTO
((
PyObject
*
,
PyObject
*
,
PyObject
*
,
PyObject
*
,
PyObject
*
));
int
,
int
,
int
,
PyObject
*
,
PyObject
*
,
PyObject
*
,
PyObject
*
,
PyObject
*
,
PyObject
*
));
/* same as struct above */
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
Include/eval.h
Dosyayı görüntüle @
884afd65
...
@@ -30,8 +30,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -30,8 +30,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Interface to execute compiled code */
/* Interface to execute compiled code */
PyObject
*
PyEval_EvalCode
PyObject
*
PyEval_EvalCode
Py_PROTO
((
PyCodeObject
*
,
PyObject
*
,
PyObject
*
));
Py_PROTO
((
PyCodeObject
*
,
PyObject
*
,
PyObject
*
,
PyObject
*
,
PyObject
*
));
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
Include/frameobject.h
Dosyayı görüntüle @
884afd65
...
@@ -45,7 +45,6 @@ typedef struct _frame {
...
@@ -45,7 +45,6 @@ typedef struct _frame {
PyObject
*
f_locals
;
/* local symbol table (PyDictObject) */
PyObject
*
f_locals
;
/* local symbol table (PyDictObject) */
PyObject
*
f_owner
;
/* owner (e.g. class or module) or NULL */
PyObject
*
f_owner
;
/* owner (e.g. class or module) or NULL */
PyObject
*
f_fastlocals
;
/* fast local variables (PyListObject) */
PyObject
*
f_fastlocals
;
/* fast local variables (PyListObject) */
PyObject
*
f_localmap
;
/* local variable names (PyDictObject) */
PyObject
**
f_valuestack
;
/* malloc'ed array */
PyObject
**
f_valuestack
;
/* malloc'ed array */
PyTryBlock
*
f_blockstack
;
/* malloc'ed array */
PyTryBlock
*
f_blockstack
;
/* malloc'ed array */
int
f_nvalues
;
/* size of f_valuestack */
int
f_nvalues
;
/* size of f_valuestack */
...
...
Include/funcobject.h
Dosyayı görüntüle @
884afd65
...
@@ -34,10 +34,9 @@ typedef struct {
...
@@ -34,10 +34,9 @@ typedef struct {
PyObject_HEAD
PyObject_HEAD
PyObject
*
func_code
;
PyObject
*
func_code
;
PyObject
*
func_globals
;
PyObject
*
func_globals
;
PyObject
*
func_name
;
PyObject
*
func_defaults
;
int
func_argcount
;
PyObject
*
func_argdefs
;
PyObject
*
func_doc
;
PyObject
*
func_doc
;
PyObject
*
func_name
;
}
PyFunctionObject
;
}
PyFunctionObject
;
extern
DL_IMPORT
(
PyTypeObject
)
PyFunction_Type
;
extern
DL_IMPORT
(
PyTypeObject
)
PyFunction_Type
;
...
@@ -47,8 +46,8 @@ extern DL_IMPORT(PyTypeObject) PyFunction_Type;
...
@@ -47,8 +46,8 @@ extern DL_IMPORT(PyTypeObject) PyFunction_Type;
extern
PyObject
*
PyFunction_New
Py_PROTO
((
PyObject
*
,
PyObject
*
));
extern
PyObject
*
PyFunction_New
Py_PROTO
((
PyObject
*
,
PyObject
*
));
extern
PyObject
*
PyFunction_GetCode
Py_PROTO
((
PyObject
*
));
extern
PyObject
*
PyFunction_GetCode
Py_PROTO
((
PyObject
*
));
extern
PyObject
*
PyFunction_GetGlobals
Py_PROTO
((
PyObject
*
));
extern
PyObject
*
PyFunction_GetGlobals
Py_PROTO
((
PyObject
*
));
extern
PyObject
*
PyFunction_Get
ArgStuff
Py_PROTO
((
PyObject
*
,
in
t
*
));
extern
PyObject
*
PyFunction_Get
Defaults
Py_PROTO
((
PyObjec
t
*
));
extern
int
PyFunction_Set
ArgStuff
Py_PROTO
((
PyObject
*
,
int
,
PyObject
*
));
extern
int
PyFunction_Set
Defaults
Py_PROTO
((
PyObject
*
,
PyObject
*
));
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
Include/object.h
Dosyayı görüntüle @
884afd65
...
@@ -217,7 +217,7 @@ typedef struct _typeobject {
...
@@ -217,7 +217,7 @@ typedef struct _typeobject {
/* More standard operations (at end for binary compatibility) */
/* More standard operations (at end for binary compatibility) */
hashfunc
tp_hash
;
hashfunc
tp_hash
;
bi
naryfunc
tp_call
;
ter
naryfunc
tp_call
;
reprfunc
tp_str
;
reprfunc
tp_str
;
/* Space for future expansion */
/* Space for future expansion */
...
...
Include/opcode.h
Dosyayı görüntüle @
884afd65
...
@@ -40,7 +40,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -40,7 +40,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define UNARY_NEGATIVE 11
#define UNARY_NEGATIVE 11
#define UNARY_NOT 12
#define UNARY_NOT 12
#define UNARY_CONVERT 13
#define UNARY_CONVERT 13
#define UNARY_CALL 14
#define UNARY_INVERT 15
#define UNARY_INVERT 15
#define BINARY_MULTIPLY 20
#define BINARY_MULTIPLY 20
...
@@ -49,7 +49,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -49,7 +49,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define BINARY_ADD 23
#define BINARY_ADD 23
#define BINARY_SUBTRACT 24
#define BINARY_SUBTRACT 24
#define BINARY_SUBSCR 25
#define BINARY_SUBSCR 25
#define BINARY_CALL 26
#define SLICE 30
#define SLICE 30
/* Also uses 31-33 */
/* Also uses 31-33 */
...
@@ -75,13 +74,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -75,13 +74,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define PRINT_NEWLINE 72
#define PRINT_NEWLINE 72
#define BREAK_LOOP 80
#define BREAK_LOOP 80
#define RAISE_EXCEPTION 81
#define LOAD_LOCALS 82
#define LOAD_LOCALS 82
#define RETURN_VALUE 83
#define RETURN_VALUE 83
#define LOAD_GLOBALS 84
#define EXEC_STMT 85
#define EXEC_STMT 85
#define BUILD_FUNCTION 86
#define POP_BLOCK 87
#define POP_BLOCK 87
#define END_FINALLY 88
#define END_FINALLY 88
#define BUILD_CLASS 89
#define BUILD_CLASS 89
...
@@ -125,7 +123,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -125,7 +123,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define SETUP_EXCEPT 121
/* "" */
#define SETUP_EXCEPT 121
/* "" */
#define SETUP_FINALLY 122
/* "" */
#define SETUP_FINALLY 122
/* "" */
#define RESERVE_FAST 123
/* Number of local variables */
#define LOAD_FAST 124
/* Local variable number */
#define LOAD_FAST 124
/* Local variable number */
#define STORE_FAST 125
/* Local variable number */
#define STORE_FAST 125
/* Local variable number */
#define DELETE_FAST 126
/* Local variable number */
#define DELETE_FAST 126
/* Local variable number */
...
@@ -139,6 +136,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -139,6 +136,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define RAISE_VARARGS 130
/* Number of raise arguments (1, 2 or 3) */
#define RAISE_VARARGS 130
/* Number of raise arguments (1, 2 or 3) */
#define CALL_FUNCTION 131
/* #args + (#kwargs<<8) */
#define CALL_FUNCTION 131
/* #args + (#kwargs<<8) */
#define MAKE_FUNCTION 132
/* #defaults */
/* Comparison operator codes (argument to COMPARE_OP) */
/* Comparison operator codes (argument to COMPARE_OP) */
enum
cmp_op
{
LT
,
LE
,
EQ
,
NE
,
GT
,
GE
,
IN
,
NOT_IN
,
IS
,
IS_NOT
,
EXC_MATCH
,
BAD
};
enum
cmp_op
{
LT
,
LE
,
EQ
,
NE
,
GT
,
GE
,
IN
,
NOT_IN
,
IS
,
IS_NOT
,
EXC_MATCH
,
BAD
};
...
...
Include/patchlevel.h
Dosyayı görüntüle @
884afd65
#define PATCHLEVEL "1.
2
"
#define PATCHLEVEL "1.
3b1
"
Include/traceback.h
Dosyayı görüntüle @
884afd65
...
@@ -37,6 +37,10 @@ PyObject *PyTraceBack_Fetch Py_PROTO((void));
...
@@ -37,6 +37,10 @@ PyObject *PyTraceBack_Fetch Py_PROTO((void));
int
PyTraceBack_Store
Py_PROTO
((
PyObject
*
));
int
PyTraceBack_Store
Py_PROTO
((
PyObject
*
));
int
PyTraceBack_Print
Py_PROTO
((
PyObject
*
,
PyObject
*
));
int
PyTraceBack_Print
Py_PROTO
((
PyObject
*
,
PyObject
*
));
/* Reveale traceback type so we can typecheck traceback objects */
extern
PyTypeObject
PyTraceback_Type
;
#define PyTraceback_Check(v) ((v)->ob_type == &PyTraceback_Type)
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment