[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Commit:aa042d0c351056d4ee5ecc994cd596f7fbb427ea Author:Xinchen Hui larue...@php.net Tue, 6 Aug 2013 15:39:33 +0800 Parents: 6e505f496905529a7976f0873a69fc222fe2d617 a831499b4a1029118dc45375e62af42043110ade Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=aa042d0c351056d4ee5ecc994cd596f7fbb427ea Log: Merge branch 'PHP-5.4' into PHP-5.5 Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Commit:1e942dde24a8aff2ad4f7b7185e051cb019aa89d Author:Xinchen Hui larue...@php.net Fri, 2 Aug 2013 18:39:18 +0800 Parents: 1c32b97bc30ae9c3af138910ad8a05497dfb909c ce9169e360701ea3b1ab2366171c24d4de5e78e3 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1e942dde24a8aff2ad4f7b7185e051cb019aa89d Log: Merge branch 'PHP-5.4' into PHP-5.5 Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Commit:2c4f8234375d0847d7b690d314ea47db29dcbe47 Author:Xinchen Hui larue...@php.net Sun, 14 Jul 2013 11:53:56 +0800 Parents: efc89368ddcb094500adb3a8ad13559a581fd018 ebad5178c4ae0da124469b1432fb0e890f6147da Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2c4f8234375d0847d7b690d314ea47db29dcbe47 Log: Merge branch 'PHP-5.4' into PHP-5.5 Conflicts: Zend/zend_vm_def.h Zend/zend_vm_execute.h Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h Diff: diff --cc Zend/zend_vm_execute.h index 866502a,6e466e4..f7d7301 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@@ -1422,8 -1392,7 +1422,7 @@@ static int ZEND_FASTCALL ZEND_BRK_SPEC SAVE_OPLINE(); el = zend_brk_cont(Z_LVAL_P(opline-op2.zv), opline-op1.opline_num, - EX(op_array), EX_Ts() TSRMLS_CC); + EX(op_array), execute_data TSRMLS_CC); - ZEND_VM_JMP(EX(op_array)-opcodes + el-brk); } @@@ -1434,8 -1403,7 +1433,7 @@@ static int ZEND_FASTCALL ZEND_CONT_SPE SAVE_OPLINE(); el = zend_brk_cont(Z_LVAL_P(opline-op2.zv), opline-op1.opline_num, - EX(op_array), EX_Ts() TSRMLS_CC); + EX(op_array), execute_data TSRMLS_CC); - ZEND_VM_JMP(EX(op_array)-opcodes + el-cont); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_vm_def.h
Commit:162726241ccfa567b3867a10f1f7ec6fa365533c Author:Ard Biesheuvel ard.biesheu...@linaro.org Fri, 21 Jun 2013 11:26:37 +0200 Parents: c65d663aefd27e39006b9c20a665893aa5265ed4 8623562b02dd6759617ef78ddcb06bdfe7710329 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=162726241ccfa567b3867a10f1f7ec6fa365533c Log: Merge branch 'PHP-5.4' into PHP-5.5 Conflicts: Zend/zend_vm_def.h Changed paths: MM Zend/zend_vm_def.h Diff: diff --cc Zend/zend_vm_def.h index ca62dde,3d84a37..9986e20 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@@ -3295,8 -3267,7 +3295,7 @@@ ZEND_VM_HANDLER(50, ZEND_BRK, ANY, CONS SAVE_OPLINE(); el = zend_brk_cont(Z_LVAL_P(opline-op2.zv), opline-op1.opline_num, - EX(op_array), EX_Ts() TSRMLS_CC); + EX(op_array), execute_data TSRMLS_CC); - FREE_OP2(); ZEND_VM_JMP(EX(op_array)-opcodes + el-brk); } @@@ -3307,8 -3278,7 +3306,7 @@@ ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CON SAVE_OPLINE(); el = zend_brk_cont(Z_LVAL_P(opline-op2.zv), opline-op1.opline_num, - EX(op_array), EX_Ts() TSRMLS_CC); + EX(op_array), execute_data TSRMLS_CC); - FREE_OP2(); ZEND_VM_JMP(EX(op_array)-opcodes + el-cont); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Commit:f372e00332c06f0e659dd755ecf7ca8e920dee42 Author:Xinchen Hui larue...@php.net Sun, 9 Jun 2013 13:49:26 +0800 Parents: bccacb630858f28370acbf014c8514709e3d689a 3cc891bf3a27eb13a101da3391b75cfa77a117ae Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f372e00332c06f0e659dd755ecf7ca8e920dee42 Log: Merge branch 'PHP-5.4' into PHP-5.5 Conflicts: Zend/zend_vm_def.h Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h diff --cc Zend/zend_vm_def.h index 386641a,40e2e42..ca62dde --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@@ -1829,268 -1819,6 +1829,270 @@@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VA ZEND_VM_NEXT_OPCODE(); } +ZEND_VM_HELPER(zend_leave_helper, ANY, ANY) +{ + zend_bool nested = EX(nested); + zend_op_array *op_array = EX(op_array); + + EG(current_execute_data) = EX(prev_execute_data); + EG(opline_ptr) = NULL; + if (!EG(active_symbol_table)) { + i_free_compiled_variables(execute_data); + } + + zend_vm_stack_free((char*)execute_data - (ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array-T) TSRMLS_CC); + + if ((op_array-fn_flags ZEND_ACC_CLOSURE) op_array-prototype) { + zval_ptr_dtor((zval**)op_array-prototype); + } + + if (nested) { + execute_data = EG(current_execute_data); + } + if (nested) { + USE_OPLINE + + LOAD_REGS(); + LOAD_OPLINE(); + if (UNEXPECTED(opline-opcode == ZEND_INCLUDE_OR_EVAL)) { + + EX(function_state).function = (zend_function *) EX(op_array); + EX(function_state).arguments = NULL; + + EG(opline_ptr) = EX(opline); + EG(active_op_array) = EX(op_array); + EG(return_value_ptr_ptr) = EX(original_return_value); + destroy_op_array(op_array TSRMLS_CC); + efree(op_array); + if (UNEXPECTED(EG(exception) != NULL)) { + zend_throw_exception_internal(NULL TSRMLS_CC); + HANDLE_EXCEPTION_LEAVE(); + } + + ZEND_VM_INC_OPCODE(); + ZEND_VM_LEAVE(); + } else { + EG(opline_ptr) = EX(opline); + EG(active_op_array) = EX(op_array); + EG(return_value_ptr_ptr) = EX(original_return_value); + if (EG(active_symbol_table)) { + zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC); + } + EG(active_symbol_table) = EX(symbol_table); + + EX(function_state).function = (zend_function *) EX(op_array); + EX(function_state).arguments = NULL; + + if (EG(This)) { + if (UNEXPECTED(EG(exception) != NULL) EX(call)-is_ctor_call) { + if (EX(call)-is_ctor_result_used) { + Z_DELREF_P(EG(This)); + } + if (Z_REFCOUNT_P(EG(This)) == 1) { + zend_object_store_ctor_failed(EG(This) TSRMLS_CC); + } + } + zval_ptr_dtor(EG(This)); + } + EG(This) = EX(current_this); + EG(scope) = EX(current_scope); + EG(called_scope) = EX(current_called_scope); + + EX(call)--; + + zend_vm_stack_clear_multiple(1 TSRMLS_CC); + + if (UNEXPECTED(EG(exception) != NULL)) { + zend_throw_exception_internal(NULL TSRMLS_CC); + if (RETURN_VALUE_USED(opline) EX_T(opline-result.var).var.ptr) { + zval_ptr_dtor(EX_T(opline-result.var).var.ptr); + } + HANDLE_EXCEPTION_LEAVE(); + } + + ZEND_VM_INC_OPCODE(); + ZEND_VM_LEAVE(); + } + } + ZEND_VM_RETURN(); +} + +ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY) +{ + USE_OPLINE + zend_bool should_change_scope = 0; + zend_function *fbc = EX(function_state).function; + + SAVE_OPLINE(); + EX(object) = EX(call)-object; + if (UNEXPECTED((fbc-common.fn_flags (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) { + if (UNEXPECTED((fbc-common.fn_flags ZEND_ACC_ABSTRACT) != 0)) { +
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Commit:758b666c0ad6edb48274858d2e11c53460787b88 Author:Dmitry Stogov dmi...@zend.com Tue, 23 Apr 2013 23:59:00 +0400 Parents: 2005a15caa36bc7974959885f837b9a3ebb78380 43ab915b41bbb236ca0aa1966c946c9c36fa2a2b Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=758b666c0ad6edb48274858d2e11c53460787b88 Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function. Conflicts: Zend/zend_vm_def.h Zend/zend_vm_execute.h Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h Diff: diff --cc Zend/zend_vm_def.h index 42a9c74,eed65e3..386641a --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@@ -3168,7 -3140,9 +3168,9 @@@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR| ZEND_VM_NEXT_OPCODE(); } - if (EX(function_state).function-type == ZEND_INTERNAL_FUNCTION !ARG_SHOULD_BE_SENT_BY_REF(EX(call)-fbc, opline-op2.opline_num)) { + if (opline-extended_value == ZEND_DO_FCALL_BY_NAME + EX(function_state).function-type == ZEND_INTERNAL_FUNCTION - !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline-op2.opline_num)) { ++ !ARG_SHOULD_BE_SENT_BY_REF(EX(call)-fbc, opline-op2.opline_num)) { ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper); } diff --cc Zend/zend_vm_execute.h index 23c89d1,18b3f47..916a6ff --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@@ -13089,7 -11171,9 +13089,9 @@@ static int ZEND_FASTCALL ZEND_SEND_REF ZEND_VM_NEXT_OPCODE(); } - if (EX(function_state).function-type == ZEND_INTERNAL_FUNCTION !ARG_SHOULD_BE_SENT_BY_REF(EX(call)-fbc, opline-op2.opline_num)) { + if (opline-extended_value == ZEND_DO_FCALL_BY_NAME + EX(function_state).function-type == ZEND_INTERNAL_FUNCTION - !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline-op2.opline_num)) { ++ !ARG_SHOULD_BE_SENT_BY_REF(EX(call)-fbc, opline-op2.opline_num)) { return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } @@@ -30710,7 -27125,9 +30712,9 @@@ static int ZEND_FASTCALL ZEND_SEND_REF ZEND_VM_NEXT_OPCODE(); } - if (EX(function_state).function-type == ZEND_INTERNAL_FUNCTION !ARG_SHOULD_BE_SENT_BY_REF(EX(call)-fbc, opline-op2.opline_num)) { + if (opline-extended_value == ZEND_DO_FCALL_BY_NAME + EX(function_state).function-type == ZEND_INTERNAL_FUNCTION - !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline-op2.opline_num)) { ++ !ARG_SHOULD_BE_SENT_BY_REF(EX(call)-fbc, opline-op2.opline_num)) { return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Commit:96e5f5eb05af913f8a9b9297393f153c561bf51b Author:Dmitry Stogov dmi...@zend.com Mon, 25 Mar 2013 15:47:45 +0400 Parents: 6a7088fd187f071df47fa09c6e215c916bfd699c e9f996c00d5cb6448dac1457dd9dae320c16904f Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=96e5f5eb05af913f8a9b9297393f153c561bf51b Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Fixed bug #63914 (zend_do_fcall_common_helper_SPEC does not handle exceptions properly). (Jeff Welch) Conflicts: NEWS Zend/zend_vm_def.h Zend/zend_vm_execute.h Bugs: https://bugs.php.net/63914 Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h diff --cc Zend/zend_vm_def.h index 206a233,ffa94a1..31a5fac --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@@ -1829,266 -1819,6 +1829,268 @@@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VA ZEND_VM_NEXT_OPCODE(); } +ZEND_VM_HELPER(zend_leave_helper, ANY, ANY) +{ + zend_bool nested = EX(nested); + zend_op_array *op_array = EX(op_array); + + EG(current_execute_data) = EX(prev_execute_data); + EG(opline_ptr) = NULL; + if (!EG(active_symbol_table)) { + i_free_compiled_variables(execute_data); + } + + zend_vm_stack_free((char*)execute_data - (ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array-T) TSRMLS_CC); + + if ((op_array-fn_flags ZEND_ACC_CLOSURE) op_array-prototype) { + zval_ptr_dtor((zval**)op_array-prototype); + } + + if (nested) { + execute_data = EG(current_execute_data); + } + if (nested) { + USE_OPLINE + + LOAD_REGS(); + LOAD_OPLINE(); + if (UNEXPECTED(opline-opcode == ZEND_INCLUDE_OR_EVAL)) { + + EX(function_state).function = (zend_function *) EX(op_array); + EX(function_state).arguments = NULL; + + EG(opline_ptr) = EX(opline); + EG(active_op_array) = EX(op_array); + EG(return_value_ptr_ptr) = EX(original_return_value); + destroy_op_array(op_array TSRMLS_CC); + efree(op_array); + if (UNEXPECTED(EG(exception) != NULL)) { + zend_throw_exception_internal(NULL TSRMLS_CC); + HANDLE_EXCEPTION_LEAVE(); + } + + ZEND_VM_INC_OPCODE(); + ZEND_VM_LEAVE(); + } else { + EG(opline_ptr) = EX(opline); + EG(active_op_array) = EX(op_array); + EG(return_value_ptr_ptr) = EX(original_return_value); + if (EG(active_symbol_table)) { + zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC); + } + EG(active_symbol_table) = EX(symbol_table); + + EX(function_state).function = (zend_function *) EX(op_array); + EX(function_state).arguments = NULL; + + if (EG(This)) { + if (UNEXPECTED(EG(exception) != NULL) EX(call)-is_ctor_call) { + if (EX(call)-is_ctor_result_used) { + Z_DELREF_P(EG(This)); + } + if (Z_REFCOUNT_P(EG(This)) == 1) { + zend_object_store_ctor_failed(EG(This) TSRMLS_CC); + } + } + zval_ptr_dtor(EG(This)); + } + EG(This) = EX(current_this); + EG(scope) = EX(current_scope); + EG(called_scope) = EX(current_called_scope); + + EX(call)--; + + zend_vm_stack_clear_multiple(1 TSRMLS_CC); + + if (UNEXPECTED(EG(exception) != NULL)) { + zend_throw_exception_internal(NULL TSRMLS_CC); + if (RETURN_VALUE_USED(opline) EX_T(opline-result.var).var.ptr) { + zval_ptr_dtor(EX_T(opline-result.var).var.ptr); + } + HANDLE_EXCEPTION_LEAVE(); + } + + ZEND_VM_INC_OPCODE(); + ZEND_VM_LEAVE(); + } + } + ZEND_VM_RETURN(); +} + +ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY) +{ + USE_OPLINE + zend_bool should_change_scope = 0; + zend_function *fbc = EX(function_state).function; + + SAVE_OPLINE(); + EX(object) = EX(call)-object; +
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Commit:fc7b054c2d3aa0855c69b50dd7d386d558d6317e Author:Gustavo Lopes glo...@nebm.ist.utl.pt Wed, 23 Jan 2013 13:24:50 +0100 Parents: 95346c017c55e44a3e3d19945902a0275d3fafe4 b8b3bb08b22a28041f5c02b371a88f231ec510de Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fc7b054c2d3aa0855c69b50dd7d386d558d6317e Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Fix bug #64023 (__toString() SplFileInfo) Bugs: https://bugs.php.net/64023 Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h Diff: diff --cc Zend/zend_vm_execute.h index ab69ee2,97e5a8e..25ac1ea --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@@ -7414,24 -6434,12 +7402,12 @@@ static int ZEND_FASTCALL ZEND_ECHO_SPE zval *z; SAVE_OPLINE(); - z = _get_zval_ptr_tmp(opline-op1.var, EX_Ts(), free_op1 TSRMLS_CC); + z = _get_zval_ptr_tmp(opline-op1.var, execute_data, free_op1 TSRMLS_CC); - if (IS_TMP_VAR != IS_CONST - UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) - Z_OBJ_HT_P(z)-get_method != NULL) { - if (IS_TMP_VAR == IS_TMP_VAR) { - INIT_PZVAL(z); - } - if (zend_std_cast_object_tostring(z, z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - zend_print_variable(z_copy); - zval_dtor(z_copy); - } else { - zend_print_variable(z); - } - } else { - zend_print_variable(z); + if (IS_TMP_VAR == IS_TMP_VAR Z_TYPE_P(z) == IS_OBJECT) { + INIT_PZVAL(z); } + zend_print_variable(z); zval_dtor(free_op1.var); CHECK_EXCEPTION(); @@@ -12625,24 -10740,12 +12601,12 @@@ static int ZEND_FASTCALL ZEND_ECHO_SPE zval *z; SAVE_OPLINE(); - z = _get_zval_ptr_var(opline-op1.var, EX_Ts(), free_op1 TSRMLS_CC); + z = _get_zval_ptr_var(opline-op1.var, execute_data, free_op1 TSRMLS_CC); - if (IS_VAR != IS_CONST - UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) - Z_OBJ_HT_P(z)-get_method != NULL) { - if (IS_VAR == IS_TMP_VAR) { - INIT_PZVAL(z); - } - if (zend_std_cast_object_tostring(z, z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - zend_print_variable(z_copy); - zval_dtor(z_copy); - } else { - zend_print_variable(z); - } - } else { - zend_print_variable(z); + if (IS_VAR == IS_TMP_VAR Z_TYPE_P(z) == IS_OBJECT) { + INIT_PZVAL(z); } + zend_print_variable(z); if (free_op1.var) {zval_ptr_dtor(free_op1.var);}; CHECK_EXCEPTION(); @@@ -30217,24 -26708,12 +30181,12 @@@ static int ZEND_FASTCALL ZEND_ECHO_SPE zval *z; SAVE_OPLINE(); - z = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline-op1.var TSRMLS_CC); + z = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline-op1.var TSRMLS_CC); - if (IS_CV != IS_CONST - UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) - Z_OBJ_HT_P(z)-get_method != NULL) { - if (IS_CV == IS_TMP_VAR) { - INIT_PZVAL(z); - } - if (zend_std_cast_object_tostring(z, z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - zend_print_variable(z_copy); - zval_dtor(z_copy); - } else { - zend_print_variable(z); - } - } else { - zend_print_variable(z); + if (IS_CV == IS_TMP_VAR Z_TYPE_P(z) == IS_OBJECT) { + INIT_PZVAL(z); } + zend_print_variable(z); CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php