Changeset 369
- Timestamp:
- 05/05/2007 11:04:56 AM (6 years ago)
- Files:
-
- 1 modified
-
trunk/optimizer.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/optimizer.c
r365 r369 460 460 int i; 461 461 bbid_t lasttrybbid; 462 bbid_t lastcatchbbid; 462 463 463 464 for (i = 0; i < bbs_count(bbs); i ++) { … … 482 483 } 483 484 484 lasttrybbid = BBID_INVALID; 485 lasttrybbid = BBID_INVALID; 486 lastcatchbbid = BBID_INVALID; 485 487 op_array->last_try_catch = 0; 486 488 for (i = 0; i < bbs_count(bbs); i ++) { 487 489 bb_t *bb = bbs_get(bbs, i); 488 490 489 if (last trybbid != bb->catch) {490 if (lasttrybbid != BBID_INVALID ) {491 if (lastcatchbbid != bb->catch) { 492 if (lasttrybbid != BBID_INVALID && lastcatchbbid != BBID_INVALID) { 491 493 int try_catch_offset = op_array->last_try_catch ++; 492 494 493 495 op_array->try_catch_array = erealloc(op_array->try_catch_array, sizeof(zend_try_catch_element) * op_array->last_try_catch); 494 496 op_array->try_catch_array[try_catch_offset].try_op = bbs_get(bbs, lasttrybbid)->opnum; 495 op_array->try_catch_array[try_catch_offset].catch_op = bbs_get(bbs, bb->id)->opnum; 496 } 497 lasttrybbid = bb->catch; 497 op_array->try_catch_array[try_catch_offset].catch_op = bbs_get(bbs, lastcatchbbid)->opnum; 498 } 499 lasttrybbid = i; 500 lastcatchbbid = bb->catch; 498 501 } 499 502 } … … 549 552 xc_dprint_zend_op_array(op_array, 0 TSRMLS_CC); 550 553 # endif 554 op_print(0, op_array->opcodes, op_array->opcodes + op_array->last); 551 555 #endif 552 556 return 0;

