#define ZEND_FAST_RET_TO_CATCH 1
#define ZEND_FAST_RET_TO_FINALLY 2
+ #define ZEND_FAST_CALL_FOR_CATCH 1
+ #define ZEND_FAST_CALL_FOR_FINALLY 2
+
+#define ZEND_ARRAY_ELEMENT_REF (1<<0)
+#define ZEND_ARRAY_NOT_PACKED (1<<1)
+#define ZEND_ARRAY_SIZE_SHIFT 2
+
END_EXTERN_C()
#define ZEND_CLONE_FUNC_NAME "__clone"
{
USE_OPLINE
- if (opline->extended_value &&
+ if ((opline->extended_value & ZEND_FAST_CALL_FOR_CATCH) &&
UNEXPECTED(EG(prev_exception) != NULL)) {
/* in case of unhandled exception jump to catch block instead of finally */
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
+ ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
ZEND_VM_CONTINUE();
}
- EX(fast_ret) = opline + 1;
+ EX(fast_ret) = opline;
EX(delayed_exception) = NULL;
ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
ZEND_VM_CONTINUE();
ZEND_VM_HANDLER(163, ZEND_FAST_RET, ANY, ANY)
{
if (EX(fast_ret)) {
- ZEND_VM_SET_OPCODE(EX(fast_ret));
+ ZEND_VM_SET_OPCODE(EX(fast_ret) + 1);
+ if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FOR_FINALLY)) {
- EX(fast_ret) = &EX(op_array)->opcodes[EX(fast_ret)->op2.opline_num];
++ EX(fast_ret) = &EX(func)->op_array.opcodes[EX(fast_ret)->op2.opline_num];
+ }
ZEND_VM_CONTINUE();
} else {
/* special case for unhandled exceptions */
{
USE_OPLINE
- if (opline->extended_value &&
+ if ((opline->extended_value & ZEND_FAST_CALL_FOR_CATCH) &&
UNEXPECTED(EG(prev_exception) != NULL)) {
/* in case of unhandled exception jump to catch block instead of finally */
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
+ ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
ZEND_VM_CONTINUE();
}
- EX(fast_ret) = opline + 1;
+ EX(fast_ret) = opline;
EX(delayed_exception) = NULL;
ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
ZEND_VM_CONTINUE();
static int ZEND_FASTCALL ZEND_FAST_RET_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
if (EX(fast_ret)) {
- ZEND_VM_SET_OPCODE(EX(fast_ret));
+ ZEND_VM_SET_OPCODE(EX(fast_ret) + 1);
+ if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FOR_FINALLY)) {
- EX(fast_ret) = &EX(op_array)->opcodes[EX(fast_ret)->op2.opline_num];
++ EX(fast_ret) = &EX(func)->op_array.opcodes[EX(fast_ret)->op2.opline_num];
+ }
ZEND_VM_CONTINUE();
} else {
/* special case for unhandled exceptions */
ssl_ctx_options |= SSL_OP_SINGLE_DH_USE;
}
- if (SUCCESS == php_stream_context_get_option(
- stream->context, "ssl", "single_ecdh_use", &val) &&
- zend_is_true(*val TSRMLS_CC)
- ) {
+ #ifdef HAVE_ECDH
- zend_is_true(val TSRMLS_CC)
- ) {
+ if (NULL != (val = php_stream_context_get_option(
+ stream->context, "ssl", "single_ecdh_use")) &&
++ zend_is_true(val TSRMLS_CC)) {
ssl_ctx_options |= SSL_OP_SINGLE_ECDH_USE;
}
+ #endif
SSL_CTX_set_options(ctx, ssl_ctx_options);