cvs: ZendEngine2 / zend.h zend_ptr_stack.h zend_types.h zend_vm_def.h zend_vm_execute.h
"Arnaud Le Blanc" <[email protected]> Mon, 01 Jun 2009 15:07:28 -0000
| Newsgroups | gmane.comp.php.cvs.zend |
|---|---|
| Message-ID | <cvslbarnaud1243868848@cvsserver> |
lbarnaud Mon Jun 1 15:07:28 2009 UTC
Modified files:
/ZendEngine2 zend.h zend_ptr_stack.h zend_types.h zend_vm_def.h
zend_vm_execute.h
Log:
better fix for #48409 , #48428 , #48228
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.h?r1=1.368&r2=1.369&diff_format=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.368 ZendEngine2/zend.h:1.369
--- ZendEngine2/zend.h:1.368 Fri May 1 00:29:49 2009
+++ ZendEngine2/zend.h Mon Jun 1 15:07:27 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.368 2009/05/01 00:29:49 lbarnaud Exp $ */
+/* $Id: zend.h,v 1.369 2009/06/01 15:07:27 lbarnaud Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -193,6 +193,12 @@
# define ZEND_FASTCALL
#endif
+#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3400
+#else
+# define __restrict__
+#endif
+#define restrict __restrict__
+
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
# define ZEND_ALLOCA_MAX_SIZE (32 * 1024)
# define ALLOCA_FLAG(name) \
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ptr_stack.h?r1=1.29&r2=1.30&diff_format=u
Index: ZendEngine2/zend_ptr_stack.h
diff -u ZendEngine2/zend_ptr_stack.h:1.29 ZendEngine2/zend_ptr_stack.h:1.30
--- ZendEngine2/zend_ptr_stack.h:1.29 Wed Dec 31 11:12:29 2008
+++ ZendEngine2/zend_ptr_stack.h Mon Jun 1 15:07:27 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ptr_stack.h,v 1.29 2008/12/31 11:12:29 sebastian Exp $ */
+/* $Id: zend_ptr_stack.h,v 1.30 2009/06/01 15:07:27 lbarnaud Exp $ */
#ifndef ZEND_PTR_STACK_H
#define ZEND_PTR_STACK_H
@@ -81,7 +81,7 @@
#undef ZEND_PTR_STACK_NUM_ARGS
}
-static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c)
+static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, zend_alias *restrict a, zend_alias *restrict b, zend_alias *restrict c)
{
*a = *(--stack->top_element);
*b = *(--stack->top_element);
@@ -89,7 +89,7 @@
stack->top -= 3;
}
-static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b)
+static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, zend_alias *restrict a, zend_alias *restrict b)
{
*a = *(--stack->top_element);
*b = *(--stack->top_element);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_types.h?r1=1.14&r2=1.15&diff_format=u
Index: ZendEngine2/zend_types.h
diff -u ZendEngine2/zend_types.h:1.14 ZendEngine2/zend_types.h:1.15
--- ZendEngine2/zend_types.h:1.14 Wed Dec 31 11:12:29 2008
+++ ZendEngine2/zend_types.h Mon Jun 1 15:07:27 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_types.h,v 1.14 2008/12/31 11:12:29 sebastian Exp $ */
+/* $Id: zend_types.h,v 1.15 2009/06/01 15:07:27 lbarnaud Exp $ */
#ifndef ZEND_TYPES_H
#define ZEND_TYPES_H
@@ -50,6 +50,12 @@
typedef unsigned long zend_uintptr_t;
#endif
+#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3400
+typedef void* __attribute__((__may_alias__)) zend_alias;
+#else
+typedef void* zend_alias;
+#endif
+
typedef unsigned int zend_object_handle;
typedef struct _zend_object_handlers zend_object_handlers;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.265&r2=1.266&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.265 ZendEngine2/zend_vm_def.h:1.266
--- ZendEngine2/zend_vm_def.h:1.265 Sat May 30 16:30:39 2009
+++ ZendEngine2/zend_vm_def.h Mon Jun 1 15:07:27 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.265 2009/05/30 16:30:39 lbarnaud Exp $ */
+/* $Id: zend_vm_def.h,v 1.266 2009/06/01 15:07:27 lbarnaud Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -2362,9 +2362,7 @@
EG(called_scope) = EX(called_scope);
}
- EX(called_scope) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(current_object) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(fbc) = zend_ptr_stack_pop(&EG(arg_types_stack));
+ zend_ptr_stack_3_pop(&EG(arg_types_stack), (zend_alias*)&EX(called_scope), (zend_alias*)&EX(current_object), (zend_alias*)&EX(fbc));
EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
@@ -4490,8 +4488,7 @@
zval_ptr_dtor(&EX(object));
}
EX(called_scope) = DECODE_CTOR(EX(called_scope));
- EX(object) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(fbc) = zend_ptr_stack_pop(&EG(arg_types_stack));
+ zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
}
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.269&r2=1.270&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.269 ZendEngine2/zend_vm_execute.h:1.270
--- ZendEngine2/zend_vm_execute.h:1.269 Sat May 30 16:30:39 2009
+++ ZendEngine2/zend_vm_execute.h Mon Jun 1 15:07:27 2009
@@ -298,9 +298,7 @@
EG(called_scope) = EX(called_scope);
}
- EX(called_scope) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(current_object) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(fbc) = zend_ptr_stack_pop(&EG(arg_types_stack));
+ zend_ptr_stack_3_pop(&EG(arg_types_stack), (zend_alias*)&EX(called_scope), (zend_alias*)&EX(current_object), (zend_alias*)&EX(fbc));
EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
@@ -646,8 +644,7 @@
zval_ptr_dtor(&EX(object));
}
EX(called_scope) = DECODE_CTOR(EX(called_scope));
- EX(object) = zend_ptr_stack_pop(&EG(arg_types_stack));
- EX(fbc) = zend_ptr_stack_pop(&EG(arg_types_stack));
+ zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
}
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php