ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CLASS_FETCH|CONST|VAR, JMP_ADDR, NUM)
+ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CLASS_FETCH|CONST|VAR, ANY, NUM)
{
USE_OPLINE
zval *result;
zend_function *constructor;
zend_class_entry *ce;
+ zend_execute_data *call;
SAVE_OPLINE();
if (OP1_TYPE == IS_CONST) {
constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
if (constructor == NULL) {
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
+ /* If there are no arguments, skip over the DO_FCALL opcode. We check if the next
+ * opcode is DO_FCALL in case EXT instructions are used. */
+ if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+ }
+
+ /* Perform a dummy function call */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION, (zend_function *) &zend_pass_function,
+ opline->extended_value, NULL, NULL);
} else {
/* We are not handling overloaded classes right now */
- zend_execute_data *call = zend_vm_stack_push_call_frame(
+ call = zend_vm_stack_push_call_frame(
ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR,
constructor,
opline->extended_value,
ce,
Z_OBJ_P(result));
- call->prev_execute_data = EX(call);
- EX(call) = call;
Z_ADDREF_P(result);
-
- ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|THIS|CV, ANY)
zval *result;
zend_function *constructor;
zend_class_entry *ce;
+ zend_execute_data *call;
SAVE_OPLINE();
if (IS_CONST == IS_CONST) {
constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
if (constructor == NULL) {
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
+ /* If there are no arguments, skip over the DO_FCALL opcode. We check if the next
+ * opcode is DO_FCALL in case EXT instructions are used. */
+ if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+ }
+
+ /* Perform a dummy function call */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION, (zend_function *) &zend_pass_function,
+ opline->extended_value, NULL, NULL);
} else {
/* We are not handling overloaded classes right now */
- zend_execute_data *call = zend_vm_stack_push_call_frame(
+ call = zend_vm_stack_push_call_frame(
ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR,
constructor,
opline->extended_value,
ce,
Z_OBJ_P(result));
- call->prev_execute_data = EX(call);
- EX(call) = call;
Z_ADDREF_P(result);
-
- ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zval *result;
zend_function *constructor;
zend_class_entry *ce;
+ zend_execute_data *call;
SAVE_OPLINE();
if (IS_VAR == IS_CONST) {
constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
if (constructor == NULL) {
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
+ /* If there are no arguments, skip over the DO_FCALL opcode. We check if the next
+ * opcode is DO_FCALL in case EXT instructions are used. */
+ if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+ }
+
+ /* Perform a dummy function call */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION, (zend_function *) &zend_pass_function,
+ opline->extended_value, NULL, NULL);
} else {
/* We are not handling overloaded classes right now */
- zend_execute_data *call = zend_vm_stack_push_call_frame(
+ call = zend_vm_stack_push_call_frame(
ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR,
constructor,
opline->extended_value,
ce,
Z_OBJ_P(result));
- call->prev_execute_data = EX(call);
- EX(call) = call;
Z_ADDREF_P(result);
-
- ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zval *result;
zend_function *constructor;
zend_class_entry *ce;
+ zend_execute_data *call;
SAVE_OPLINE();
if (IS_UNUSED == IS_CONST) {
constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
if (constructor == NULL) {
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
+ /* If there are no arguments, skip over the DO_FCALL opcode. We check if the next
+ * opcode is DO_FCALL in case EXT instructions are used. */
+ if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+ }
+
+ /* Perform a dummy function call */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION, (zend_function *) &zend_pass_function,
+ opline->extended_value, NULL, NULL);
} else {
/* We are not handling overloaded classes right now */
- zend_execute_data *call = zend_vm_stack_push_call_frame(
+ call = zend_vm_stack_push_call_frame(
ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR,
constructor,
opline->extended_value,
ce,
Z_OBJ_P(result));
- call->prev_execute_data = EX(call);
- EX(call) = call;
Z_ADDREF_P(result);
-
- ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)