version 1.1.1.3, 2013/07/22 01:32:16
|
version 1.1.1.5, 2014/06/15 20:04:04
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Zend Engine | |
| Zend Engine | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) | | | Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 2.00 of the Zend license, | |
| This source file is subject to version 2.00 of the Zend license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 1166 ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, VAR|CV, CONST|TM
|
Line 1166 ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, VAR|CV, CONST|TM
|
{ |
{ |
USE_OPLINE |
USE_OPLINE |
zend_free_op free_op1, free_op2; |
zend_free_op free_op1, free_op2; |
zval **container; | zval *container; |
|
|
SAVE_OPLINE(); |
SAVE_OPLINE(); |
|
|
if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) && | if (OP1_TYPE == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { |
OP1_TYPE != IS_CV && | PZVAL_LOCK(EX_T(opline->op1.var).var.ptr); |
EX_T(opline->op1.var).var.ptr_ptr) { | |
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); | |
} |
} |
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R); | container = GET_OP1_ZVAL_PTR(BP_VAR_R); |
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC); |
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC); |
FREE_OP2(); |
FREE_OP2(); |
FREE_OP1_VAR_PTR(); | FREE_OP1(); |
CHECK_EXCEPTION(); |
CHECK_EXCEPTION(); |
ZEND_VM_NEXT_OPCODE(); |
ZEND_VM_NEXT_OPCODE(); |
} |
} |
Line 1243 ZEND_VM_HANDLER(90, ZEND_FETCH_DIM_IS, VAR|CV, CONST|T
|
Line 1241 ZEND_VM_HANDLER(90, ZEND_FETCH_DIM_IS, VAR|CV, CONST|T
|
{ |
{ |
USE_OPLINE |
USE_OPLINE |
zend_free_op free_op1, free_op2; |
zend_free_op free_op1, free_op2; |
zval **container; | zval *container; |
|
|
SAVE_OPLINE(); |
SAVE_OPLINE(); |
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_IS); | container = GET_OP1_ZVAL_PTR(BP_VAR_IS); |
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_IS TSRMLS_CC); |
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_IS TSRMLS_CC); |
FREE_OP2(); |
FREE_OP2(); |
FREE_OP1_VAR_PTR(); | FREE_OP1(); |
CHECK_EXCEPTION(); |
CHECK_EXCEPTION(); |
ZEND_VM_NEXT_OPCODE(); |
ZEND_VM_NEXT_OPCODE(); |
} |
} |
Line 1258 ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, C
|
Line 1256 ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, C
|
{ |
{ |
USE_OPLINE |
USE_OPLINE |
zend_free_op free_op1, free_op2; |
zend_free_op free_op1, free_op2; |
zval **container; |
|
|
|
SAVE_OPLINE(); |
SAVE_OPLINE(); |
|
|
if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) { |
if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) { |
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W); | zval **container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W); |
| |
if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) { |
if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) { |
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); |
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); |
} |
} |
Line 1271 ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, C
|
Line 1269 ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, C
|
if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) { |
if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) { |
EXTRACT_ZVAL_PTR(&EX_T(opline->result.var)); |
EXTRACT_ZVAL_PTR(&EX_T(opline->result.var)); |
} |
} |
|
FREE_OP2(); |
|
FREE_OP1_VAR_PTR(); |
} else { |
} else { |
|
zval *container; |
|
|
if (OP2_TYPE == IS_UNUSED) { |
if (OP2_TYPE == IS_UNUSED) { |
zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); |
zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); |
} |
} |
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R); | container = GET_OP1_ZVAL_PTR(BP_VAR_R); |
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC); |
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC); |
|
FREE_OP2(); |
|
FREE_OP1(); |
} |
} |
FREE_OP2(); |
|
FREE_OP1_VAR_PTR(); |
|
CHECK_EXCEPTION(); |
CHECK_EXCEPTION(); |
ZEND_VM_NEXT_OPCODE(); |
ZEND_VM_NEXT_OPCODE(); |
} |
} |
Line 2229 ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CON
|
Line 2231 ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CON
|
ce = CACHED_PTR(opline->op1.literal->cache_slot); |
ce = CACHED_PTR(opline->op1.literal->cache_slot); |
} else { |
} else { |
ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC); |
ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC); |
|
if (UNEXPECTED(EG(exception) != NULL)) { |
|
HANDLE_EXCEPTION(); |
|
} |
if (UNEXPECTED(ce == NULL)) { |
if (UNEXPECTED(ce == NULL)) { |
CHECK_EXCEPTION(); | zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv)); |
ZEND_VM_NEXT_OPCODE(); | |
} |
} |
CACHE_PTR(opline->op1.literal->cache_slot, ce); |
CACHE_PTR(opline->op1.literal->cache_slot, ce); |
} |
} |
Line 2414 ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONS
|
Line 2418 ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONS
|
|
|
if (Z_TYPE_PP(obj) == IS_STRING) { |
if (Z_TYPE_PP(obj) == IS_STRING) { |
ce = zend_fetch_class_by_name(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), NULL, 0 TSRMLS_CC); |
ce = zend_fetch_class_by_name(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), NULL, 0 TSRMLS_CC); |
|
if (UNEXPECTED(EG(exception) != NULL)) { |
|
HANDLE_EXCEPTION(); |
|
} |
if (UNEXPECTED(ce == NULL)) { |
if (UNEXPECTED(ce == NULL)) { |
CHECK_EXCEPTION(); | zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_PP(obj)); |
ZEND_VM_NEXT_OPCODE(); | |
} |
} |
EX(called_scope) = ce; |
EX(called_scope) = ce; |
EX(object) = NULL; |
EX(object) = NULL; |
Line 2906 ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR
|
Line 2912 ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR
|
} else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) { |
} else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) { |
zend_error(E_NOTICE, "Only variable references should be returned by reference"); |
zend_error(E_NOTICE, "Only variable references should be returned by reference"); |
if (EG(return_value_ptr_ptr)) { |
if (EG(return_value_ptr_ptr)) { |
retval_ptr = *retval_ptr_ptr; | zval *ret; |
*EG(return_value_ptr_ptr) = retval_ptr; | |
Z_ADDREF_P(retval_ptr); | ALLOC_ZVAL(ret); |
| INIT_PZVAL_COPY(ret, *retval_ptr_ptr); |
| zval_copy_ctor(ret); |
| *EG(return_value_ptr_ptr) = ret; |
} |
} |
break; |
break; |
} |
} |
Line 2977 ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
|
Line 2986 ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
|
|
|
#ifdef HAVE_DTRACE |
#ifdef HAVE_DTRACE |
if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) { |
if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) { |
DTRACE_EXCEPTION_CAUGHT(ce->name); | DTRACE_EXCEPTION_CAUGHT((char *)ce->name); |
} |
} |
#endif /* HAVE_DTRACE */ |
#endif /* HAVE_DTRACE */ |
|
|
Line 3268 ZEND_VM_HANDLER(50, ZEND_BRK, ANY, CONST)
|
Line 3277 ZEND_VM_HANDLER(50, ZEND_BRK, ANY, CONST)
|
SAVE_OPLINE(); |
SAVE_OPLINE(); |
el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num, |
el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num, |
EX(op_array), EX_Ts() TSRMLS_CC); |
EX(op_array), EX_Ts() TSRMLS_CC); |
FREE_OP2(); |
|
ZEND_VM_JMP(EX(op_array)->opcodes + el->brk); |
ZEND_VM_JMP(EX(op_array)->opcodes + el->brk); |
} |
} |
|
|
Line 3280 ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST)
|
Line 3288 ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST)
|
SAVE_OPLINE(); |
SAVE_OPLINE(); |
el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num, |
el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num, |
EX(op_array), EX_Ts() TSRMLS_CC); |
EX(op_array), EX_Ts() TSRMLS_CC); |
FREE_OP2(); |
|
ZEND_VM_JMP(EX(op_array)->opcodes + el->cont); |
ZEND_VM_JMP(EX(op_array)->opcodes + el->cont); |
} |
} |
|
|
Line 3500 ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, VAR|CONST|UNU
|
Line 3507 ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, VAR|CONST|UNU
|
ce = CACHED_PTR(opline->op1.literal->cache_slot); |
ce = CACHED_PTR(opline->op1.literal->cache_slot); |
} else { |
} else { |
ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC); |
ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC); |
|
if (UNEXPECTED(EG(exception) != NULL)) { |
|
HANDLE_EXCEPTION(); |
|
} |
if (UNEXPECTED(ce == NULL)) { |
if (UNEXPECTED(ce == NULL)) { |
CHECK_EXCEPTION(); | zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv)); |
ZEND_VM_NEXT_OPCODE(); | |
} |
} |
CACHE_PTR(opline->op1.literal->cache_slot, ce); |
CACHE_PTR(opline->op1.literal->cache_slot, ce); |
} |
} |
Line 3889 ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMP|VAR|CV,
|
Line 3898 ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMP|VAR|CV,
|
ce = CACHED_PTR(opline->op2.literal->cache_slot); |
ce = CACHED_PTR(opline->op2.literal->cache_slot); |
} else { |
} else { |
ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC); |
ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC); |
if (UNEXPECTED(ce == NULL)) { | if (UNEXPECTED(EG(exception) != NULL)) { |
if (OP1_TYPE != IS_CONST && varname == &tmp) { |
if (OP1_TYPE != IS_CONST && varname == &tmp) { |
zval_dtor(&tmp); |
zval_dtor(&tmp); |
} else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { |
} else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) { |
zval_ptr_dtor(&varname); |
zval_ptr_dtor(&varname); |
} |
} |
FREE_OP1(); |
FREE_OP1(); |
CHECK_EXCEPTION(); | HANDLE_EXCEPTION(); |
ZEND_VM_NEXT_OPCODE(); | } |
| if (UNEXPECTED(ce == NULL)) { |
| zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv)); |
} |
} |
CACHE_PTR(opline->op2.literal->cache_slot, ce); |
CACHE_PTR(opline->op2.literal->cache_slot, ce); |
} |
} |