source: trunk/optimizer.c @ 1

Last change on this file since 1 was 1, checked in by moo, 8 years ago

initial import to online

File size: 724 bytes
RevLine 
[1]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    //xc_undo_pass_two(op_array TSRMLS_CC);
10    //xc_redo_pass_two(op_array TSRMLS_CC);
11    //xc_dprint_zend_op_array(op_array, 0);
12    return 0;
13}
14/* }}} */
15void xc_optimize(zend_op_array *op_array TSRMLS_DC) /* {{{ */
16{
17    xc_compile_result_t cr;
18
19    xc_compile_result_init_cur(&cr, op_array TSRMLS_CC);
20
21    xc_apply_op_array(&cr, (apply_func_t) xc_undo_pass_two TSRMLS_CC);
22    xc_apply_op_array(&cr, (apply_func_t) xc_optimize_op_array TSRMLS_CC);
23    xc_apply_op_array(&cr, (apply_func_t) xc_redo_pass_two TSRMLS_CC);
24
25    xc_compile_result_free(&cr);
26}
27/* }}} */
Note: See TracBrowser for help on using the repository browser.