ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(23, ZEND_ASSIGN_ADD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(23, ZEND_ASSIGN_ADD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(24, ZEND_ASSIGN_SUB, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(24, ZEND_ASSIGN_SUB, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(25, ZEND_ASSIGN_MUL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(25, ZEND_ASSIGN_MUL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(26, ZEND_ASSIGN_DIV, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(26, ZEND_ASSIGN_DIV, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(27, ZEND_ASSIGN_MOD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(27, ZEND_ASSIGN_MOD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(28, ZEND_ASSIGN_SL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(28, ZEND_ASSIGN_SL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(29, ZEND_ASSIGN_SR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(29, ZEND_ASSIGN_SR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(30, ZEND_ASSIGN_CONCAT, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(30, ZEND_ASSIGN_CONCAT, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_OR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_OR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_AND, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_AND, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
#endif
}
-ZEND_VM_HANDLER(167, ZEND_ASSIGN_POW, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(167, ZEND_ASSIGN_POW, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(80, ZEND_FETCH_R, CONST|TMPVAR|CV, UNUSED)
+ZEND_VM_HANDLER(80, ZEND_FETCH_R, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_R);
}
-ZEND_VM_HANDLER(83, ZEND_FETCH_W, CONST|TMPVAR|CV, UNUSED)
+ZEND_VM_HANDLER(83, ZEND_FETCH_W, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_W);
}
-ZEND_VM_HANDLER(86, ZEND_FETCH_RW, CONST|TMPVAR|CV, UNUSED)
+ZEND_VM_HANDLER(86, ZEND_FETCH_RW, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_RW);
}
-ZEND_VM_HANDLER(92, ZEND_FETCH_FUNC_ARG, CONST|TMPVAR|CV, UNUSED)
+ZEND_VM_HANDLER(92, ZEND_FETCH_FUNC_ARG, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
{
USE_OPLINE
}
}
-ZEND_VM_HANDLER(95, ZEND_FETCH_UNSET, CONST|TMPVAR|CV, UNUSED)
+ZEND_VM_HANDLER(95, ZEND_FETCH_UNSET, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_UNSET);
}
-ZEND_VM_HANDLER(89, ZEND_FETCH_IS, CONST|TMPVAR|CV, UNUSED)
+ZEND_VM_HANDLER(89, ZEND_FETCH_IS, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_IS);
}
}
}
-ZEND_VM_HANDLER(42, ZEND_JMP, ANY, ANY)
+ZEND_VM_HANDLER(42, ZEND_JMP, ADDR, ANY)
{
USE_OPLINE
ZEND_VM_CONTINUE();
}
-ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, ADDR)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMPVAR|CV, ADDR)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(45, ZEND_JMPZNZ, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(45, ZEND_JMPZNZ, CONST|TMPVAR|CV, ADDR, REL_LINE)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(46, ZEND_JMPZ_EX, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(46, ZEND_JMPZ_EX, CONST|TMPVAR|CV, ADDR)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(47, ZEND_JMPNZ_EX, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(47, ZEND_JMPNZ_EX, CONST|TMPVAR|CV, ADDR)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(54, ZEND_ROPE_INIT, UNUSED, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(54, ZEND_ROPE_INIT, UNUSED, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op2;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(55, ZEND_ROPE_ADD, TMP, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(55, ZEND_ROPE_ADD, TMP, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op2;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(56, ZEND_ROPE_END, TMP, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(56, ZEND_ROPE_END, TMP, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op2;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(109, ZEND_FETCH_CLASS, ANY, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(109, ZEND_FETCH_CLASS, ANY, CONST|TMPVAR|UNUSED|CV, CLASS_FETCH)
{
USE_OPLINE
}
}
-ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zval *function_name;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CONST|VAR, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CONST|VAR, CONST|TMPVAR|UNUSED|CV, NUM)
{
USE_OPLINE
zval *function_name;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST)
+ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST, NUM)
{
USE_OPLINE
zend_function *fbc;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(128, ZEND_INIT_DYNAMIC_CALL, ANY, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(128, ZEND_INIT_DYNAMIC_CALL, ANY, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_function *fbc;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op2;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
+ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST, NUM)
{
USE_OPLINE
zval *func_name;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, ANY, CONST)
+ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, ANY, CONST, NUM)
{
USE_OPLINE
zend_free_op free_op2;
HANDLE_EXCEPTION();
}
-ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
+ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV, LINE)
{
USE_OPLINE
zend_class_entry *ce, *catch_ce;
}
}
-ZEND_VM_HANDLER(65, ZEND_SEND_VAL, CONST|TMP, ANY)
+ZEND_VM_HANDLER(65, ZEND_SEND_VAL, CONST|TMP, NUM)
{
USE_OPLINE
zval *value, *arg;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(116, ZEND_SEND_VAL_EX, CONST|TMP, ANY)
+ZEND_VM_HANDLER(116, ZEND_SEND_VAL_EX, CONST|TMP, NUM)
{
USE_OPLINE
zval *value, *arg;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(117, ZEND_SEND_VAR, VAR|CV, ANY)
+ZEND_VM_HANDLER(117, ZEND_SEND_VAR, VAR|CV, NUM)
{
USE_OPLINE
zval *varptr, *arg;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR, ANY)
+ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR, NUM)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
+ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(66, ZEND_SEND_VAR_EX, VAR|CV, ANY)
+ZEND_VM_HANDLER(66, ZEND_SEND_VAR_EX, VAR|CV, NUM)
{
USE_OPLINE
zval *varptr, *arg;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(120, ZEND_SEND_USER, VAR|CV, ANY)
+ZEND_VM_HANDLER(120, ZEND_SEND_USER, VAR|CV, NUM)
{
USE_OPLINE
zval *arg, *param;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(63, ZEND_RECV, ANY, ANY)
+ZEND_VM_HANDLER(63, ZEND_RECV, NUM, ANY)
{
USE_OPLINE
uint32_t arg_num = opline->op1.num;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
+ZEND_VM_HANDLER(64, ZEND_RECV_INIT, NUM, CONST)
{
USE_OPLINE
uint32_t arg_num;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(164, ZEND_RECV_VARIADIC, ANY, ANY)
+ZEND_VM_HANDLER(164, ZEND_RECV_VARIADIC, NUM, ANY)
{
USE_OPLINE
uint32_t arg_num = opline->op1.num;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CONST|VAR, ANY)
+ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CONST|VAR, ADDR, NUM)
{
USE_OPLINE
zval object_zval;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, UNUSED, CONST)
+ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, UNUSED, CONST, CONST_FETCH)
{
USE_OPLINE
zend_constant *c;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|CV, NUM)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, ARRAY_INIT)
{
zval *array;
uint32_t size;
}
}
-ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY, TYPE)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMPVAR|CV, ANY, EVAL)
{
USE_OPLINE
zend_op_array *new_op_array=NULL;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMPVAR|CV, UNUSED)
+ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
{
USE_OPLINE
zval tmp, *varname;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ADDR)
{
USE_OPLINE
zend_free_op free_op1;
}
}
-ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ADDR)
{
USE_OPLINE
zend_free_op free_op1;
}
}
-ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY)
+ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY, REL_LINE)
{
USE_OPLINE
zval *array;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY)
+ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY, REL_LINE)
{
USE_OPLINE
zval *array;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED)
+ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
{
USE_OPLINE
zval *value;
}
}
-ZEND_VM_HANDLER(180, ZEND_ISSET_ISEMPTY_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(180, ZEND_ISSET_ISEMPTY_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CONST|VAR, ISSET)
{
USE_OPLINE
zval *value;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(115, ZEND_ISSET_ISEMPTY_DIM_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(115, ZEND_ISSET_ISEMPTY_DIM_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV, ISSET)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV, ISSET)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(152, ZEND_JMP_SET, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(152, ZEND_JMP_SET, CONST|TMP|VAR|CV, ADDR)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(169, ZEND_COALESCE, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(169, ZEND_COALESCE, CONST|TMP|VAR|CV, ADDR)
{
USE_OPLINE
zend_free_op free_op1;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(140, ZEND_DECLARE_INHERITED_CLASS, ANY, ANY)
+ZEND_VM_HANDLER(140, ZEND_DECLARE_INHERITED_CLASS, ANY, ANY, VAR)
{
USE_OPLINE
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(145, ZEND_DECLARE_INHERITED_CLASS_DELAYED, ANY, ANY)
+ZEND_VM_HANDLER(145, ZEND_DECLARE_INHERITED_CLASS_DELAYED, ANY, ANY, VAR)
{
USE_OPLINE
zval *zce, *orig_zce;
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(171, ZEND_DECLARE_ANON_CLASS, ANY, ANY)
+ZEND_VM_HANDLER(171, ZEND_DECLARE_ANON_CLASS, ADDR, ANY)
{
zend_class_entry *ce;
USE_OPLINE
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(172, ZEND_DECLARE_ANON_INHERITED_CLASS, ANY, ANY)
+ZEND_VM_HANDLER(172, ZEND_DECLARE_ANON_INHERITED_CLASS, ADDR, ANY, VAR)
{
zend_class_entry *ce;
USE_OPLINE
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY)
+ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY, NUM)
{
USE_OPLINE
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(162, ZEND_FAST_CALL, ANY, ANY)
+ZEND_VM_HANDLER(162, ZEND_FAST_CALL, ADDR, LINE, FCALL)
{
USE_OPLINE
zval *fast_call = EX_VAR(opline->result.var);
ZEND_VM_CONTINUE();
}
-ZEND_VM_HANDLER(163, ZEND_FAST_RET, ANY, ANY)
+ZEND_VM_HANDLER(163, ZEND_FAST_RET, ANY, LINE, FRET)
{
USE_OPLINE
zval *fast_call = EX_VAR(opline->op1.var);
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(123, ZEND_TYPE_CHECK, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(123, ZEND_TYPE_CHECK, CONST|TMP|VAR|CV, ANY, TYPE)
{
USE_OPLINE
zval *value;
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(151, ZEND_ASSERT_CHECK, ANY, ANY)
+ZEND_VM_HANDLER(151, ZEND_ASSERT_CHECK, ANY, ADDR)
{
USE_OPLINE
}
}
-ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, ANY, ANY)
+ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, ANY, ANY, CLASS_FETCH)
{
uint32_t fetch_type;
USE_OPLINE
define("ZEND_VM_KIND_SWITCH", 2);
define("ZEND_VM_KIND_GOTO", 3);
+$vm_op_flags = array(
+ "ZEND_VM_OP1_SPEC" => 1<<0,
+ "ZEND_VM_OP1_CONST" => 1<<1,
+ "ZEND_VM_OP1_TMPVAR" => 1<<2,
+ "ZEND_VM_OP1_NUM" => 1<<3,
+ "ZEND_VM_OP1_ADDR" => 1<<4,
+ "ZEND_VM_OP1_LINE" => 1<<5,
+
+ "ZEND_VM_OP2_SPEC" => 1<<8,
+ "ZEND_VM_OP2_CONST" => 1<<9,
+ "ZEND_VM_OP2_TMPVAR" => 1<<10,
+ "ZEND_VM_OP2_NUM" => 1<<11,
+ "ZEND_VM_OP2_ADDR" => 1<<12,
+ "ZEND_VM_OP2_LINE" => 1<<13,
+
+ "ZEND_VM_EXT_NUM" => 1<<16,
+ "ZEND_VM_EXT_VAR" => 1<<17,
+ "ZEND_VM_EXT_LINE" => 1<<18,
+ "ZEND_VM_EXT_REL_LINE" => 1<<19,
+ "ZEND_VM_EXT_DIM_OBJ" => 1<<20,
+ "ZEND_VM_EXT_CLASS_FETCH" => 1<<21,
+ "ZEND_VM_EXT_CONST_FETCH" => 1<<22,
+ "ZEND_VM_EXT_VAR_FETCH" => 1<<23,
+ "ZEND_VM_EXT_ARRAY_INIT" => 1<<24,
+ "ZEND_VM_EXT_TYPE" => 1<<25,
+ "ZEND_VM_EXT_EVAL" => 1<<26,
+ "ZEND_VM_EXT_FCALL" => 1<<27,
+ "ZEND_VM_EXT_FRET" => 1<<28,
+ "ZEND_VM_EXT_ISSET" => 1<<29,
+);
+
+foreach ($vm_op_flags as $name => $val) {
+ define($name, $val);
+}
+
+$vm_op_decode = array(
+ "ANY" => 0,
+ "CONST" => ZEND_VM_OP1_SPEC | ZEND_VM_OP1_CONST,
+ "TMP" => ZEND_VM_OP1_SPEC,
+ "VAR" => ZEND_VM_OP1_SPEC,
+ "UNUSED" => ZEND_VM_OP1_SPEC,
+ "CV" => ZEND_VM_OP1_SPEC,
+ "TMPVAR" => ZEND_VM_OP1_SPEC | ZEND_VM_OP1_TMPVAR,
+ "NUM" => ZEND_VM_OP1_NUM,
+ "ADDR" => ZEND_VM_OP1_ADDR,
+ "LINE" => ZEND_VM_OP1_LINE,
+);
+
+$vm_ext_decode = array(
+ "NUM" => ZEND_VM_EXT_NUM,
+ "VAR" => ZEND_VM_EXT_VAR,
+ "LINE" => ZEND_VM_EXT_LINE,
+ "REL_LINE" => ZEND_VM_EXT_REL_LINE,
+ "DIM_OBJ" => ZEND_VM_EXT_DIM_OBJ,
+ "CLASS_FETCH" => ZEND_VM_EXT_CLASS_FETCH,
+ "CONST_FETCH" => ZEND_VM_EXT_CONST_FETCH,
+ "VAR_FETCH" => ZEND_VM_EXT_VAR_FETCH,
+ "ARRAY_INIT" => ZEND_VM_EXT_ARRAY_INIT,
+ "TYPE" => ZEND_VM_EXT_TYPE,
+ "EVAL" => ZEND_VM_EXT_EVAL,
+ "FCALL" => ZEND_VM_EXT_FCALL,
+ "FRET" => ZEND_VM_EXT_FRET,
+ "ISSET" => ZEND_VM_EXT_ISSET,
+);
+
$vm_kind_name = array(
ZEND_VM_KIND_CALL => "ZEND_VM_KIND_CALL",
ZEND_VM_KIND_SWITCH => "ZEND_VM_KIND_SWITCH",
}
}
+function parse_operand_spec($def, $lineno, $str, &$flags) {
+ global $vm_op_decode;
+
+ $flags = 0;
+ $a = explode("|",$str);
+ foreach($a as $val) {
+ if (isset($vm_op_decode[$val])) {
+ $flags |= $vm_op_decode[$val];
+ } else {
+ die("ERROR ($def:$lineno): Wrong operand type '$str'\n");
+ }
+ }
+ if (!($flags & ZEND_VM_OP1_SPEC)) {
+ if (count($a) != 1) {
+ die("ERROR ($def:$lineno): Wrong operand type '$str'\n");
+ }
+ $a = array("ANY");
+ }
+ return array_flip($a);
+}
+
+function parse_ext_spec($def, $lineno, $str) {
+ global $vm_ext_decode;
+
+ if (isset($vm_ext_decode[$str])) {
+ return $vm_ext_decode[$str];
+ } else {
+ die("ERROR ($def:$lineno): Wrong extended_value type '$str'\n");
+ }
+}
+
function gen_vm($def, $skel) {
global $definition_file, $skeleton_file, $executor_file,
- $op_types, $list, $opcodes, $helpers, $params, $opnames;
+ $op_types, $list, $opcodes, $helpers, $params, $opnames,
+ $vm_op_flags;
// Load definition file
$in = @file($def);
if (strpos($line,"ZEND_VM_HANDLER(") === 0) {
// Parsing opcode handler's definition
if (preg_match(
- "/^ZEND_VM_HANDLER\(\s*([0-9]+)\s*,\s*([A-Z_]+)\s*,\s*([A-Z|]+)\s*,\s*([A-Z|]+)\s*\)/",
+ "/^ZEND_VM_HANDLER\(\s*([0-9]+)\s*,\s*([A-Z_]+)\s*,\s*([A-Z|]+)\s*,\s*([A-Z|]+)\s*(,\s*([A-Z_|]+)\s*)?\)/",
$line,
$m) == 0) {
die("ERROR ($def:$lineno): Invalid ZEND_VM_HANDLER definition.\n");
$code = (int)$m[1];
$op = $m[2];
$len = strlen($op);
- $op1 = array_flip(explode("|",$m[3]));
- $op2 = array_flip(explode("|",$m[4]));
+ $op1 = parse_operand_spec($def, $lineno, $m[3], $flags1);
+ $op2 = parse_operand_spec($def, $lineno, $m[4], $flags2);
+ $flags = $flags1 | ($flags2 << 8);
+ if (isset($m[6])) {
+ $flags |= parse_ext_spec($def, $lineno, $m[6]);
+ }
if ($len > $max_opcode_len) {
$max_opcode_len = $len;
if (isset($opnames[$op])) {
die("ERROR ($def:$lineno): Opcode with name '$op' is already defined.\n");
}
- $opcodes[$code] = array("op"=>$op,"op1"=>$op1,"op2"=>$op2,"code"=>"");
+ $opcodes[$code] = array("op"=>$op,"op1"=>$op1,"op2"=>$op2,"code"=>"","flags"=>$flags);
$opnames[$op] = $code;
$handler = $code;
$helper = null;
die("ERROR ($def:$lineno): Invalid ZEND_VM_HELPER definition.\n");
}
$helper = $m[1];
- $op1 = array_flip(explode("|",$m[2]));
- $op2 = array_flip(explode("|",$m[3]));
+ $op1 = parse_operand_spec($def, $lineno, $m[2], $flags1);
+ $op2 = parse_operand_spec($def, $lineno, $m[3], $flags2);
if (isset($helpers[$helper])) {
die("ERROR ($def:$lineno): Helper with name '$helper' is already defined.\n");
}
die("ERROR ($def:$lineno): Invalid ZEND_VM_HELPER definition.\n");
}
$helper = $m[1];
- $op1 = array_flip(explode("|",$m[2]));
- $op2 = array_flip(explode("|",$m[3]));
+ $op1 = parse_operand_spec($def, $lineno, $m[2], $flags1);
+ $op2 = parse_operand_spec($def, $lineno, $m[3], $flags2);
$param = $m[4];
if (isset($helpers[$helper])) {
die("ERROR ($def:$lineno): Helper with name '$helper' is already defined.\n");
fputs($f, "#define ZEND_VM_KIND_GOTO\t" . ZEND_VM_KIND_GOTO . "\n");
fputs($f, "#define ZEND_VM_KIND\t\t" . $GLOBALS["vm_kind_name"][ZEND_VM_KIND] . "\n");
fputs($f, "\n");
+ foreach($vm_op_flags as $name => $val) {
+ fprintf($f, "#define %-24s 0x%08x\n", $name, $val);
+ }
+ fputs($f, "\n");
fputs($f, "BEGIN_EXTERN_C()\n\n");
- fputs($f, "ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);\n\n");
+ fputs($f, "ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);\n");
+ fputs($f, "ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode);\n\n");
fputs($f, "END_EXTERN_C()\n\n");
foreach ($opcodes as $code => $dsc) {
fputs($f,"#include <stdio.h>\n");
fputs($f,"#include <zend.h>\n\n");
- fputs($f,"const char *zend_vm_opcodes_map[".($max_opcode + 1)."] = {\n");
+ fputs($f,"static const char *zend_vm_opcodes_names[".($max_opcode + 1)."] = {\n");
for ($i = 0; $i <= $max_opcode; $i++) {
fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n");
}
fputs($f, "};\n\n");
+ fputs($f,"static uint32_t zend_vm_opcodes_flags[".($max_opcode + 1)."] = {\n");
+ for ($i = 0; $i <= $max_opcode; $i++) {
+ fprintf($f, "\t0x%08x,\n", isset($opcodes[$i]["flags"]) ? $opcodes[$i]["flags"] : 0);
+ }
+ fputs($f, "};\n\n");
+
fputs($f, "ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) {\n");
- fputs($f, "\treturn zend_vm_opcodes_map[opcode];\n");
+ fputs($f, "\treturn zend_vm_opcodes_names[opcode];\n");
+ fputs($f, "}\n");
+
+ fputs($f, "ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode) {\n");
+ fputs($f, "\treturn zend_vm_opcodes_flags[opcode];\n");
fputs($f, "}\n");
fclose($f);