Index: /trunk/optimizer.c
===================================================================
--- /trunk/optimizer.c	(revision 543)
+++ /trunk/optimizer.c	(revision 657)
@@ -36,5 +36,7 @@
 
 	bbid_t     fall;
+#ifdef ZEND_ENGINE_2
 	bbid_t     catch;
+#endif
 
 	int        opnum; /* opnum after joining basic block */
@@ -133,5 +135,7 @@
 	/* break=will fall */
 	switch (opline->opcode) {
+#ifdef ZEND_HANDLE_EXCEPTION
 	case ZEND_HANDLE_EXCEPTION:
+#endif
 	case ZEND_RETURN:
 	case ZEND_EXIT:
@@ -253,5 +257,7 @@
 
 	bb->fall       = BBID_INVALID;
+#ifdef ZEND_ENGINE_2
 	bb->catch      = BBID_INVALID;
+#endif
 
 	if (opcodes) {
@@ -284,4 +290,10 @@
 	op_flowinfo_t fi;
 	zend_op *last = bb->opcodes + bb->count - 1;
+	bbid_t catchbbid;
+#ifdef ZEND_ENGINE_2
+	catchbbid = BBID_INVALID;
+#else
+	catchbbid = bb->catch;
+#endif
 
 	op_get_flowinfo(&fi, last);
@@ -293,5 +305,5 @@
 			, bb->id, bb->count, bb->alloc ? -1 : line
 			, bb->used ? 'U' : ' ', bb->alloc ? 'A' : ' '
-			, fi.jmpout_op1, fi.jmpout_op2, fi.jmpout_ext, bb->fall, bb->catch, xc_get_opcode(last->opcode)
+			, fi.jmpout_op1, fi.jmpout_op2, fi.jmpout_ext, bb->fall, catchbbid, xc_get_opcode(last->opcode)
 			);
 	op_print(line, bb->opcodes, last + 1);
@@ -354,5 +366,7 @@
 	ALLOCA_FLAG(use_heap_markbbhead)
 	bbid_t *bbids          = my_do_alloca(count * sizeof(bbid_t),    use_heap_bbids);
+#ifdef ZEND_ENGINE_2
 	bbid_t *catchbbids     = my_do_alloca(count * sizeof(bbid_t),    use_heap_catchbbids);
+#endif
 	zend_bool *markbbhead  = my_do_alloca(count * sizeof(zend_bool), use_heap_markbbhead);
 
@@ -377,8 +391,10 @@
 		}
 	}
+#ifdef ZEND_ENGINE_2
 	/* mark try start */
 	for (i = 0; i < op_array->last_try_catch; i ++) {
 		markbbhead[op_array->try_catch_array[i].try_op] = 1;
 	}
+#endif
 	/* }}} */
 	/* {{{ fill op lines with newly allocated id */
@@ -396,4 +412,5 @@
 	}
 	/* }}} */
+#ifdef ZEND_ENGINE_2
 	/* {{{ fill op lines with catch id */
 	for (i = 0; i < count; i ++) {
@@ -414,4 +431,5 @@
 #endif
 	/* }}} */
+#endif
 	/* {{{ create basic blocks */
 	start = 0;
@@ -425,5 +443,7 @@
 		opline = op_array->opcodes + start;
 		pbb = bbs_new_bb_ex(bbs, opline, i - start);
+#ifdef ZEND_ENGINE_2
 		pbb->catch = catchbbids[start];
+#endif
 
 		/* last */
@@ -457,5 +477,7 @@
 
 	my_free_alloca(markbbhead, use_heap_markbbhead);
+#ifdef ZEND_ENGINE_2
 	my_free_alloca(catchbbids, use_heap_catchbbids);
+#endif
 	my_free_alloca(bbids,      use_heap_bbids);
 	return SUCCESS;
@@ -465,6 +487,8 @@
 {
 	int i;
+#ifdef ZEND_ENGINE_2
 	bbid_t lasttrybbid;
 	bbid_t lastcatchbbid;
+#endif
 
 	for (i = 0; i < bbs_count(bbs); i ++) {
@@ -489,4 +513,5 @@
 	}
 
+#ifdef ZEND_ENGINE_2
 	lasttrybbid   = BBID_INVALID;
 	lastcatchbbid = BBID_INVALID;
@@ -508,4 +533,5 @@
 	}
 	/* it is impossible to have last bb catched */
+#endif
 }
 /* }}} */
