Commit 6be28864 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix for new temps and inplace ops

parent 7c283459
......@@ -3045,14 +3045,18 @@ class InPlaceAssignmentNode(AssignmentNode):
self.result_value.release_temp(env)
def generate_execution_code(self, code):
import ExprNodes
self.rhs.generate_evaluation_code(code)
self.dup.generate_subexpr_evaluation_code(code)
if isinstance(self.dup, ExprNodes.NewTempExprNode):
# This is because we're manually messing with subexpr nodes
if self.dup.is_temp:
self.dup.allocate_temp_result(code)
# self.dup.generate_result_code is run only if it is not buffer access
if self.operator == "**":
extra = ", Py_None"
else:
extra = ""
import ExprNodes
if self.lhs.type.is_pyobject:
if isinstance(self.lhs, ExprNodes.IndexNode) and self.lhs.is_buffer_access:
error(self.pos, "In-place operators not allowed on object buffers in this release.")
......
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