cvs: ZendEngine2(PHP_5_2) / zend_execute.h zend_ptr_stack.h zend_types.h zend_vm_def.h zend_vm_execute.h

[email protected] ("Arnaud Le Blanc") Fri, 05 Jun 2009 11:21:51 -0000
Newsgroups php.zend-engine.cvs
Message-ID <cvslbarnaud1244200911@cvsserver>
lbarnaud		Fri Jun  5 11:21:51 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /ZendEngine2	zend_execute.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_execute.h?r1=1.84.2.4.2.10&r2=1.84.2.4.2.11&diff_format=u
Index: ZendEngine2/zend_execute.h
diff -u ZendEngine2/zend_execute.h:1.84.2.4.2.10 ZendEngine2/zend_execute.h:1.84.2.4.2.11
--- ZendEngine2/zend_execute.h:1.84.2.4.2.10	Wed Dec 31 11:17:33 2008
+++ ZendEngine2/zend_execute.h	Fri Jun  5 11:21:47 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_execute.h,v 1.84.2.4.2.10 2008/12/31 11:17:33 sebastian Exp $ */
+/* $Id: zend_execute.h,v 1.84.2.4.2.11 2009/06/05 11:21:47 lbarnaud Exp $ */
 
 #ifndef ZEND_EXECUTE_H
 #define ZEND_EXECUTE_H
@@ -169,6 +169,27 @@
 	return SUCCESS;
 }
 
+static inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **object, zend_function **fbc)
+{
+	void *a, *b;
+
+	zend_ptr_stack_2_pop(stack, &a, &b);
+
+	*object = a;
+	*fbc = b;
+}
+
+static inline void zend_arg_types_stack_3_pop(zend_ptr_stack *stack, zend_class_entry **called_scope, zval **object, zend_function **fbc)
+{
+	void *a, *b, *c;
+
+	zend_ptr_stack_3_pop(stack, &a, &b, &c);
+
+	*called_scope = a;
+	*object = b;
+	*fbc = c;
+}
+
 void execute_new_code(TSRMLS_D);
 
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ptr_stack.h?r1=1.22.2.2.2.4&r2=1.22.2.2.2.5&diff_format=u
Index: ZendEngine2/zend_ptr_stack.h
diff -u ZendEngine2/zend_ptr_stack.h:1.22.2.2.2.4 ZendEngine2/zend_ptr_stack.h:1.22.2.2.2.5
--- ZendEngine2/zend_ptr_stack.h:1.22.2.2.2.4	Mon Jun  1 15:07:59 2009
+++ ZendEngine2/zend_ptr_stack.h	Fri Jun  5 11:21:47 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_ptr_stack.h,v 1.22.2.2.2.4 2009/06/01 15:07:59 lbarnaud Exp $ */
+/* $Id: zend_ptr_stack.h,v 1.22.2.2.2.5 2009/06/05 11:21:47 lbarnaud Exp $ */
 
 #ifndef ZEND_PTR_STACK_H
 #define ZEND_PTR_STACK_H
@@ -79,7 +79,7 @@
 #undef ZEND_PTR_STACK_NUM_ARGS
 }
 
-static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, zend_alias *restrict a, zend_alias *restrict b, zend_alias *restrict c)
+static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c)
 {
 	*a = *(--stack->top_element);
 	*b = *(--stack->top_element);
@@ -87,7 +87,7 @@
 	stack->top -= 3;
 }
 
-static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, zend_alias *restrict a, zend_alias *restrict b)
+static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b)
 {
 	*a = *(--stack->top_element);
 	*b = *(--stack->top_element);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_types.h?r1=1.6.2.2.2.6&r2=1.6.2.2.2.7&diff_format=u
Index: ZendEngine2/zend_types.h
diff -u ZendEngine2/zend_types.h:1.6.2.2.2.6 ZendEngine2/zend_types.h:1.6.2.2.2.7
--- ZendEngine2/zend_types.h:1.6.2.2.2.6	Mon Jun  1 15:07:59 2009
+++ ZendEngine2/zend_types.h	Fri Jun  5 11:21:47 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_types.h,v 1.6.2.2.2.6 2009/06/01 15:07:59 lbarnaud Exp $ */
+/* $Id: zend_types.h,v 1.6.2.2.2.7 2009/06/05 11:21:47 lbarnaud Exp $ */
 
 #ifndef ZEND_TYPES_H
 #define ZEND_TYPES_H
@@ -36,12 +36,6 @@
 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.59.2.29.2.69&r2=1.59.2.29.2.70&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.69 ZendEngine2/zend_vm_def.h:1.59.2.29.2.70
--- ZendEngine2/zend_vm_def.h:1.59.2.29.2.69	Mon Jun  1 15:07:59 2009
+++ ZendEngine2/zend_vm_def.h	Fri Jun  5 11:21:47 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_vm_def.h,v 1.59.2.29.2.69 2009/06/01 15:07:59 lbarnaud Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.29.2.70 2009/06/05 11:21:47 lbarnaud Exp $ */
 
 /* If you change this file, please regenerate the zend_vm_execute.h and
  * zend_vm_opcodes.h files by running:
@@ -2084,7 +2084,7 @@
 		EG(This) = current_this;
 		EG(scope) = current_scope;
 	}
-	zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
+	zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
 
 	zend_ptr_stack_clear_multiple(TSRMLS_C);
 
@@ -3856,7 +3856,7 @@
 			}
 			zval_ptr_dtor(&EX(object));
 		}
-		zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
+		zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &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.62.2.30.2.72&r2=1.62.2.30.2.73&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.72 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.73
--- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.72	Mon Jun  1 15:08:00 2009
+++ ZendEngine2/zend_vm_execute.h	Fri Jun  5 11:21:47 2009
@@ -302,7 +302,7 @@
 		EG(This) = current_this;
 		EG(scope) = current_scope;
 	}
-	zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
+	zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
 
 	zend_ptr_stack_clear_multiple(TSRMLS_C);
 
@@ -562,7 +562,7 @@
 			}
 			zval_ptr_dtor(&EX(object));
 		}
-		zend_ptr_stack_2_pop(&EG(arg_types_stack), (zend_alias*)&EX(object), (zend_alias*)&EX(fbc));
+		zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
 	}
 
 	for (i=0; i<EX(op_array)->last_brk_cont; i++) {