from ParseTreeTransforms import AnalyseDeclarationsTransform, AnalyseExpressionsTransform
from ParseTreeTransforms import CreateClosureClasses, MarkClosureVisitor, DecoratorTransform
from ParseTreeTransforms import InterpretCompilerDirectives, TransformBuiltinMethods
- from TypeInference import MarkAssignments, MarkOverflowingArithmatic
+ from TypeInference import MarkAssignments, MarkOverflowingArithmetic
from ParseTreeTransforms import AlignFunctionDefinitions, GilCheck
from AnalysedTreeTransforms import AutoTestDictTransform
from AutoDocTransforms import EmbedSignature
EmbedSignature(self),
EarlyReplaceBuiltinCalls(self),
MarkAssignments(self),
- MarkOverflowingArithmatic(self),
+ MarkOverflowingArithmetic(self),
TransformBuiltinMethods(self),
IntroduceBufferAuxiliaryVars(self),
_check_c_declarations,
class InPlaceAssignmentNode(AssignmentNode):
- # An in place arithmatic operand:
+ # An in place arithmetic operand:
#
# a += b
# a -= b
env.use_utility_code(complex_real_imag_utility_code)
for utility_code in (complex_type_utility_code,
complex_from_parts_utility_code,
- complex_arithmatic_utility_code):
+ complex_arithmetic_utility_code):
env.use_utility_code(
utility_code.specialize(
self,
}
""")
-complex_arithmatic_utility_code = UtilityCode(
+complex_arithmetic_utility_code = UtilityCode(
proto="""
#if CYTHON_CCOMPLEX
#define __Pyx_c_eq%(m)s(a, b) ((a)==(b))
# inline_func_in_pxd boolean Hacky special case for inline function in pxd file.
# Ideally this should not be necesarry.
# assignments [ExprNode] List of expressions that get assigned to this entry.
- # might_overflow boolean In an arithmatic expression that could cause
+ # might_overflow boolean In an arithmetic expression that could cause
# overflow (used for type inference).
inline_func_in_pxd = False
self.visitchildren(node)
return node
-class MarkOverflowingArithmatic(CythonTransform):
+class MarkOverflowingArithmetic(CythonTransform):
# It may be possible to integrate this with the above for
# performance improvements (though likely not worth it).
def __call__(self, root):
self.env_stack = []
self.env = root.scope
- return super(MarkOverflowingArithmatic, self).__call__(root)
+ return super(MarkOverflowingArithmetic, self).__call__(root)
def visit_safe_node(self, node):
self.might_overflow, saved = False, self.might_overflow
res = ~d
assert typeof(d) == "long", typeof(d)
- # potentially overflowing arithmatic
+ # potentially overflowing arithmetic
e = 1
e += 1
assert typeof(e) == "Python object", typeof(e)