remove sage-specific and unused incref-local-binop option
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 30 Oct 2009 06:23:27 +0000 (23:23 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 30 Oct 2009 06:23:27 +0000 (23:23 -0700)
Cython/Compiler/CmdLine.py
Cython/Compiler/ExprNodes.py
Cython/Compiler/Nodes.py
Cython/Compiler/Options.py

index 3451e734ebb7bf0a76b690e04cfc76f1cfde84c7..0a9e7c6884eb05261926b17c771eddcecd5663c4 100644 (file)
@@ -27,8 +27,6 @@ Options:
   -z, --pre-import <module>      If specified, assume undeclared names in this 
                                  module. Emulates the behavior of putting 
                                  "from <module> import *" at the top of the file. 
-  --incref-local-binop           Force local an extra incref on local variables before
-                                 performing any binary operations.
   --cleanup <level>              Release interned objects on python exit, for memory debugging. 
                                  Level indicates aggressiveness, default 0 releases nothing. 
   -w, --working <directory>      Sets the working directory for Cython (the directory modules 
@@ -108,8 +106,6 @@ def parse_command_line(args):
                 Options.embed_pos_in_docstring = 1
             elif option in ("-z", "--pre-import"):
                 Options.pre_import = pop_arg()
-            elif option == "--incref-local-binop":
-                Options.incref_local_binop = 1
             elif option == "--cleanup":
                 Options.generate_cleanup_code = int(pop_arg())
             elif option in ("-D", "--no-docstrings"):
index 9e44753f971ae39ddfb7ad10159a7a58b8e1d8b9..90a0671c22a9aaaf68c1b277ae6b1f205521e7d6 100644 (file)
@@ -4488,8 +4488,6 @@ class BinopNode(ExprNode):
             self.coerce_operands_to_pyobjects(env)
             self.type = py_object_type
             self.is_temp = 1
-            if Options.incref_local_binop and self.operand1.type.is_pyobject:
-                self.operand1 = self.operand1.coerce_to_temp(env)
         else:
             self.analyse_c_operation(env)
     
index 8b37eb860ca278de894e7572057d113196f30558..b42694a15ce6ff36ab2758d3dd05a3f1c7165be5 100644 (file)
@@ -3092,8 +3092,6 @@ class InPlaceAssignmentNode(AssignmentNode):
         self.dup = self.create_dup_node(env) # re-assigns lhs to a shallow copy
         self.rhs.analyse_types(env)
         self.lhs.analyse_target_types(env)
-        if Options.incref_local_binop and self.dup.type.is_pyobject:
-            self.dup = self.dup.coerce_to_temp(env)
         import ExprNodes
         if self.lhs.type.is_pyobject:
             self.rhs = self.rhs.coerce_to_pyobject(env)
index c8aeda81cc6cb3e67bb6e8783567b6aeacca0b68..fbf39f330b49cd6824eb7758d500db3bb51d87a6 100644 (file)
@@ -10,12 +10,6 @@ gcc_branch_hints = 1
 pre_import = None
 docstrings = True
 
-# This is a SAGE-specific option that will 
-# cause Cython to incref local variables before
-# performing a binary operation on them, for 
-# safe detection of inplace operators. 
-incref_local_binop = 0
-
 # Decref global variables in this module on exit for garbage collection. 
 # 0: None, 1+: interned objects, 2+: cdef globals, 3+: types objects
 # Mostly for reducing noise for Valgrind, only executes at process exit