Changeset 982
- Timestamp:
- 2012-07-17T10:35:45+02:00 (10 months ago)
- Location:
- trunk
- Files:
-
- 10 added
- 7 edited
- 1 copied
- 44 moved
-
Makefile.frag (modified) (3 diffs)
-
bin (added)
-
bin/phpdc.phpr (moved) (moved from trunk/phpdc.phpr) (1 diff)
-
bin/phpdop.phpr (moved) (moved from trunk/phpdop.phpr) (1 diff)
-
config.m4 (modified) (4 diffs)
-
config.w32 (modified) (4 diffs)
-
devel (added)
-
devel/gen_const_string_opcodes.awk (moved) (moved from trunk/mkopcode.awk)
-
devel/gen_xc_opcode_spec.awk (moved) (moved from trunk/mkopcode_spec.awk)
-
devel/graph (moved) (moved from trunk/graph)
-
devel/prepare.devel (moved) (moved from trunk/prepare.devel) (1 diff)
-
devel/prepare.devel.inc.example (moved) (moved from trunk/prepare.devel.inc.example) (1 diff)
-
devel/run (copied) (copied from trunk/run) (4 diffs)
-
devel/test.mak (moved) (moved from trunk/test.mak)
-
gen_structinfo.awk (moved) (moved from trunk/mkstructinfo.awk)
-
lib (added)
-
lib/Decompiler.class.php (moved) (moved from trunk/Decompiler.class.php)
-
main (added)
-
main/README (added)
-
main/xc_const_string.c (moved) (moved from trunk/const_string.c) (2 diffs)
-
main/xc_const_string.h (moved) (moved from trunk/const_string.h)
-
main/xc_const_string_opcodes_php4.x.h (moved) (moved from trunk/const_string_opcodes_php4.x.h)
-
main/xc_const_string_opcodes_php5.0.h (moved) (moved from trunk/const_string_opcodes_php5.0.h)
-
main/xc_const_string_opcodes_php5.1.h (moved) (moved from trunk/const_string_opcodes_php5.1.h)
-
main/xc_const_string_opcodes_php5.4.h (moved) (moved from trunk/const_string_opcodes_php5.4.h)
-
main/xc_const_string_opcodes_php6.x.h (moved) (moved from trunk/const_string_opcodes_php6.x.h)
-
main/xc_lock.c (moved) (moved from trunk/lock.c) (1 diff)
-
main/xc_lock.h (moved) (moved from trunk/lock.h)
-
main/xc_malloc.c (moved) (moved from trunk/xc_malloc.c) (1 diff)
-
main/xc_mem.c (moved) (moved from trunk/mem.c) (1 diff)
-
main/xc_mem.h (moved) (moved from trunk/mem.h)
-
main/xc_opcode_spec.c (moved) (moved from trunk/opcode_spec.c) (3 diffs)
-
main/xc_opcode_spec.h (moved) (moved from trunk/opcode_spec.h)
-
main/xc_opcode_spec_def.h (moved) (moved from trunk/opcode_spec_def.h)
-
main/xc_processor.c (moved) (moved from trunk/processor.c) (1 diff)
-
main/xc_shm.c (moved) (moved from trunk/xc_shm.c)
-
main/xc_shm.h (moved) (moved from trunk/xc_shm.h) (1 diff)
-
main/xc_shm_mmap.c (moved) (moved from trunk/mmap.c) (1 diff)
-
main/xc_utils.c (moved) (moved from trunk/utils.c) (3 diffs)
-
main/xc_utils.h (moved) (moved from trunk/utils.h) (2 diffs)
-
processor/head.m4 (modified) (1 diff)
-
run (added)
-
submodules (added)
-
submodules/xc_assembler.c (moved) (moved from trunk/assembler.c)
-
submodules/xc_coverager.c (moved) (moved from trunk/coverager.c)
-
submodules/xc_coverager.h (moved) (moved from trunk/coverager.h)
-
submodules/xc_decoder.c (moved) (moved from trunk/decoder.c)
-
submodules/xc_disassembler.c (moved) (moved from trunk/disassembler.c) (1 diff)
-
submodules/xc_disassembler.h (moved) (moved from trunk/disassembler.h)
-
submodules/xc_encoder.c (moved) (moved from trunk/encoder.c)
-
submodules/xc_optimizer.c (moved) (moved from trunk/optimizer.c)
-
submodules/xc_optimizer.h (moved) (moved from trunk/optimizer.h)
-
util (added)
-
util/README (added)
-
util/xc_align.h (moved) (moved from trunk/align.h)
-
util/xc_foreachcoresig.h (moved) (moved from trunk/foreachcoresig.h)
-
util/xc_stack.c (moved) (moved from trunk/stack.c) (1 diff)
-
util/xc_stack.h (moved) (moved from trunk/stack.h) (2 diffs)
-
util/xc_vector.h (added)
-
xcache.c (modified) (9 diffs)
-
xcache.h (modified) (1 diff)
-
xcache_globals.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.frag
r981 r982 1 1 XCACHE_PROC_SRC=$(srcdir)/processor/main.m4 2 2 XCACHE_PROC_OUT=$(builddir)/processor.out 3 XCACHE_PROC_C=$(builddir)/ processor_real.c4 XCACHE_PROC_H=$(builddir)/ processor.h3 XCACHE_PROC_C=$(builddir)/main/xc_processor_real.c 4 XCACHE_PROC_H=$(builddir)/main/xc_processor.h 5 5 XCACHE_INCLUDES_SRC=$(srcdir)/includes.c 6 6 XCACHE_INCLUDES_I=$(builddir)/includes.i … … 10 10 $(CC) -I. -I$(srcdir) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -E $(XCACHE_INCLUDES_SRC) -o $(XCACHE_INCLUDES_I) 11 11 12 $(XCACHE_STRUCTINFO_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/ mkstructinfo.awk12 $(XCACHE_STRUCTINFO_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/gen_structinfo.awk 13 13 @echo $(XCACHE_STRUCTINFO_OUT) is optional if XCache test is not enabled, feel free if it awk failed to produce it 14 -$(XCACHE_AWK) -f $(srcdir)/ mkstructinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT).tmp && mv $(XCACHE_STRUCTINFO_OUT).tmp $(XCACHE_STRUCTINFO_OUT)14 -$(XCACHE_AWK) -f $(srcdir)/gen_structinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT).tmp && mv $(XCACHE_STRUCTINFO_OUT).tmp $(XCACHE_STRUCTINFO_OUT) 15 15 16 16 $(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCTINFO_OUT) $(XCACHE_PROC_SOURCES) … … 26 26 -$(XCACHE_INDENT) < $(XCACHE_PROC_OUT) > $(XCACHE_PROC_C).tmp && mv $(XCACHE_PROC_C).tmp $(XCACHE_PROC_C) 27 27 28 $(builddir)/ processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) $(srcdir)/processor.c28 $(builddir)/main/xc_processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) $(srcdir)/main/xc_processor.c 29 29 30 $(builddir)/ disassembler.lo: $(XCACHE_PROC_H) $(srcdir)/processor.c30 $(builddir)/submodules/xc_disassembler.lo: $(XCACHE_PROC_H) $(srcdir)/main/xc_processor.c 31 31 32 $(builddir)/ opcode_spec.lo: $(srcdir)/xcache.h $(srcdir)/opcode_spec.c $(srcdir)/opcode_spec_def.h $(srcdir)/const_string.h32 $(builddir)/xc_opcode_spec.lo: $(srcdir)/xcache.h $(srcdir)/xc_opcode_spec.c $(srcdir)/xc_opcode_spec_def.h $(srcdir)/xc_const_string.h 33 33 34 $(builddir)/xcache.lo: $(XCACHE_PROC_H) $(srcdir)/ xc_shm.h $(srcdir)/stack.h $(srcdir)/xcache_globals.h $(srcdir)/xcache.c $(srcdir)/foreachcoresig.h $(srcdir)/utils.h34 $(builddir)/xcache.lo: $(XCACHE_PROC_H) $(srcdir)/main/xc_shm.h $(srcdir)/util/xc_stack.h $(srcdir)/xcache_globals.h $(srcdir)/xcache.c $(srcdir)/util/xc_foreachcoresig.h $(srcdir)/main/xc_utils.h 35 35 36 36 xcachesvnclean: clean -
trunk/bin/phpdc.phpr
r976 r982 3 3 4 4 $srcdir = dirname(__FILE__); 5 require_once("$srcdir/ Decompiler.class.php");5 require_once("$srcdir/../lib/Decompiler.class.php"); 6 6 if (file_exists("$srcdir/phpdc.debug.php")) { 7 7 include("$srcdir/phpdc.debug.php"); -
trunk/bin/phpdop.phpr
r976 r982 3 3 4 4 $srcdir = dirname(__FILE__); 5 require_once("$srcdir/ Decompiler.class.php");5 require_once("$srcdir/../lib/Decompiler.class.php"); 6 6 if (file_exists("$srcdir/phpdc.debug.php")) { 7 7 include("$srcdir/phpdc.debug.php"); -
trunk/config.m4
r842 r982 1 1 dnl vim:ts=2:sw=2:expandtab 2 2 3 AC_DEFUN([XCACHE_ OPTION], [3 AC_DEFUN([XCACHE_MODULE], [ 4 4 PHP_ARG_ENABLE(xcache-$1, for XCache $1, 5 5 [ --enable-xcache-$2 XCache: $4], no, no) 6 6 if test "$PHP_$3" != "no"; then 7 xcache_sources="$xcache_sources $1.c"7 xcache_sources="$xcache_sources submodules/xc_$1.c" 8 8 XCACHE_MODULES="$XCACHE_MODULES $1" 9 9 HAVE_$3=1 … … 18 18 19 19 if test "$PHP_XCACHE" != "no"; then 20 PHP_ARG_ENABLE(xcache-constant, for XCache handle of compile time constant,20 PHP_ARG_ENABLE(xcache-constant, for XCache handle of compile time constant, 21 21 [ --enable-xcache-constant XCache: Handle new constants made by php compiler (e.g.: for __halt_compiler)], yes, no) 22 if test "$PHP_XCACHE_CONSTANT" != "no"; then23 AC_DEFINE([HAVE_XCACHE_CONSTANT], 1, [Define to enable XCache handling of compile time constants])24 fi22 if test "$PHP_XCACHE_CONSTANT" != "no"; then 23 AC_DEFINE([HAVE_XCACHE_CONSTANT], 1, [Define to enable XCache handling of compile time constants]) 24 fi 25 25 26 xcache_sources="processor.c \ 26 xcache_sources=" 27 main/xc_const_string.c \ 28 main/xc_lock.c \ 29 main/xc_mem.c \ 30 main/xc_opcode_spec.c \ 31 main/xc_processor.c \ 32 main/xc_shm.c \ 33 main/xc_shm_mmap.c \ 34 main/xc_utils.c \ 35 util/xc_stack.c \ 27 36 xcache.c \ 28 mmap.c \29 mem.c \30 xc_shm.c \31 const_string.c \32 opcode_spec.c \33 stack.c \34 utils.c \35 lock.c \36 37 " 37 38 XCACHE_MODULES="cacher" 38 XCACHE_ OPTION([optimizer], [optimizer ], [XCACHE_OPTIMIZER], [(N/A)])39 XCACHE_ OPTION([coverager], [coverager ], [XCACHE_COVERAGER], [Enable code coverage dumper, useful for testing php scripts])40 XCACHE_ OPTION([assembler], [assembler ], [XCACHE_ASSEMBLER], [(N/A)])41 XCACHE_ OPTION([disassembler], [disassembler], [XCACHE_DISASSEMBLER], [Enable opcode to php variable dumper, NOT for production server])42 XCACHE_ OPTION([encoder], [encoder ], [XCACHE_ENCODER], [(N/A)])43 XCACHE_ OPTION([decoder], [decoder ], [XCACHE_DECODER], [(N/A)])39 XCACHE_MODULE([optimizer], [optimizer ], [XCACHE_OPTIMIZER], [(N/A)]) 40 XCACHE_MODULE([coverager], [coverager ], [XCACHE_COVERAGER], [Enable code coverage dumper, useful for testing php scripts]) 41 XCACHE_MODULE([assembler], [assembler ], [XCACHE_ASSEMBLER], [(N/A)]) 42 XCACHE_MODULE([disassembler], [disassembler], [XCACHE_DISASSEMBLER], [Enable opcode to php variable dumper, NOT for production server]) 43 XCACHE_MODULE([encoder], [encoder ], [XCACHE_ENCODER], [(N/A)]) 44 XCACHE_MODULE([decoder], [decoder ], [XCACHE_DECODER], [(N/A)]) 44 45 AC_DEFINE_UNQUOTED([XCACHE_MODULES], "$XCACHE_MODULES", [Define what modules is built with XCache]) 45 46 … … 48 49 if test "$PHP_XCACHE_TEST" != "no"; then 49 50 XCACHE_ENABLE_TEST=-DXCACHE_ENABLE_TEST 50 xcache_sources="$xcache_sources xc_malloc.c"51 xcache_sources="$xcache_sources main/xc_malloc.c" 51 52 AC_DEFINE([HAVE_XCACHE_TEST], 1, [Define to enable XCache self test]) 52 53 else … … 116 117 XCACHE_PROC_SOURCES=`ls $ac_srcdir/processor/*.m4` 117 118 PHP_SUBST([XCACHE_PROC_SOURCES]) 118 119 AC_MSG_CHECKING(if you have opcode_spec_def.h for XCache)120 if test -e "$ac_srcdir/opcode_spec_def.h" ; then121 AC_DEFINE([HAVE_XCACHE_OPCODE_SPEC_DEF], 1, [Define if you have opcode_spec_def.h for XCache])122 AC_MSG_RESULT(yes)123 else124 dnl check for features depend on opcode_spec_def.h125 AC_MSG_RESULT(no)126 define([ERROR], [127 AC_MSG_ERROR([cannot build with $1, $ac_srcdir/opcode_spec_def.h required])128 ])129 if test "$PHP_XCACHE_DISASSEMBLER" != "no" ; then130 ERROR(disassembler)131 fi132 undefine([ERROR])133 fi134 119 fi -
trunk/config.w32
r694 r982 12 12 // }}} 13 13 14 var xcache_sources = "processor.c \ 14 var xcache_sources = " 15 main/xc_processor.c \ 16 main/xc_const_string.c \ 17 main/xc_lock.c \ 18 main/xc_mem.c \ 19 main/xc_opcode_spec.c \ 20 main/xc_shm.c \ 21 main/xc_shm_mmap.c \ 22 main/xc_utils.c \ 23 util/xc_stack.c \ 15 24 xcache.c \ 16 mmap.c \17 mem.c \18 xc_shm.c \19 const_string.c \20 opcode_spec.c \21 stack.c \22 utils.c \23 lock.c \24 25 "; 25 26 // {{{ add sources on enabled … … 41 42 var withval = eval("PHP_XCACHE_" + uname); 42 43 if (withval != "no") { 43 xcache_sources += " " + name + ".c";44 xcache_sources += " submodules/xc_" + name + ".c"; 44 45 XCACHE_MODULES += " " + name; 45 46 STDOUT.WriteLine("Enabling XCache Module: " + name); … … 76 77 if (PHP_XCACHE_TEST != "no") { 77 78 ADD_FLAG("XCACHE_ENABLE_TEST", "-DXCACHE_ENABLE_TEST"); 78 xcache_sources += " xc_malloc.c";79 xcache_sources += " main/xc_malloc.c"; 79 80 AC_DEFINE("HAVE_XCACHE_TEST", 1, "Define to enable XCache self test"); 80 81 } … … 130 131 XCACHE_PROC_SOURCES=glob(srcdir + "\\processor\\*.m4").join(' '); 131 132 ADD_FLAG("XCACHE_PROC_SOURCES", XCACHE_PROC_SOURCES); 132 // {{{ check for opcode_spec_def.h133 STDOUT.Write("Checking if you have opcode_spec_def.h for XCache ... ");134 var file = srcdir + "\\opcode_spec_def.h";135 if (FSO.FileExists(file)) {136 STDOUT.WriteLine("yes");137 AC_DEFINE("HAVE_XCACHE_OPCODE_SPEC_DEF", 1, "Define if you have opcode_spec_def.h for XCache");138 }139 else {140 STDOUT.WriteLine("no");141 142 // check for features depend on opcode_spec_def.h143 var xcache_require_opcode_spec_def = function(withval, name) {144 if (withval != "no") {145 ERROR(file + " is required to enable XCache " + name);146 }147 }148 xcache_require_opcode_spec_def(PHP_XCACHE_DISASSEMBLER, "disassembler");149 }150 // }}}151 133 } -
trunk/devel/prepare.devel
r976 r982 13 13 14 14 make_all() { 15 make_ opcode_spec_def.h16 make_ const_string15 make_xc_opcode_spec_def.h 16 make_xc_const_string 17 17 test -e tags && echo tags exists, skipping. use \""$0" tags\" to rebuild || make_tags 18 18 } 19 19 20 20 make_clean() { 21 make_clean_ const_string22 echo "*" rm -f tags opcode_spec_def.h23 rm -f tags opcode_spec_def.h21 make_clean_xc_const_string 22 echo "*" rm -f tags xc_opcode_spec_def.h 23 rm -f tags xc_opcode_spec_def.h 24 24 } 25 25 26 make_ const_string() {27 make_ const_string_opcodes_php4.x.h28 make_ const_string_opcodes_php5.0.h29 make_ const_string_opcodes_php5.1.h30 make_ const_string_opcodes_php5.4.h31 make_ const_string_opcodes_php6.x.h26 make_xc_const_string() { 27 make_xc_const_string_opcodes_php4.x.h 28 make_xc_const_string_opcodes_php5.0.h 29 make_xc_const_string_opcodes_php5.1.h 30 make_xc_const_string_opcodes_php5.4.h 31 make_xc_const_string_opcodes_php6.x.h 32 32 } 33 33 34 make_clean_ const_string() {35 echo "*" rm -f const_string_opcodes_php*.h{,.tmp}36 rm -f const_string_opcodes_php*.h34 make_clean_xc_const_string() { 35 echo "*" rm -f main/xc_const_string_opcodes_php*.h{,.tmp} 36 rm -f main/xc_const_string_opcodes_php*.h 37 37 } 38 38 39 make_ const_string_opcodes_php4.x.h() {40 precheck const_string_opcodes_php4.x.h "${PHP4_x_DIR}/Zend/zend_compile.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O"39 make_xc_const_string_opcodes_php4.x.h() { 40 precheck main/xc_const_string_opcodes_php4.x.h "${PHP4_x_DIR}/Zend/zend_compile.h" && "$AWK" -f ./devel/gen_const_string_opcodes.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O" 41 41 } 42 42 43 make_ const_string_opcodes_php5.0.h() {44 precheck const_string_opcodes_php5.0.h "${PHP5_0_DIR}/Zend/zend_compile.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O"43 make_xc_const_string_opcodes_php5.0.h() { 44 precheck main/xc_const_string_opcodes_php5.0.h "${PHP5_0_DIR}/Zend/zend_compile.h" && "$AWK" -f ./devel/gen_const_string_opcodes.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O" 45 45 } 46 46 47 make_ const_string_opcodes_php5.1.h() {48 precheck const_string_opcodes_php5.1.h "${PHP5_1_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O"47 make_xc_const_string_opcodes_php5.1.h() { 48 precheck main/xc_const_string_opcodes_php5.1.h "${PHP5_1_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./devel/gen_const_string_opcodes.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O" 49 49 } 50 50 51 make_ const_string_opcodes_php5.4.h() {52 precheck const_string_opcodes_php5.4.h "${PHP5_4_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O"51 make_xc_const_string_opcodes_php5.4.h() { 52 precheck main/xc_const_string_opcodes_php5.4.h "${PHP5_4_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./devel/gen_const_string_opcodes.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O" 53 53 } 54 54 55 make_ const_string_opcodes_php6.x.h() {56 precheck const_string_opcodes_php6.x.h "${PHP6_x_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O"55 make_xc_const_string_opcodes_php6.x.h() { 56 precheck main/xc_const_string_opcodes_php6.x.h "${PHP6_x_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./devel/gen_const_string_opcodes.awk < "$I" > "$O.tmp" && mv "$O.tmp" "$O" 57 57 } 58 58 59 make_ opcode_spec_def.h() {60 precheck "opcode_spec_def.h" "${EA_DIR}/opcodes.c" && "$AWK" -f ./mkopcode_spec.awk < "$I" > "$O"59 make_xc_opcode_spec_def.h() { 60 precheck main/xc_opcode_spec_def.h "${EA_DIR}/opcodes.c" && "$AWK" -f ./devel/gen_xc_opcode_spec.awk < "$I" > "$O" 61 61 } 62 62 -
trunk/devel/prepare.devel.inc.example
r976 r982 1 # copy this file as devel.prepare.inc before modifying1 # copy this file as ../devel.prepare.inc before modifying 2 2 PHP4_x_DIR= 3 3 PHP5_0_DIR= -
trunk/devel/run
r980 r982 7 7 if echo $basename | grep -- - >/dev/null; then :; else 8 8 dirs=${dirs:-php5-debug} 9 9 10 for dir in $dirs; do 10 11 cd ../${basename}-${dir} || exit 12 13 rm -f php-src 14 find -L . -type l | xargs rm -f 15 lndir ../$basename >/dev/null 16 find . -iname .\*.swp | xargs rm -f 17 ln -sf ~/src/php/$dir php-src 18 for i in ~/src/php/$dir/sapi/cgi/php{,-cgi}; do 19 [[ -r $i ]] && ln -sf "$i" php-cgi 20 done 21 ln -sf ~/src/php/$dir/sapi/cli/php php-cli 22 11 23 pwd 12 24 $0 "$@" … … 14 26 exit 15 27 fi 28 phpbasename=${basename#*-} 29 xcachebasename=${basename%%-*} 16 30 17 31 if [[ ! -z $1 ]]; then … … 26 40 fi 27 41 28 if [[ $type = make ]]; then 42 case $type in 43 prepare) 44 exec ./devel/prepare.devel 45 ;; 46 tags) 47 exec ./devel/prepare.devel tags 48 ;; 49 rebuild) 50 PHPDIRS=${PHPDIRS:-$HOME/test} 51 if [[ ! -x $PHPDIRS/$phpbasename/bin/phpize ]]; then 52 echo $PHPDIRS/$phpbasename/bin/phpize not found 53 exit 54 fi 55 export PATH=$PHPDIRS/$phpbasename/bin:$PATH 56 phpize --clean \ 57 && phpize \ 58 && CFLAGS="-Wall -Wno-unused -W -Wshadow -std=gnu99" ./configure --enable-xcache-disassembler --enable-xcache-test --enable-xcache-constant \ 59 && make 60 exit 61 ;; 62 make) 29 63 MAKEARGS=("$@") 30 fi 64 ;; 65 esac 31 66 32 LANG=C /usr/bin/make $MAKEOPTS "${MAKEARGS[@]}" 2>&1 | hi error warn FAIL67 LANG=C /usr/bin/make $MAKEOPTS "${MAKEARGS[@]}" 2>&1 | hi error implicit warn FAIL 33 68 ret=${PIPESTATUS[0]} 34 69 if [[ $ret -ne 0 || $type = make ]]; then … … 75 110 ;; 76 111 dc) 77 exec ./php-cli -c php.ini ./ phpdc.phpr "${args[@]}" | tee decompiled.php112 exec ./php-cli -c php.ini ./bin/phpdc.phpr "${args[@]}" | tee decompiled.php 78 113 ;; 79 114 dop) 80 exec ./php-c gi -q -c php.ini ./phpdop.phpr "${args[@]}"115 exec ./php-cli -c php.ini ./bin/phpdop.phpr "${args[@]}" 81 116 ;; 82 117 retest) -
trunk/main/xc_const_string.c
r976 r982 1 1 #include "xcache.h" 2 #include " const_string.h"2 #include "xc_const_string.h" 3 3 4 4 /* {{{ xc_get_op_type */ … … 63 63 /* {{{ xc_get_opcode */ 64 64 #if PHP_MAJOR_VERSION >= 6 65 # include " const_string_opcodes_php6.x.h"65 # include "xc_const_string_opcodes_php6.x.h" 66 66 #elif defined(ZEND_ENGINE_2_4) 67 # include " const_string_opcodes_php5.4.h"67 # include "xc_const_string_opcodes_php5.4.h" 68 68 #elif defined(ZEND_ENGINE_2_1) 69 # include " const_string_opcodes_php5.1.h"69 # include "xc_const_string_opcodes_php5.1.h" 70 70 #elif defined(ZEND_ENGINE_2) 71 # include " const_string_opcodes_php5.0.h"71 # include "xc_const_string_opcodes_php5.0.h" 72 72 #else 73 # include " const_string_opcodes_php4.x.h"73 # include "xc_const_string_opcodes_php4.x.h" 74 74 #endif 75 75 -
trunk/main/xc_lock.c
r976 r982 19 19 NULL) 20 20 #endif 21 #include " lock.h"21 #include "xc_lock.h" 22 22 23 23 struct _xc_lock_t { -
trunk/main/xc_malloc.c
r976 r982 10 10 #include "xc_shm.h" 11 11 #include "php.h" 12 #include " align.h"13 #include "util s.h"12 #include "xc_utils.h" 13 #include "util/xc_align.h" 14 14 15 15 struct _xc_malloc_mem_t { -
trunk/main/xc_mem.c
r976 r982 18 18 #define XC_MEM_IMPL _xc_mem_mem_t 19 19 #include "xc_shm.h" 20 #include "align.h" 21 #include "utils.h" 20 #include "xc_utils.h" 21 #include "util/xc_align.h" 22 #include "util/xc_trace.h" 22 23 23 24 #if 0 -
trunk/main/xc_opcode_spec.c
r976 r982 1 1 #include "xcache.h" 2 #include " opcode_spec.h"3 #include " const_string.h"2 #include "xc_opcode_spec.h" 3 #include "xc_const_string.h" 4 4 5 #ifdef HAVE_XCACHE_OPCODE_SPEC_DEF6 5 /* {{{ opcode_spec */ 7 6 #define OPSPEC(ext, op1, op2, res) { OPSPEC_##ext, OPSPEC_##op1, OPSPEC_##op2, OPSPEC_##res }, … … 11 10 # define OPSPEC_VAR_2 OPSPEC_VAR 12 11 #endif 13 #include " opcode_spec_def.h"12 #include "xc_opcode_spec_def.h" 14 13 15 14 zend_uchar xc_get_opcode_spec_count() … … 30 29 } 31 30 /* }}} */ 32 #endif33 31 /* {{{ op_spec */ 34 32 -
trunk/main/xc_processor.c
r976 r982 1 #include " processor_real.c"1 #include "xc_processor_real.c" -
trunk/main/xc_shm.h
r979 r982 14 14 typedef size_t xc_shmsize_t; 15 15 16 #include " mem.h"16 #include "xc_mem.h" 17 17 18 18 /* shm */ -
trunk/main/xc_shm_mmap.c
r979 r982 32 32 #define XC_SHM_IMPL _xc_mmap_shm_t 33 33 #include "xc_shm.h" 34 #include " utils.h"34 #include "xc_utils.h" 35 35 36 36 #ifndef max -
trunk/main/xc_utils.c
r976 r982 1 1 2 2 #include "xcache.h" 3 #include "stack.h"4 3 #include "xcache_globals.h" 5 #include " utils.h"4 #include "xc_utils.h" 6 5 #ifdef ZEND_ENGINE_2_1 7 6 #include "zend_vm.h" 8 7 #endif 9 #include " opcode_spec.h"8 #include "xc_opcode_spec.h" 10 9 #undef NDEBUG 11 10 #include "assert.h" … … 283 282 /* }}} */ 284 283 285 #ifdef HAVE_XCACHE_OPCODE_SPEC_DEF286 284 static void xc_fix_opcode_ex_znode(int tofix, xc_op_spec_t spec, Z_OP_TYPEOF_TYPE *op_type, znode_op *op, int type TSRMLS_DC) /* {{{ */ 287 285 { … … 348 346 } 349 347 /* }}} */ 350 #endif351 348 352 349 int xc_foreach_early_binding_class(zend_op_array *op_array, void (*callback)(zend_op *opline, int oplineno, void *data TSRMLS_DC), void *data TSRMLS_DC) /* {{{ */ -
trunk/main/xc_utils.h
r976 r982 1 1 #include "php.h" 2 2 #include "xcache.h" 3 4 #ifdef XCACHE_DEBUG5 # define IFDEBUG(x) (x)6 int xc_vtrace(const char *fmt, va_list args);7 int xc_trace(const char *fmt, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);8 9 # ifdef ZEND_WIN3210 static inline int TRACE(const char *fmt, ...)11 {12 va_list args;13 int ret;14 15 va_start(args, fmt);16 ret = xc_vtrace(fmt, args);17 va_end(args);18 return ret;19 }20 # else21 # define TRACE(fmt, ...) \22 xc_trace("%s:%d: " fmt "\r\n", __FILE__, __LINE__, __VA_ARGS__)23 # endif /* ZEND_WIN32 */24 # undef NDEBUG25 # undef inline26 # define inline27 #else /* XCACHE_DEBUG */28 29 # ifdef ZEND_WIN3230 static inline int TRACE_DUMMY(const char *fmt, ...)31 {32 return 0;33 }34 # define TRACE 1 ? 0 : TRACE_DUMMY35 # else36 # define TRACE(fmt, ...) do { } while (0)37 # endif /* ZEND_WIN32 */38 39 # define IFDEBUG(x) do { } while (0)40 #endif /* XCACHE_DEBUG */41 #include <assert.h>42 3 43 4 int xc_util_init(int module_number TSRMLS_DC); … … 108 69 #define zend_atol xc_atol 109 70 #endif 110 111 typedef struct {112 zend_uint size;113 zend_uint cnt;114 void *data;115 } xc_vector_t;116 117 #define xc_vector_init(type, vector) do { \118 (vector)->cnt = 0; \119 (vector)->size = 0; \120 (vector)->data = NULL; \121 } while (0)122 123 #define xc_vector_add(type, vector, value) do { \124 if ((vector)->cnt == (vector)->size) { \125 if ((vector)->size) { \126 (vector)->size <<= 1; \127 (vector)->data = erealloc((vector)->data, sizeof(type) * (vector)->size); \128 } \129 else { \130 (vector)->size = 8; \131 (vector)->data = emalloc(sizeof(type) * (vector)->size); \132 } \133 } \134 ((type *) (vector)->data)[(vector)->cnt++] = value; \135 } while (0)136 137 static inline void *xc_vector_detach_impl(xc_vector_t *vector)138 {139 void *data = vector->data;140 vector->data = NULL;141 vector->size = 0;142 vector->cnt = 0;143 return data;144 }145 146 #define xc_vector_detach(type, vector) ((type *) xc_vector_detach_impl(vector))147 148 static inline void xc_vector_free_impl(xc_vector_t *vector TSRMLS_DC)149 {150 if (vector->data) {151 efree(vector->data);152 }153 vector->size = 0;154 vector->cnt = 0;155 }156 157 #define xc_vector_free(type, vector) xc_vector_free_impl(vector TSRMLS_CC)158 -
trunk/processor/head.m4
r930 r982 11 11 12 12 #include "xcache.h" 13 #include "align.h" 14 #include "const_string.h" 15 #include "processor.h" 16 #include "stack.h" 13 #include "util/xc_align.h" 14 #include "xc_const_string.h" 15 #include "xc_processor.h" 17 16 #include "xcache_globals.h" 18 17 -
trunk/submodules/xc_disassembler.c
r976 r982 1 #include " disassembler.h"1 #include "xc_disassembler.h" 2 2 #include "xcache.h" 3 #include " utils.h"4 #include " processor.h"3 #include "xc_utils.h" 4 #include "xc_processor.h" 5 5 6 #ifndef HAVE_XCACHE_OPCODE_SPEC_DEF7 #error disassembler cannot be built without xcache/opcode_spec_def.h8 #endif9 6 static void xc_dasm(zval *output, zend_op_array *op_array TSRMLS_DC) /* {{{ */ 10 7 { -
trunk/util/xc_stack.c
r976 r982 1 1 #include <stdlib.h> 2 2 #include <assert.h> 3 #include " stack.h"3 #include "xc_stack.h" 4 4 typedef xc_stack_t* S; 5 5 -
trunk/util/xc_stack.h
r976 r982 1 #ifndef __XC_UTIL_STACK 2 #define __XC_UTIL_STACK 1 3 2 4 typedef struct { … … 17 19 void xc_stack_reverse(S stack); 18 20 #undef S 21 22 #endif /* __XC_UTIL_STACK */ -
trunk/xcache.c
r979 r982 27 27 #include "ext/date/php_date.h" 28 28 #endif 29 #include "optimizer.h" 30 #include "coverager.h" 31 #include "disassembler.h" 32 #include "align.h" 33 #include "stack.h" 29 #include "submodules/xc_optimizer.h" 30 #include "submodules/xc_coverager.h" 31 #include "submodules/xc_disassembler.h" 34 32 #include "xcache_globals.h" 35 #include "processor.h" 36 #include "const_string.h" 37 #include "opcode_spec.h" 38 #include "utils.h" 33 #include "xc_processor.h" 34 #include "xc_const_string.h" 35 #include "xc_opcode_spec.h" 36 #include "xc_utils.h" 37 #include "util/xc_align.h" 38 #include "util/xc_stack.h" 39 #include "util/xc_vector.h" 40 #include "util/xc_trace.h" 39 41 40 42 #define VAR_ENTRY_EXPIRED(pentry) ((pentry)->ttl && XG(request_time) > (pentry)->ctime + (time_t) (pentry)->ttl) … … 72 74 static zend_bool xc_disable_on_crash = 0; 73 75 74 static xc_hash_t xc_php_hcache = { 0 };75 static xc_hash_t xc_php_hentry = { 0 };76 static xc_hash_t xc_var_hcache = { 0 };77 static xc_hash_t xc_var_hentry = { 0 };76 static xc_hash_t xc_php_hcache = { 0, 0, 0 }; 77 static xc_hash_t xc_php_hentry = { 0, 0, 0 }; 78 static xc_hash_t xc_var_hcache = { 0, 0, 0 }; 79 static xc_hash_t xc_var_hentry = { 0, 0, 0 }; 78 80 79 81 static zend_ulong xc_php_ttl = 0; … … 114 116 #endif 115 117 ZEND_DLEXPORT zend_extension zend_extension_entry; 116 ZEND_DECLARE_MODULE_GLOBALS(xcache) ;118 ZEND_DECLARE_MODULE_GLOBALS(xcache) 117 119 118 120 typedef enum { XC_TYPE_PHP, XC_TYPE_VAR } xc_entry_type_t; … … 3271 3273 } 3272 3274 /* }}} */ 3273 #ifdef HAVE_XCACHE_OPCODE_SPEC_DEF3274 3275 /* {{{ proto string xcache_get_opcode_spec(int opcode) */ 3275 3276 PHP_FUNCTION(xcache_get_opcode_spec) … … 3295 3296 } 3296 3297 /* }}} */ 3297 #endif3298 3298 /* {{{ proto mixed xcache_get_special_value(zval value) 3299 3299 XCache internal use only: For decompiler to get static value with type fixed */ … … 3398 3398 PHP_FE(xcache_get_data_type, NULL) 3399 3399 PHP_FE(xcache_get_opcode, NULL) 3400 #ifdef HAVE_XCACHE_OPCODE_SPEC_DEF3401 3400 PHP_FE(xcache_get_opcode_spec, NULL) 3402 #endif3403 3401 PHP_FE(xcache_is_autoglobal, NULL) 3404 3402 PHP_FE(xcache_inc, NULL) … … 3520 3518 typedef void (*xc_sighandler_t)(int); 3521 3519 #define FOREACH_SIG(sig) static xc_sighandler_t old_##sig##_handler = NULL 3522 #include " foreachcoresig.h"3520 #include "util/xc_foreachcoresig.h" 3523 3521 #undef FOREACH_SIG 3524 3522 /* }}} */ … … 3534 3532 } \ 3535 3533 } while (0) 3536 #include " foreachcoresig.h"3534 #include "util/xc_foreachcoresig.h" 3537 3535 #undef FOREACH_SIG 3538 3536 } … … 3542 3540 #define FOREACH_SIG(sig) \ 3543 3541 old_##sig##_handler = signal(sig, xcache_signal_handler) 3544 #include " foreachcoresig.h"3542 #include "util/xc_foreachcoresig.h" 3545 3543 #undef FOREACH_SIG 3546 3544 } -
trunk/xcache.h
r967 r982 21 21 #endif 22 22 #include "xc_shm.h" 23 #include " lock.h"23 #include "xc_lock.h" 24 24 25 25 #if !defined(ZEND_ENGINE_2_4) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4 || PHP_MAJOR_VERSION > 5) -
trunk/xcache_globals.h
r894 r982 1 #include "util/xc_stack.h" 1 2 2 3 ZEND_BEGIN_MODULE_GLOBALS(xcache)
Note: See TracChangeset
for help on using the changeset viewer.

