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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
3ee23f4f
Commit
3ee23f4f
authored
Dec 28, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Directive for overflow folding.
parent
7e1b07cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-0
Cython/Compiler/Optimize.py
Cython/Compiler/Optimize.py
+1
-1
Cython/Compiler/Options.py
Cython/Compiler/Options.py
+1
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
3ee23f4f
...
@@ -8048,6 +8048,7 @@ class NumBinopNode(BinopNode):
...
@@ -8048,6 +8048,7 @@ class NumBinopNode(BinopNode):
and
not
self
.
operand2
.
has_constant_result
()):
and
not
self
.
operand2
.
has_constant_result
()):
self
.
operand1
,
self
.
operand2
=
self
.
operand2
,
self
.
operand1
self
.
operand1
,
self
.
operand2
=
self
.
operand2
,
self
.
operand1
self
.
overflow_check
=
True
self
.
overflow_check
=
True
self
.
overflow_fold
=
env
.
directives
[
'overflowcheck.fold'
]
self
.
func
=
self
.
type
.
overflow_check_binop
(
self
.
func
=
self
.
type
.
overflow_check_binop
(
self
.
overflow_op_names
[
self
.
operator
],
self
.
overflow_op_names
[
self
.
operator
],
env
,
env
,
...
...
Cython/Compiler/Optimize.py
View file @
3ee23f4f
...
@@ -3265,7 +3265,7 @@ class ConsolidateOverflowCheck(Visitor.CythonTransform):
...
@@ -3265,7 +3265,7 @@ class ConsolidateOverflowCheck(Visitor.CythonTransform):
return
node
return
node
def
visit_NumBinopNode
(
self
,
node
):
def
visit_NumBinopNode
(
self
,
node
):
if
node
.
overflow_check
:
if
node
.
overflow_check
and
node
.
overflow_fold
:
top_level_overflow
=
self
.
overflow_bit_node
is
None
top_level_overflow
=
self
.
overflow_bit_node
is
None
if
top_level_overflow
:
if
top_level_overflow
:
self
.
overflow_bit_node
=
node
self
.
overflow_bit_node
=
node
...
...
Cython/Compiler/Options.py
View file @
3ee23f4f
...
@@ -82,6 +82,7 @@ directive_defaults = {
...
@@ -82,6 +82,7 @@ directive_defaults = {
'cdivision'
:
False
,
# was True before 0.12
'cdivision'
:
False
,
# was True before 0.12
'cdivision_warnings'
:
False
,
'cdivision_warnings'
:
False
,
'overflowcheck'
:
False
,
'overflowcheck'
:
False
,
'overflowcheck.fold'
:
True
,
'always_allow_keywords'
:
False
,
'always_allow_keywords'
:
False
,
'allow_none_for_extension_args'
:
True
,
'allow_none_for_extension_args'
:
True
,
'wraparound'
:
True
,
'wraparound'
:
True
,
...
...
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