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
08b401f6
Kaydet (Commit)
08b401f6
authored
Ock 07, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix icc warnings: single bit fields should be unsigned, shadowing local variables
üst
406c6403
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
compile.c
Python/compile.c
+16
-16
No files found.
Python/compile.c
Dosyayı görüntüle @
08b401f6
...
@@ -51,9 +51,9 @@ int Py_OptimizeFlag = 0;
...
@@ -51,9 +51,9 @@ int Py_OptimizeFlag = 0;
#define DEFAULT_LNOTAB_SIZE 16
#define DEFAULT_LNOTAB_SIZE 16
struct
instr
{
struct
instr
{
int
i_jabs
:
1
;
unsigned
i_jabs
:
1
;
int
i_jrel
:
1
;
unsigned
i_jrel
:
1
;
int
i_hasarg
:
1
;
unsigned
i_hasarg
:
1
;
unsigned
char
i_opcode
;
unsigned
char
i_opcode
;
int
i_oparg
;
int
i_oparg
;
struct
basicblock_
*
i_target
;
/* target block (if jump instruction) */
struct
basicblock_
*
i_target
;
/* target block (if jump instruction) */
...
@@ -74,9 +74,9 @@ typedef struct basicblock_ {
...
@@ -74,9 +74,9 @@ typedef struct basicblock_ {
block reached by normal control flow. */
block reached by normal control flow. */
struct
basicblock_
*
b_next
;
struct
basicblock_
*
b_next
;
/* b_seen is used to perform a DFS of basicblocks. */
/* b_seen is used to perform a DFS of basicblocks. */
int
b_seen
:
1
;
unsigned
b_seen
:
1
;
/* b_return is true if a RETURN_VALUE opcode is inserted. */
/* b_return is true if a RETURN_VALUE opcode is inserted. */
int
b_return
:
1
;
unsigned
b_return
:
1
;
/* depth of stack upon entry of block, computed by stackdepth() */
/* depth of stack upon entry of block, computed by stackdepth() */
int
b_startdepth
;
int
b_startdepth
;
/* instruction offset for block, computed by assemble_jump_offsets() */
/* instruction offset for block, computed by assemble_jump_offsets() */
...
@@ -1673,20 +1673,20 @@ compiler_addop_j(struct compiler *c, int opcode, basicblock *b, int absolute)
...
@@ -1673,20 +1673,20 @@ compiler_addop_j(struct compiler *c, int opcode, basicblock *b, int absolute)
}
}
#define VISIT_SEQ(C, TYPE, SEQ) { \
#define VISIT_SEQ(C, TYPE, SEQ) { \
int i; \
int
_
i; \
asdl_seq *seq = (SEQ);
/* avoid variable capture */
\
asdl_seq *seq = (SEQ);
/* avoid variable capture */
\
for (
i = 0; i < asdl_seq_LEN(seq);
i++) { \
for (
_i = 0; _i < asdl_seq_LEN(seq); _
i++) { \
TYPE ## _ty elt = asdl_seq_GET(seq, i); \
TYPE ## _ty elt = asdl_seq_GET(seq,
_
i); \
if (!compiler_visit_ ## TYPE((C), elt)) \
if (!compiler_visit_ ## TYPE((C), elt)) \
return 0; \
return 0; \
} \
} \
}
}
#define VISIT_SEQ_IN_SCOPE(C, TYPE, SEQ) { \
#define VISIT_SEQ_IN_SCOPE(C, TYPE, SEQ) { \
int i; \
int
_
i; \
asdl_seq *seq = (SEQ);
/* avoid variable capture */
\
asdl_seq *seq = (SEQ);
/* avoid variable capture */
\
for (
i = 0; i < asdl_seq_LEN(seq);
i++) { \
for (
_i = 0; _i < asdl_seq_LEN(seq); _
i++) { \
TYPE ## _ty elt = asdl_seq_GET(seq, i); \
TYPE ## _ty elt = asdl_seq_GET(seq,
_
i); \
if (!compiler_visit_ ## TYPE((C), elt)) { \
if (!compiler_visit_ ## TYPE((C), elt)) { \
compiler_exit_scope(c); \
compiler_exit_scope(c); \
return 0; \
return 0; \
...
@@ -3859,7 +3859,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
...
@@ -3859,7 +3859,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
return
1
;
return
1
;
if
(
d_bytecode
>
255
)
{
if
(
d_bytecode
>
255
)
{
int
i
,
nbytes
,
ncodes
=
d_bytecode
/
255
;
int
j
,
nbytes
,
ncodes
=
d_bytecode
/
255
;
nbytes
=
a
->
a_lnotab_off
+
2
*
ncodes
;
nbytes
=
a
->
a_lnotab_off
+
2
*
ncodes
;
len
=
PyString_GET_SIZE
(
a
->
a_lnotab
);
len
=
PyString_GET_SIZE
(
a
->
a_lnotab
);
if
(
nbytes
>=
len
)
{
if
(
nbytes
>=
len
)
{
...
@@ -3871,7 +3871,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
...
@@ -3871,7 +3871,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
return
0
;
return
0
;
}
}
lnotab
=
PyString_AS_STRING
(
a
->
a_lnotab
)
+
a
->
a_lnotab_off
;
lnotab
=
PyString_AS_STRING
(
a
->
a_lnotab
)
+
a
->
a_lnotab_off
;
for
(
i
=
0
;
i
<
ncodes
;
i
++
)
{
for
(
j
=
0
;
j
<
ncodes
;
j
++
)
{
*
lnotab
++
=
255
;
*
lnotab
++
=
255
;
*
lnotab
++
=
0
;
*
lnotab
++
=
0
;
}
}
...
@@ -3880,7 +3880,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
...
@@ -3880,7 +3880,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
}
}
assert
(
d_bytecode
<=
255
);
assert
(
d_bytecode
<=
255
);
if
(
d_lineno
>
255
)
{
if
(
d_lineno
>
255
)
{
int
i
,
nbytes
,
ncodes
=
d_lineno
/
255
;
int
j
,
nbytes
,
ncodes
=
d_lineno
/
255
;
nbytes
=
a
->
a_lnotab_off
+
2
*
ncodes
;
nbytes
=
a
->
a_lnotab_off
+
2
*
ncodes
;
len
=
PyString_GET_SIZE
(
a
->
a_lnotab
);
len
=
PyString_GET_SIZE
(
a
->
a_lnotab
);
if
(
nbytes
>=
len
)
{
if
(
nbytes
>=
len
)
{
...
@@ -3895,7 +3895,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
...
@@ -3895,7 +3895,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
*
lnotab
++
=
255
;
*
lnotab
++
=
255
;
*
lnotab
++
=
d_bytecode
;
*
lnotab
++
=
d_bytecode
;
d_bytecode
=
0
;
d_bytecode
=
0
;
for
(
i
=
1
;
i
<
ncodes
;
i
++
)
{
for
(
j
=
1
;
j
<
ncodes
;
j
++
)
{
*
lnotab
++
=
255
;
*
lnotab
++
=
255
;
*
lnotab
++
=
0
;
*
lnotab
++
=
0
;
}
}
...
@@ -4190,7 +4190,7 @@ assemble(struct compiler *c, int addNone)
...
@@ -4190,7 +4190,7 @@ assemble(struct compiler *c, int addNone)
/* Emit code in reverse postorder from dfs. */
/* Emit code in reverse postorder from dfs. */
for
(
i
=
a
.
a_nblocks
-
1
;
i
>=
0
;
i
--
)
{
for
(
i
=
a
.
a_nblocks
-
1
;
i
>=
0
;
i
--
)
{
b
asicblock
*
b
=
a
.
a_postorder
[
i
];
b
=
a
.
a_postorder
[
i
];
for
(
j
=
0
;
j
<
b
->
b_iused
;
j
++
)
for
(
j
=
0
;
j
<
b
->
b_iused
;
j
++
)
if
(
!
assemble_emit
(
&
a
,
&
b
->
b_instr
[
j
]))
if
(
!
assemble_emit
(
&
a
,
&
b
->
b_instr
[
j
]))
goto
error
;
goto
error
;
...
...
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