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
43ea47ff
Kaydet (Commit)
43ea47ff
authored
Haz 24, 2004
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move NOP to end of code transformation.
üst
b86aa99e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
compile.c
Python/compile.c
+7
-3
No files found.
Python/compile.c
Dosyayı görüntüle @
43ea47ff
...
...
@@ -392,7 +392,8 @@ optimize_code(PyObject *code, PyObject* consts)
opcode
=
codestr
[
i
];
switch
(
opcode
)
{
/* Replace UNARY_NOT JUMP_IF_FALSE with NOP JUMP_IF_TRUE */
/* Replace UNARY_NOT JUMP_IF_FALSE POP_TOP with
with JUMP_IF_TRUE POP_TOP NOP */
case
UNARY_NOT
:
if
(
codestr
[
i
+
1
]
!=
JUMP_IF_FALSE
||
codestr
[
i
+
4
]
!=
POP_TOP
||
...
...
@@ -401,8 +402,11 @@ optimize_code(PyObject *code, PyObject* consts)
tgt
=
GETJUMPTGT
(
codestr
,
(
i
+
1
));
if
(
codestr
[
tgt
]
!=
POP_TOP
)
continue
;
codestr
[
i
]
=
NOP
;
codestr
[
i
+
1
]
=
JUMP_IF_TRUE
;
j
=
GETARG
(
codestr
,
i
+
1
)
+
1
;
codestr
[
i
]
=
JUMP_IF_TRUE
;
SETARG
(
codestr
,
i
,
j
);
codestr
[
i
+
3
]
=
POP_TOP
;
codestr
[
i
+
4
]
=
NOP
;
break
;
/* not a is b --> a is not b
...
...
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