source: branches/1.2/optimizer.c @ 394

Last change on this file since 394 was 394, checked in by moo, 7 years ago

merged [393] from trunk: svn:eol-style

  • Property svn:eol-style set to native
File size: 731 bytes
Line 
1#include "optimizer.h"
2#include "utils.h"
3
4static int xc_optimize_op_array(zend_op_array *op_array TSRMLS_DC) /* {{{ */
5{
6    if (op_array->type != ZEND_USER_FUNCTION) {
7        return 0;
8    }
9#if 0
10    xc_undo_pass_two(op_array TSRMLS_CC);
11    xc_redo_pass_two(op_array TSRMLS_CC);
12    xc_dprint_zend_op_array(op_array, 0);
13#endif
14    return 0;
15}
16/* }}} */
17void xc_optimize(zend_op_array *op_array TSRMLS_DC) /* {{{ */
18{
19    xc_compile_result_t cr;
20
21    xc_compile_result_init_cur(&cr, op_array TSRMLS_CC);
22
23    xc_apply_op_array(&cr, (apply_func_t) xc_undo_pass_two TSRMLS_CC);
24    xc_apply_op_array(&cr, (apply_func_t) xc_optimize_op_array TSRMLS_CC);
25    xc_apply_op_array(&cr, (apply_func_t) xc_redo_pass_two TSRMLS_CC);
26
27    xc_compile_result_free(&cr);
28}
29/* }}} */
Note: See TracBrowser for help on using the repository browser.