Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
aefafa9d
Commit
aefafa9d
authored
May 17, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove permanent output scanning code that eats quite a bit of processing time.
parent
5692345b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+0
-4
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-1
No files found.
Cython/Compiler/Code.py
View file @
aefafa9d
...
...
@@ -119,8 +119,6 @@ modifier_output_mapper = {
'inline'
:
'CYTHON_INLINE'
}.
get
is_self_assignment
=
re
.
compile
(
r" *(\
w+) = (
\1);\
s*$
").match
class
IncludeCode
(
object
):
"""
...
...
@@ -1880,8 +1878,6 @@ class CCodeWriter(object):
self
.
put
(
code
)
def
put
(
self
,
code
):
if
is_self_assignment
(
code
):
return
fix_indent
=
False
if
"{"
in
code
:
dl
=
code
.
count
(
"{"
)
...
...
Cython/Compiler/ExprNodes.py
View file @
aefafa9d
...
...
@@ -2307,7 +2307,7 @@ class NameNode(AtomicExprNode):
if
is_pythran_expr
(
self
.
type
):
code
.
putln
(
'new (&%s) decltype(%s){%s};'
%
(
self
.
result
(),
self
.
result
(),
result
))
el
se
:
el
if
result
!=
self
.
result
()
:
code
.
putln
(
'%s = %s;'
%
(
self
.
result
(),
result
))
if
debug_disposal_code
:
print
(
"NameNode.generate_assignment_code:"
)
...
...
@@ -7729,7 +7729,7 @@ class SequenceNode(ExprNode):
code
.
put_decref
(
target_list
,
py_object_type
)
code
.
putln
(
'%s = %s; %s = NULL;'
%
(
target_list
,
sublist_temp
,
sublist_temp
))
code
.
putln
(
'#else'
)
code
.
putln
(
'
%s = %s;'
%
(
sublist_temp
,
sublist_temp
))
# avoid warning about unused variable
code
.
putln
(
'
(void)%s;'
%
sublist_temp
)
# avoid warning about unused variable
code
.
funcstate
.
release_temp
(
sublist_temp
)
code
.
putln
(
'#endif'
)
...
...
Cython/Compiler/Nodes.py
View file @
aefafa9d
...
...
@@ -2046,6 +2046,7 @@ class FuncDefNode(StatNode, BlockNode):
if
err_val
is
None
and
default_retval
:
err_val
=
default_retval
if
err_val
is
not
None
:
if
err_val
!=
Naming
.
retval_cname
:
code
.
putln
(
"%s = %s;"
%
(
Naming
.
retval_cname
,
err_val
))
elif
not
self
.
return_type
.
is_void
:
code
.
putln
(
"__Pyx_pretend_to_initialize(&%s);"
%
Naming
.
retval_cname
)
...
...
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