Changeset 993 for trunk/xcache.c
- Timestamp:
- 07/18/2012 10:27:29 AM (10 months ago)
- Files:
-
- 1 modified
-
trunk/xcache.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r992 r993 27 27 #include "ext/date/php_date.h" 28 28 #endif 29 #include "submodules/xc_optimizer.h" 30 #include "submodules/xc_coverager.h" 31 #include "submodules/xc_disassembler.h" 29 30 #ifdef HAVE_XCACHE_OPTIMIZER 31 # include "submodules/xc_optimizer.h" 32 #else 33 # define XCACHE_OPTIMIZER_FUNCTIONS() 34 #endif 35 #ifdef HAVE_XCACHE_COVERAGER 36 # include "submodules/xc_coverager.h" 37 #else 38 # define XCACHE_COVERAGER_FUNCTIONS() 39 #endif 40 #ifdef HAVE_XCACHE_DISASSEMBLER 41 # include "submodules/xc_disassembler.h" 42 #else 43 # define XCACHE_DISASSEMBLER_FUNCTIONS() 44 #endif 45 32 46 #include "xcache_globals.h" 33 47 #include "xc_processor.h" … … 3173 3187 #endif 3174 3188 /* }}} */ 3175 #ifdef HAVE_XCACHE_DISASSEMBLER3176 /* {{{ proto array xcache_dasm_file(string filename)3177 Disassemble file into opcode array by filename */3178 PHP_FUNCTION(xcache_dasm_file)3179 {3180 char *filename;3181 int filename_len;3182 3183 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) {3184 return;3185 }3186 if (!filename_len) RETURN_FALSE;3187 3188 xc_dasm_file(return_value, filename TSRMLS_CC);3189 }3190 /* }}} */3191 /* {{{ proto array xcache_dasm_string(string code)3192 Disassemble php code into opcode array */3193 PHP_FUNCTION(xcache_dasm_string)3194 {3195 zval *code;3196 3197 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &code) == FAILURE) {3198 return;3199 }3200 xc_dasm_string(return_value, code TSRMLS_CC);3201 }3202 /* }}} */3203 #endif3204 3189 /* {{{ proto string xcache_encode(string filename) 3205 3190 Encode php file into XCache opcode encoded format */ … … 3374 3359 PHP_FE(xcache_clear_cache, NULL) 3375 3360 PHP_FE(xcache_coredump, NULL) 3361 XCACHE_OPTIMIZER_FUNCTIONS() 3376 3362 #ifdef HAVE_XCACHE_ASSEMBLER 3377 3363 PHP_FE(xcache_asm, NULL) 3378 3364 #endif 3379 #ifdef HAVE_XCACHE_DISASSEMBLER 3380 PHP_FE(xcache_dasm_file, NULL) 3381 PHP_FE(xcache_dasm_string, NULL) 3382 #endif 3365 XCACHE_DISASSEMBLER_FUNCTIONS() 3383 3366 #ifdef HAVE_XCACHE_ENCODER 3384 3367 PHP_FE(xcache_encode, NULL) … … 3388 3371 PHP_FE(xcache_decode_string, NULL) 3389 3372 #endif 3390 #ifdef HAVE_XCACHE_COVERAGER 3391 PHP_FE(xcache_coverager_decode, NULL) 3392 PHP_FE(xcache_coverager_start, NULL) 3393 PHP_FE(xcache_coverager_stop, NULL) 3394 PHP_FE(xcache_coverager_get, NULL) 3395 #endif 3373 XCACHE_COVERAGER_FUNCTIONS() 3396 3374 PHP_FE(xcache_get_special_value, NULL) 3397 3375 PHP_FE(xcache_get_type, NULL)

