cvs: ZendEngine2 / zend_interfaces.c zend_vm_def.h

From: Date: Thu, 11 May 2006 21:11:54 +0000
Subject: cvs: ZendEngine2 / zend_interfaces.c zend_vm_def.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4867@lists.php.net to get a copy of this message
helly Thu May 11 21:11:54 2006 UTC Modified files: /ZendEngine2 zend_interfaces.c zend_vm_def.h Log: - Drop a few superflous if conditions http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_interfaces.c?r1=1.52&r2=1.53&diff_format=u Index: ZendEngine2/zend_interfaces.c diff -u ZendEngine2/zend_interfaces.c:1.52 ZendEngine2/zend_interfaces.c:1.53 --- ZendEngine2/zend_interfaces.c:1.52 Mon Apr 10 22:49:09 2006 +++ ZendEngine2/zend_interfaces.c Thu May 11 21:11:54 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_interfaces.c,v 1.52 2006/04/10 22:49:09 helly Exp $ */ +/* $Id: zend_interfaces.c,v 1.53 2006/05/11 21:11:54 helly Exp $ */ #include "zend.h" #include "zend_API.h" @@ -222,15 +222,14 @@ return HASH_KEY_IS_UNICODE; case IS_DOUBLE: + *int_key = (long)Z_DVAL_P(retval); + zval_ptr_dtor(&retval); + return HASH_KEY_IS_LONG; + case IS_RESOURCE: case IS_BOOL: - case IS_LONG: { - if (Z_TYPE_P(retval) == IS_DOUBLE) { - *int_key = (long)Z_DVAL_P(retval); - } else { - *int_key = Z_LVAL_P(retval); - } - } + case IS_LONG: + *int_key = (long)Z_LVAL_P(retval); zval_ptr_dtor(&retval); return HASH_KEY_IS_LONG; } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_vm_def.h?r1=1.111&r2=1.112&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.111 ZendEngine2/zend_vm_def.h:1.112 --- ZendEngine2/zend_vm_def.h:1.111 Fri May 5 08:04:55 2006 +++ ZendEngine2/zend_vm_def.h Thu May 11 21:11:54 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.111 2006/05/05 08:04:55 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.112 2006/05/11 21:11:54 helly Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -1572,8 +1572,8 @@ zend_free_op free_op1; add_char_to_string(&EX_T(opline->result.u.var).tmp_var, - GET_OP1_ZVAL_PTR(BP_VAR_NA), - &opline->op2.u.constant); + GET_OP1_ZVAL_PTR(BP_VAR_NA), + &opline->op2.u.constant); /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */ ZEND_VM_NEXT_OPCODE(); } @@ -1584,8 +1584,8 @@ zend_free_op free_op1; add_string_to_string(&EX_T(opline->result.u.var).tmp_var, - GET_OP1_ZVAL_PTR(BP_VAR_NA), - &opline->op2.u.constant); + GET_OP1_ZVAL_PTR(BP_VAR_NA), + &opline->op2.u.constant); /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */ ZEND_VM_NEXT_OPCODE(); } @@ -2894,8 +2894,8 @@ } } } - ex = ex->prev_execute_data; - } while (ex && ex->symbol_table == target_symbol_table); + ex = ex->prev_execute_data; + } while (ex && ex->symbol_table == target_symbol_table); } } @@ -2924,15 +2924,13 @@ switch (Z_TYPE_P(offset)) { case IS_DOUBLE: + index = (long) Z_DVAL_P(offset); + zend_hash_index_del(ht, index); + break; case IS_RESOURCE: case IS_BOOL: case IS_LONG: - if (Z_TYPE_P(offset) == IS_DOUBLE) { - index = (long) Z_DVAL_P(offset); - } else { - index = Z_LVAL_P(offset); - } - + index = Z_LVAL_P(offset); zend_hash_index_del(ht, index); break; case IS_STRING: @@ -3417,14 +3415,15 @@ switch (Z_TYPE_P(offset)) { case IS_DOUBLE: + index = (long) Z_DVAL_P(offset); + if (zend_hash_index_find(ht, index, (void **) &value) == SUCCESS) { + isset = 1; + } + break; case IS_RESOURCE: case IS_BOOL: case IS_LONG: - if (Z_TYPE_P(offset) == IS_DOUBLE) { - index = (long) Z_DVAL_P(offset); - } else { - index = Z_LVAL_P(offset); - } + index = Z_LVAL_P(offset); if (zend_hash_index_find(ht, index, (void **) &value) == SUCCESS) { isset = 1; }

« previous php.zend-engine.cvs (#4867) next »