projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90d5437
)
make intermediate goto-labels more readable by postfixing them with their purpose
author
Stefan Behnel
<stefan_ml@behnel.de>
Mon, 16 Dec 2013 22:39:29 +0000
(23:39 +0100)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Mon, 16 Dec 2013 22:39:29 +0000
(23:39 +0100)
Cython/Compiler/Code.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Code.py
b/Cython/Compiler/Code.py
index
1b4399f
..
c7aed82
100644
(file)
--- a/
Cython/Compiler/Code.py
+++ b/
Cython/Compiler/Code.py
@@
-574,9
+574,9
@@
class FunctionState(object):
def all_new_labels(self):
old_labels = self.get_all_labels()
new_labels = []
- for old_label
in old_labels
:
+ for old_label
, name in zip(old_labels, ['continue', 'break', 'return', 'error'])
:
if old_label:
- new_labels.append(self.new_label())
+ new_labels.append(self.new_label(
name
))
else:
new_labels.append(old_label)
self.set_all_labels(new_labels)