cvs: pear /PECL/apc Makefile.in apc_compile.c apc_optimizer.c apc_optimizer.h apc_pair.c apc_pair.h
| From: | George Schlossnagle | Date: | Sun, 22 Jun 2003 05:26:07 +0000 |
| Subject: | cvs: pear /PECL/apc Makefile.in apc_compile.c apc_optimizer.c apc_optimizer.h apc_pair.c apc_pair.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-282@lists.php.net to get a copy of this message | ||
gschlossnagle Sun Jun 22 01:26:07 2003 EDT
Added files:
/pear/PECL/apc apc_optimizer.c apc_optimizer.h apc_pair.c
apc_pair.h
Modified files:
/pear/PECL/apc Makefile.in apc_compile.c
Log:
integrated basic shell of optimizer. Currently only optimization of interpolated
strings (reversing the loss of the patch reverted from 4.3.0 -> 4.3.1), and post_in in
a void context. There is a problem withremoval of no-ops, so that has been temprarly
commented out.
Optimization is off by default. Set apc.optimization = 1 to activate.
Index: pear/PECL/apc/Makefile.in
diff -u pear/PECL/apc/Makefile.in:3.5 pear/PECL/apc/Makefile.in:3.6
--- pear/PECL/apc/Makefile.in:3.5 Thu Jun 19 15:41:20 2003
+++ pear/PECL/apc/Makefile.in Sun Jun 22 01:26:07 2003
@@ -1,5 +1,5 @@
#
-# $Id: Makefile.in,v 3.5 2003/06/19 19:41:20 rasmus Exp $
+# $Id: Makefile.in,v 3.6 2003/06/22 05:26:07 gschlossnagle Exp $
#
LTLIBRARY_NAME = libapc.la
@@ -13,8 +13,9 @@
apc_sma.c \
apc_stack.c \
apc_zend.c \
- php_apc.c \
- apc_mmap.c
+ apc_optimizer.c \
+ apc_pair.c \
+ php_apc.c
LTLIBRARY_SHARED_NAME = apc.la
LTLIBRARY_SHARED_LIBADD = $(APC_LIBADD)
Index: pear/PECL/apc/apc_compile.c
diff -u pear/PECL/apc/apc_compile.c:3.2 pear/PECL/apc/apc_compile.c:3.3
--- pear/PECL/apc/apc_compile.c:3.2 Sat Jun 14 12:32:50 2003
+++ pear/PECL/apc/apc_compile.c Sun Jun 22 01:26:07 2003
@@ -14,9 +14,10 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apc_compile.c,v 3.2 2003/06/14 16:32:50 rasmus Exp $ */
+/* $Id: apc_compile.c,v 3.3 2003/06/22 05:26:07 gschlossnagle Exp $ */
#include "apc_compile.h"
+#include "apc_globals.h"
#include "apc_zend.h"
typedef void* (*ht_copy_fun_t)(void*, void*, apc_malloc_t);
@@ -287,7 +288,7 @@
case ZEND_USER_FUNCTION:
case ZEND_EVAL_CODE:
CHECK(apc_copy_op_array(&dst->op_array,
-
&src->op_array/*apc_optimize_op_array(&src->op_array)*/,
+ &src->op_array,
allocate));
break;
@@ -481,8 +482,9 @@
if (!dst) {
CHECK(dst = (zend_op_array*) allocate(sizeof(src[0])));
}
-
- /* XXX apc_optimize_op_array(src); */
+ if(APCG(optimization)) {
+ apc_optimize_op_array(src);
+ }
/* start with a bitwise copy of the array */
memcpy(dst, src, sizeof(src[0]));
Index: pear/PECL/apc/apc_optimizer.c
+++ pear/PECL/apc/apc_optimizer.c
Index: pear/PECL/apc/apc_optimizer.h
+++ pear/PECL/apc/apc_optimizer.h
Index: pear/PECL/apc/apc_pair.c
+++ pear/PECL/apc/apc_pair.c
Index: pear/PECL/apc/apc_pair.h
+++ pear/PECL/apc/apc_pair.h