[Python-checkins] r64909 - python/branches/tlee-ast-optimize/Python/optimize.c

thomas.lee python-checkins at python.org
Sun Jul 13 12:26:11 CEST 2008


Author: thomas.lee
Date: Sun Jul 13 12:26:10 2008
New Revision: 64909

Log:
Return injection causing the build to fail. Disabling the code for now, bug needs more investigation.

Modified:
   python/branches/tlee-ast-optimize/Python/optimize.c

Modified: python/branches/tlee-ast-optimize/Python/optimize.c
==============================================================================
--- python/branches/tlee-ast-optimize/Python/optimize.c	(original)
+++ python/branches/tlee-ast-optimize/Python/optimize.c	Sun Jul 13 12:26:10 2008
@@ -297,6 +297,7 @@
                 }
                 if (seq == NULL)
                     return 0;
+                *seq_ptr = seq;
             }
         }
     }
@@ -315,6 +316,7 @@
                 }
                 if (seq == NULL)
                     return 0;
+                *seq_ptr = seq;
             }
         }
     }
@@ -325,6 +327,7 @@
                 stmt->lineno, stmt->col_offset, opt->opt_arena);
         if (seq == NULL)
             return 0;
+        *seq_ptr = seq;
     }
 
     *seq_ptr = seq;
@@ -396,9 +399,8 @@
 static int
 _inject_compound_stmt_return(stmt_ty stmt, stmt_ty next, PyArena* arena)
 {
-    /* if the else body is not present, there will be no jump anyway */
-    /* XXX: this is breaking string._TemplateMetaclass for some reason */
 #if 0
+    /* if the else body is not present, there will be no jump anyway */
     if (stmt->kind == If_kind && stmt->v.If.orelse != NULL) {
         stmt_ty inner = asdl_seq_GET(stmt->v.If.body,
                                     LAST_IN_SEQ(stmt->v.If.body));
@@ -413,7 +415,6 @@
                 return 0;
         }
     }
-#endif
     /* TODO: we probably want to append a return to all but
      *       the last handler too
      */
@@ -456,6 +457,7 @@
                 return 0;
         }
     }
+#endif
 
     return 1;
 }


More information about the Python-checkins mailing list