Commits

Shashank Bharadwaj  committed 5e75ff3

No special handling needed for "with" statement. Looks like that was causing all the errors before. It should all work fine now

  • Participants
  • Parent commits 96ad57e
  • Branches update-asm4

Comments (0)

Files changed (1)

File src/org/python/compiler/CodeCompiler.java

         exceptionHandlers.push(normalExit);
 
         // try-catch block here
-		ExceptionHandler handler = initExceptionHandler(label_body_start, label_body_end, label_catch, null);
-		
+        ExceptionHandler handler = new ExceptionHandler();
         exceptionHandlers.push(handler);
+        handler.exceptionStarts.addElement(label_body_start);
 
         // VAR = value  # Only if "as VAR" is present
         code.label(label_body_start);
         exceptionHandlers.pop();
         exceptionHandlers.pop();
         code.label(label_body_end);
+        handler.exceptionEnds.addElement(label_body_end);
 
         // FINALLY if *not* non-local-goto
         if (blockResult == NoExit) {
         code.label(label_end);
         code.freeLocal(mgr_tmp);
 
+        handler.addExceptionHandlers(label_catch);
         return null;
     }