Commit 2d7f307c authored by Stefan Behnel's avatar Stefan Behnel

seems like the explicit deepcopy helpers in the control flow state objects are...

seems like the explicit deepcopy helpers in the control flow state objects are no longer needed but crash the compiler due to infinite recursion
parent d2c1b777
...@@ -3,11 +3,11 @@ from __future__ import absolute_import ...@@ -3,11 +3,11 @@ from __future__ import absolute_import
import cython import cython
cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object, cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object,
Builtin=object, InternalError=object, Builtin=object, InternalError=object,
error=object, warning=object, deepcopy=object, error=object, warning=object, deepcopy=object, copy=object,
py_object_type=object, unspecified_type=object, py_object_type=object, unspecified_type=object,
object_expr=object, fake_rhs_expr=object, TypedExprNode=object) object_expr=object, fake_rhs_expr=object, TypedExprNode=object)
from copy import deepcopy from copy import deepcopy, copy
from . import Builtin from . import Builtin
from . import ExprNodes from . import ExprNodes
...@@ -328,17 +328,6 @@ class NameAssignment(object): ...@@ -328,17 +328,6 @@ class NameAssignment(object):
self.is_deletion = False self.is_deletion = False
self.inferred_type = None self.inferred_type = None
def __deepcopy__(self, memo):
ass = NameAssignment.__new__(type(self))
ass.lhs = deepcopy(self.lhs, memo)
ass.rhs = deepcopy(self.rhs, memo)
ass.entry = self.entry
ass.refs = deepcopy(self.refs, memo)
ass.is_arg = self.is_arg
ass.is_deletion = self.is_deletion
ass.inferred_type = self.inferred_type
return ass
def __repr__(self): def __repr__(self):
return '%s(entry=%r)' % (self.__class__.__name__, self.entry) return '%s(entry=%r)' % (self.__class__.__name__, self.entry)
...@@ -413,13 +402,6 @@ class NameReference(object): ...@@ -413,13 +402,6 @@ class NameReference(object):
def __repr__(self): def __repr__(self):
return '%s(entry=%r)' % (self.__class__.__name__, self.entry) return '%s(entry=%r)' % (self.__class__.__name__, self.entry)
def __deepcopy__(self, memo):
ref = NameReference.__new__(type(self))
ref.node = deepcopy(self.node, memo)
ref.entry = self.entry
ref.pos = self.node.pos
return ref
class ControlFlowState(list): class ControlFlowState(list):
# Keeps track of Node's entry assignments # Keeps track of Node's entry assignments
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment