Browse Source

refactor: fix build for optimizer, use mod_* directories

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1003 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
tags/3.0.0-beta1
Xuefer 8 years ago
parent
commit
5c0dfec523
48 changed files with 28 additions and 16 deletions
  1. +5
    -1
      README
  2. +1
    -1
      config.m4
  3. +1
    -1
      config.w32
  4. +9
    -3
      devel/run
  5. +0
    -0
      mod_assembler/xc_assembler.c
  6. +0
    -0
      mod_cacher/htdocs/common-en.lang.php
  7. +0
    -0
      mod_cacher/htdocs/common-zh-simplified-utf-8.lang.php
  8. +0
    -0
      mod_cacher/htdocs/common-zh-traditional-utf-8.lang.php
  9. +0
    -0
      mod_cacher/htdocs/common.php
  10. +0
    -0
      mod_cacher/htdocs/config.default.php
  11. +0
    -0
      mod_cacher/htdocs/config.example.php
  12. +0
    -0
      mod_cacher/htdocs/edit.php
  13. +0
    -0
      mod_cacher/htdocs/edit.tpl.php
  14. +0
    -0
      mod_cacher/htdocs/footer.tpl.php
  15. +0
    -0
      mod_cacher/htdocs/header.tpl.php
  16. +0
    -0
      mod_cacher/htdocs/help-en.lang.php
  17. +0
    -0
      mod_cacher/htdocs/help-zh-simplified-utf-8.lang.php
  18. +0
    -0
      mod_cacher/htdocs/help-zh-traditional-utf-8.lang.php
  19. +0
    -0
      mod_cacher/htdocs/help.php
  20. +0
    -0
      mod_cacher/htdocs/index.php
  21. +0
    -0
      mod_cacher/htdocs/mkpassword.php
  22. +0
    -0
      mod_cacher/htdocs/tablesort.js
  23. +0
    -0
      mod_cacher/htdocs/xcache.css
  24. +0
    -0
      mod_cacher/htdocs/xcache.php
  25. +0
    -0
      mod_cacher/htdocs/xcache.tpl.php
  26. +0
    -0
      mod_coverager/htdocs/common-en.lang.php
  27. +0
    -0
      mod_coverager/htdocs/common-zh-simplified-gb2312.lang.php
  28. +0
    -0
      mod_coverager/htdocs/common-zh-simplified-utf-8.lang.php
  29. +0
    -0
      mod_coverager/htdocs/common.php
  30. +0
    -0
      mod_coverager/htdocs/config.php.example
  31. +0
    -0
      mod_coverager/htdocs/coverager.css
  32. +0
    -0
      mod_coverager/htdocs/coverager.php
  33. +0
    -0
      mod_coverager/htdocs/coverager.tpl.php
  34. +0
    -0
      mod_coverager/htdocs/index.php
  35. +0
    -0
      mod_coverager/xc_coverager.c
  36. +0
    -0
      mod_coverager/xc_coverager.h
  37. +0
    -0
      mod_decoder/xc_decoder.c
  38. +0
    -0
      mod_disassembler/bin/phpdc.phpr
  39. +0
    -0
      mod_disassembler/bin/phpdop.phpr
  40. +0
    -0
      mod_disassembler/lib/Decompiler.class.php
  41. +0
    -0
      mod_disassembler/xc_disassembler.c
  42. +0
    -0
      mod_disassembler/xc_disassembler.h
  43. +0
    -0
      mod_encoder/xc_encoder.c
  44. +7
    -5
      mod_optimizer/xc_optimizer.c
  45. +0
    -0
      mod_optimizer/xc_optimizer.h
  46. +3
    -3
      xcache.c
  47. +1
    -1
      xcache/xc_processor.c
  48. +1
    -1
      xcache/xc_utils.c

+ 5
- 1
README View File

@@ -1 +1,5 @@
Please check http://xcache.lighttpd.net/ and https://groups.google.com/forum/?fromgroups#!forum/xcache for help
XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load.
It is tested (on linux) and supported on all of the latest version of PHP popular release branches.
ThreadSafe/Windows is also perfectly supported.

Please check http://xcache.lighttpd.net/ and https://groups.google.com/group/xcache for help

+ 1
- 1
config.m4 View File

@@ -4,7 +4,7 @@ AC_DEFUN([XCACHE_MODULE], [
PHP_ARG_ENABLE(xcache-$1, for XCache $1,
[ --enable-xcache-$2 XCache: $4], no, no)
if test "$PHP_$3" != "no"; then
xcache_sources="$xcache_sources submodules/xc_$1.c"
xcache_sources="$xcache_sources mod_$1/xc_$1.c"
XCACHE_MODULES="$XCACHE_MODULES $1"
HAVE_$3=1
AC_DEFINE([HAVE_$3], 1, [Define for XCache: $4])


+ 1
- 1
config.w32 View File

@@ -44,7 +44,7 @@ if (PHP_XCACHE != "no") {
var uname = name.toUpperCase();
var withval = eval("PHP_XCACHE_" + uname);
if (withval != "no") {
xcache_sources += " submodules/xc_" + name + ".c";
xcache_sources += " mod_" + name + "/xc_" + name + ".c";
XCACHE_MODULES += " " + name;
STDOUT.WriteLine("Enabling XCache Module: " + name);
AC_DEFINE("HAVE_XCACHE_" + uname, 1, "Define for XCache: " + name)


+ 9
- 3
devel/run View File

@@ -80,7 +80,13 @@ reb*)
export PATH=$PHPDIRS/$phpbasename/bin:$PATH
phpize --clean \
&& phpize \
&& CFLAGS="-Wall -Wno-unused -W -Wshadow -std=gnu99" ./configure --enable-xcache-disassembler --enable-xcache-test --enable-xcache-constant \
&& CFLAGS="-Wall -Wno-unused -W -Wshadow -std=gnu99" ./configure \
--enable-xcache-cacher \
--enable-xcache-optimizer \
--enable-xcache-encoder \
--enable-xcache-decoder \
--enable-xcache-disassembler \
--enable-xcache-test --enable-xcache-constant \
&& make clean all
exit
;;
@@ -134,10 +140,10 @@ val*)
tracer=(valgrind --gen-suppressions=all)
;;
dc)
exec ./php-cli -c devel.ini ./bin/phpdc.phpr "${args[@]}" | tee decompiled.php
exec ./php-cli -c devel.ini ./mod_disassembler/bin/phpdc.phpr "${args[@]}" | tee decompiled.php
;;
dop)
exec ./php-cli -c devel.ini ./bin/phpdop.phpr "${args[@]}"
exec ./php-cli -c devel.ini ./mod_disassembler/bin/phpdop.phpr "${args[@]}"
;;
retest)
exec make xcachetest "$@" TESTS="`grep '^/.*\.phpt$' php_test_results_*.txt | uniq | xargs`"


submodules/xc_assembler.c → mod_assembler/xc_assembler.c View File


admin/common-en.lang.php → mod_cacher/htdocs/common-en.lang.php View File


admin/common-zh-simplified-utf-8.lang.php → mod_cacher/htdocs/common-zh-simplified-utf-8.lang.php View File


admin/common-zh-traditional-utf-8.lang.php → mod_cacher/htdocs/common-zh-traditional-utf-8.lang.php View File


admin/common.php → mod_cacher/htdocs/common.php View File


admin/config.default.php → mod_cacher/htdocs/config.default.php View File


admin/config.example.php → mod_cacher/htdocs/config.example.php View File


admin/edit.php → mod_cacher/htdocs/edit.php View File


admin/edit.tpl.php → mod_cacher/htdocs/edit.tpl.php View File


admin/footer.tpl.php → mod_cacher/htdocs/footer.tpl.php View File


admin/header.tpl.php → mod_cacher/htdocs/header.tpl.php View File


admin/help-en.lang.php → mod_cacher/htdocs/help-en.lang.php View File


admin/help-zh-simplified-utf-8.lang.php → mod_cacher/htdocs/help-zh-simplified-utf-8.lang.php View File


admin/help-zh-traditional-utf-8.lang.php → mod_cacher/htdocs/help-zh-traditional-utf-8.lang.php View File


admin/help.php → mod_cacher/htdocs/help.php View File


admin/index.php → mod_cacher/htdocs/index.php View File


admin/mkpassword.php → mod_cacher/htdocs/mkpassword.php View File


admin/tablesort.js → mod_cacher/htdocs/tablesort.js View File


admin/xcache.css → mod_cacher/htdocs/xcache.css View File


admin/xcache.php → mod_cacher/htdocs/xcache.php View File


admin/xcache.tpl.php → mod_cacher/htdocs/xcache.tpl.php View File


coverager/common-en.lang.php → mod_coverager/htdocs/common-en.lang.php View File


coverager/common-zh-simplified-gb2312.lang.php → mod_coverager/htdocs/common-zh-simplified-gb2312.lang.php View File


coverager/common-zh-simplified-utf-8.lang.php → mod_coverager/htdocs/common-zh-simplified-utf-8.lang.php View File


coverager/common.php → mod_coverager/htdocs/common.php View File


coverager/config.php.example → mod_coverager/htdocs/config.php.example View File


coverager/coverager.css → mod_coverager/htdocs/coverager.css View File


coverager/coverager.php → mod_coverager/htdocs/coverager.php View File


coverager/coverager.tpl.php → mod_coverager/htdocs/coverager.tpl.php View File


coverager/index.php → mod_coverager/htdocs/index.php View File


submodules/xc_coverager.c → mod_coverager/xc_coverager.c View File


submodules/xc_coverager.h → mod_coverager/xc_coverager.h View File


submodules/xc_decoder.c → mod_decoder/xc_decoder.c View File


bin/phpdc.phpr → mod_disassembler/bin/phpdc.phpr View File


bin/phpdop.phpr → mod_disassembler/bin/phpdop.phpr View File


lib/Decompiler.class.php → mod_disassembler/lib/Decompiler.class.php View File


submodules/xc_disassembler.c → mod_disassembler/xc_disassembler.c View File


submodules/xc_disassembler.h → mod_disassembler/xc_disassembler.h View File


submodules/xc_encoder.c → mod_encoder/xc_encoder.c View File


submodules/xc_optimizer.c → mod_optimizer/xc_optimizer.c View File

@@ -2,15 +2,17 @@
# define XCACHE_DEBUG
#endif

#include "utils.h"
#include "optimizer.h"
#include "xcache/xc_utils.h"
#include "xc_optimizer.h"
/* the "vector" stack */
#include "stack.h"
#include "util/xc_stack.h"
#include "util/xc_trace.h"
#include "xcache_globals.h"

#ifdef XCACHE_DEBUG
# include "processor.h"
# include "const_string.h"
#error 1
# include "xc_processor.h"
# include "xcache/xc_const_string.h"
# include "ext/standard/php_var.h"
#endif


submodules/xc_optimizer.h → mod_optimizer/xc_optimizer.h View File


+ 3
- 3
xcache.c View File

@@ -28,17 +28,17 @@
#endif

#ifdef HAVE_XCACHE_OPTIMIZER
# include "submodules/xc_optimizer.h"
# include "mod_optimizer/xc_optimizer.h"
#else
# define XCACHE_OPTIMIZER_FUNCTIONS()
#endif
#ifdef HAVE_XCACHE_COVERAGER
# include "submodules/xc_coverager.h"
# include "mod_coverager/xc_coverager.h"
#else
# define XCACHE_COVERAGER_FUNCTIONS()
#endif
#ifdef HAVE_XCACHE_DISASSEMBLER
# include "submodules/xc_disassembler.h"
# include "mod_disassembler/xc_disassembler.h"
#else
# define XCACHE_DISASSEMBLER_FUNCTIONS()
#endif


+ 1
- 1
xcache/xc_processor.c View File

@@ -1 +1 @@
#include "../xc_processor.c.h"
#include "xc_processor.c.h"

+ 1
- 1
xcache/xc_utils.c View File

@@ -6,7 +6,7 @@
#include "zend_vm.h"
#endif
#include "xc_opcode_spec.h"
#include "../util/xc_trace.h"
#include "util/xc_trace.h"

#ifndef max
#define max(a, b) ((a) < (b) ? (b) : (a))


Loading…
Cancel
Save