]> granicus.if.org Git - php/commitdiff
Describe special meaning of IS_UNUSED oprerand
authorDmitry Stogov <dmitry@zend.com>
Thu, 10 Dec 2015 23:31:28 +0000 (02:31 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 10 Dec 2015 23:31:28 +0000 (02:31 +0300)
Zend/zend_vm_def.h
Zend/zend_vm_gen.php
Zend/zend_vm_opcodes.c
Zend/zend_vm_opcodes.h
ext/opcache/Optimizer/zend_dump.c

index ec9aa47d01340fd6b77f275aa2e3e31a8ae5ff9f..82829e5387a6356db7ff49007ab75a6fb7d73098 100644 (file)
@@ -872,7 +872,7 @@ ZEND_VM_HELPER(zend_binary_assign_op_helper, VAR|CV, CONST|TMPVAR|CV, binary_op_
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(23, ZEND_ASSIGN_ADD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(23, ZEND_ASSIGN_ADD, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -892,7 +892,7 @@ ZEND_VM_HANDLER(23, ZEND_ASSIGN_ADD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_
 #endif
 }
 
-ZEND_VM_HANDLER(24, ZEND_ASSIGN_SUB, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(24, ZEND_ASSIGN_SUB, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -912,7 +912,7 @@ ZEND_VM_HANDLER(24, ZEND_ASSIGN_SUB, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_
 #endif
 }
 
-ZEND_VM_HANDLER(25, ZEND_ASSIGN_MUL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(25, ZEND_ASSIGN_MUL, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -932,7 +932,7 @@ ZEND_VM_HANDLER(25, ZEND_ASSIGN_MUL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_
 #endif
 }
 
-ZEND_VM_HANDLER(26, ZEND_ASSIGN_DIV, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(26, ZEND_ASSIGN_DIV, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -952,7 +952,7 @@ ZEND_VM_HANDLER(26, ZEND_ASSIGN_DIV, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_
 #endif
 }
 
-ZEND_VM_HANDLER(27, ZEND_ASSIGN_MOD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(27, ZEND_ASSIGN_MOD, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -972,7 +972,7 @@ ZEND_VM_HANDLER(27, ZEND_ASSIGN_MOD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_
 #endif
 }
 
-ZEND_VM_HANDLER(28, ZEND_ASSIGN_SL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(28, ZEND_ASSIGN_SL, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -992,7 +992,7 @@ ZEND_VM_HANDLER(28, ZEND_ASSIGN_SL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_O
 #endif
 }
 
-ZEND_VM_HANDLER(29, ZEND_ASSIGN_SR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(29, ZEND_ASSIGN_SR, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -1012,7 +1012,7 @@ ZEND_VM_HANDLER(29, ZEND_ASSIGN_SR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_O
 #endif
 }
 
-ZEND_VM_HANDLER(30, ZEND_ASSIGN_CONCAT, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(30, ZEND_ASSIGN_CONCAT, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -1032,7 +1032,7 @@ ZEND_VM_HANDLER(30, ZEND_ASSIGN_CONCAT, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, D
 #endif
 }
 
-ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_OR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_OR, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -1052,7 +1052,7 @@ ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_OR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DI
 #endif
 }
 
-ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_AND, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_AND, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -1072,7 +1072,7 @@ ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_AND, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, D
 #endif
 }
 
-ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -1092,7 +1092,7 @@ ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, D
 #endif
 }
 
-ZEND_VM_HANDLER(167, ZEND_ASSIGN_POW, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, DIM_OBJ)
+ZEND_VM_HANDLER(167, ZEND_ASSIGN_POW, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ)
 {
 #if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
        USE_OPLINE
@@ -1183,12 +1183,12 @@ ZEND_VM_HELPER(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV,
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(132, ZEND_PRE_INC_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(132, ZEND_PRE_INC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_pre_incdec_property_helper, inc, 1);
 }
 
-ZEND_VM_HANDLER(133, ZEND_PRE_DEC_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(133, ZEND_PRE_DEC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_pre_incdec_property_helper, inc, 0);
 }
@@ -1260,12 +1260,12 @@ ZEND_VM_HELPER(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV,
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(134, ZEND_POST_INC_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(134, ZEND_POST_INC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_post_incdec_property_helper, inc, 1);
 }
 
-ZEND_VM_HANDLER(135, ZEND_POST_DEC_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(135, ZEND_POST_DEC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_post_incdec_property_helper, inc, 0);
 }
@@ -1701,22 +1701,22 @@ ZEND_VM_C_LABEL(fetch_static_prop_return):
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(173, ZEND_FETCH_STATIC_PROP_R, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(173, ZEND_FETCH_STATIC_PROP_R, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_R);
 }
 
-ZEND_VM_HANDLER(174, ZEND_FETCH_STATIC_PROP_W, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(174, ZEND_FETCH_STATIC_PROP_W, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_W);
 }
 
-ZEND_VM_HANDLER(175, ZEND_FETCH_STATIC_PROP_RW, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(175, ZEND_FETCH_STATIC_PROP_RW, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_RW);
 }
 
-ZEND_VM_HANDLER(177, ZEND_FETCH_STATIC_PROP_FUNC_ARG, CONST|TMPVAR|CV, UNUSED|CONST|VAR, NUM)
+ZEND_VM_HANDLER(177, ZEND_FETCH_STATIC_PROP_FUNC_ARG, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR, NUM)
 {
        USE_OPLINE
 
@@ -1727,12 +1727,12 @@ ZEND_VM_HANDLER(177, ZEND_FETCH_STATIC_PROP_FUNC_ARG, CONST|TMPVAR|CV, UNUSED|CO
        }
 }
 
-ZEND_VM_HANDLER(178, ZEND_FETCH_STATIC_PROP_UNSET, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(178, ZEND_FETCH_STATIC_PROP_UNSET, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_UNSET);
 }
 
-ZEND_VM_HANDLER(176, ZEND_FETCH_STATIC_PROP_IS, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(176, ZEND_FETCH_STATIC_PROP_IS, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
 {
        ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_IS);
 }
@@ -1751,7 +1751,7 @@ ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -1773,7 +1773,7 @@ ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMPVAR|UNUSED|CV)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(87, ZEND_FETCH_DIM_RW, VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(87, ZEND_FETCH_DIM_RW, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -1809,7 +1809,7 @@ ZEND_VM_HANDLER(90, ZEND_FETCH_DIM_IS, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|CV, NUM)
+ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV, NUM)
 {
        USE_OPLINE
        zval *container;
@@ -1874,7 +1874,7 @@ ZEND_VM_HANDLER(96, ZEND_FETCH_DIM_UNSET, VAR|CV, CONST|TMPVAR|CV)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        USE_OPLINE
        zend_free_op free_op1;
@@ -1947,7 +1947,7 @@ ZEND_VM_C_LABEL(fetch_obj_r_no_object):
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -1978,7 +1978,7 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMPVAR|CV)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -2008,7 +2008,7 @@ ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMPVAR|CV)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(91, ZEND_FETCH_OBJ_IS, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(91, ZEND_FETCH_OBJ_IS, CONST|TMPVAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        USE_OPLINE
        zend_free_op free_op1;
@@ -2081,7 +2081,7 @@ ZEND_VM_C_LABEL(fetch_obj_is_no_object):
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|CV, NUM)
+ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, NUM)
 {
        USE_OPLINE
        zval *container;
@@ -2123,7 +2123,7 @@ ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, CONST|TMP|VAR|UNUSED|CV, CONST|TMPV
        }
 }
 
-ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -2198,7 +2198,7 @@ ZEND_VM_C_LABEL(try_fetch_list):
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -2228,7 +2228,7 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
        ZEND_VM_NEXT_OPCODE_EX(1, 2);
 }
 
-ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV)
 {
        USE_OPLINE
        zend_free_op free_op1;
@@ -2970,7 +2970,7 @@ ZEND_VM_C_LABEL(try_class_name):
        }
 }
 
-ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV, NUM)
+ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, NUM)
 {
        USE_OPLINE
        zval *function_name;
@@ -3091,7 +3091,7 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CONST|VAR, CONST|TMPVAR|UNUSED|CV, NUM)
+ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR, CONST|TMPVAR|UNUSED|CONSTRUCTOR|CV, NUM)
 {
        USE_OPLINE
        zval *function_name;
@@ -4351,7 +4351,7 @@ ZEND_VM_HANDLER(117, ZEND_SEND_VAR, VAR|CV, NUM)
        ZEND_VM_NEXT_OPCODE();
 }
 
-ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR, NUM, NUM)
+ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR, NUM, SEND)
 {
        USE_OPLINE
        zend_free_op free_op1;
@@ -4980,7 +4980,7 @@ ZEND_VM_HANDLER(48, ZEND_CASE, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CONST|VAR, JMP_ADDR, NUM)
+ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CLASS_FETCH|CONST|VAR, JMP_ADDR, NUM)
 {
        USE_OPLINE
        zval object_zval;
@@ -5038,7 +5038,7 @@ ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CONST|VAR, JMP_ADDR, NUM)
        }
 }
 
-ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|CV, ANY)
+ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|THIS|CV, ANY)
 {
        USE_OPLINE
        zend_free_op free_op1;
@@ -5158,7 +5158,7 @@ ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, UNUSED, CONST, CONST_FETCH)
        ZEND_VM_NEXT_OPCODE();
 }
 
-ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED, CONST)
+ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CONST)
 {
        zend_class_entry *ce;
        zend_class_constant *c;
@@ -5240,7 +5240,7 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED, CONST)
        ZEND_VM_NEXT_OPCODE();
 }
 
-ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|CV, REF)
+ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV, REF)
 {
        USE_OPLINE
        zend_free_op free_op1;
@@ -5339,7 +5339,7 @@ ZEND_VM_C_LABEL(num_index):
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, ARRAY_INIT|REF)
+ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|NEXT|CV, ARRAY_INIT|REF)
 {
        zval *array;
        uint32_t size;
@@ -5656,7 +5656,7 @@ ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMPVAR|CV, UNUSED, VAR_FETCH|ISSET)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(179, ZEND_UNSET_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(179, ZEND_UNSET_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
 {
        USE_OPLINE
        zval tmp, *varname;
@@ -5710,7 +5710,7 @@ ZEND_VM_HANDLER(179, ZEND_UNSET_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -5809,7 +5809,7 @@ ZEND_VM_C_LABEL(num_index_dim):
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -6550,7 +6550,7 @@ ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED, VAR_FETCH|
        }
 }
 
-ZEND_VM_HANDLER(180, ZEND_ISSET_ISEMPTY_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CONST|VAR, ISSET)
+ZEND_VM_HANDLER(180, ZEND_ISSET_ISEMPTY_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR, ISSET)
 {
        USE_OPLINE
        zval *value;
@@ -6630,7 +6630,7 @@ ZEND_VM_C_LABEL(is_static_prop_return):
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(115, ZEND_ISSET_ISEMPTY_DIM_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV, ISSET)
+ZEND_VM_HANDLER(115, ZEND_ISSET_ISEMPTY_DIM_OBJ, CONST|TMPVAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, ISSET)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -6767,7 +6767,7 @@ ZEND_VM_C_LABEL(isset_dim_obj_exit):
        ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
 }
 
-ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV, ISSET)
+ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, ISSET)
 {
        USE_OPLINE
        zend_free_op free_op1, free_op2;
@@ -7131,7 +7131,7 @@ ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY, NUM)
        ZEND_VM_NEXT_OPCODE();
 }
 
-ZEND_VM_HANDLER(138, ZEND_INSTANCEOF, TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(138, ZEND_INSTANCEOF, TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
 {
        USE_OPLINE
        zend_free_op free_op1;
index 31104fd9757ceef3d2da20ccae1555fde3eb89cb..c82d59f2f94956b4f877fe5b6ad3282b2b2d5278 100644 (file)
@@ -63,6 +63,10 @@ $vm_op_flags = array(
        "ZEND_VM_OP1_JMP_ADDR"    => 0x20,
        "ZEND_VM_OP1_TRY_CATCH"   => 0x30,
        "ZEND_VM_OP1_LIVE_RANGE"  => 0x40,
+       "ZEND_VM_OP1_THIS"        => 0x50,
+       "ZEND_VM_OP1_NEXT"        => 0x60,
+       "ZEND_VM_OP1_CLASS_FETCH" => 0x70,
+       "ZEND_VM_OP1_CONSTRUCTOR" => 0x80,
 
        "ZEND_VM_OP2_SPEC"        => 1<<8,
        "ZEND_VM_OP2_CONST"       => 1<<9,
@@ -72,6 +76,10 @@ $vm_op_flags = array(
        "ZEND_VM_OP2_JMP_ADDR"    => 0x2000,
        "ZEND_VM_OP2_TRY_CATCH"   => 0x3000,
        "ZEND_VM_OP2_LIVE_RANGE"  => 0x4000,
+       "ZEND_VM_OP2_THIS"        => 0x5000,
+       "ZEND_VM_OP2_NEXT"        => 0x6000,
+       "ZEND_VM_OP2_CLASS_FETCH" => 0x7000,
+       "ZEND_VM_OP2_CONSTRUCTOR" => 0x8000,
 
        "ZEND_VM_EXT_VAR_FETCH"   => 1<<16,
        "ZEND_VM_EXT_ISSET"       => 1<<17,
@@ -90,6 +98,7 @@ $vm_op_flags = array(
        "ZEND_VM_EXT_FAST_CALL"   => 0x09000000,
        "ZEND_VM_EXT_FAST_RET"    => 0x0a000000,
        "ZEND_VM_EXT_SRC"         => 0x0b000000,
+       "ZEND_VM_EXT_SEND"        => 0x0c000000,
 );
 
 foreach ($vm_op_flags as $name => $val) {
@@ -108,6 +117,10 @@ $vm_op_decode = array(
        "JMP_ADDR"             => ZEND_VM_OP1_JMP_ADDR,
        "TRY_CATCH"            => ZEND_VM_OP1_TRY_CATCH,
        "LIVE_RANGE"           => ZEND_VM_OP1_LIVE_RANGE,
+       "THIS"                 => ZEND_VM_OP1_THIS,
+       "NEXT"                 => ZEND_VM_OP1_NEXT,
+       "CLASS_FETCH"          => ZEND_VM_OP1_CLASS_FETCH,
+       "CONSTRUCTOR"          => ZEND_VM_OP1_CONSTRUCTOR,
 );
 
 $vm_ext_decode = array(
@@ -127,6 +140,7 @@ $vm_ext_decode = array(
        "ARG_NUM"              => ZEND_VM_EXT_ARG_NUM,
        "REF"                  => ZEND_VM_EXT_REF,
        "SRC"                  => ZEND_VM_EXT_SRC,
+       "SEND"                 => ZEND_VM_EXT_SEND,
 );
 
 $vm_kind_name = array(
index 61edefe96b7bf880f9a6141f0a6289e6b434c7f2..d8952ecc4c6b22ba057e3ce6d955a3bf61392468 100644 (file)
@@ -230,17 +230,17 @@ static uint32_t zend_vm_opcodes_flags[182] = {
        0x00000707,
        0x07000003,
        0x00000003,
-       0x04000701,
-       0x04000701,
-       0x04000701,
-       0x04000701,
-       0x04000701,
-       0x04000701,
-       0x04000701,
-       0x04000701,
-       0x04000701,
-       0x04000701,
-       0x04000701,
+       0x04006751,
+       0x04006751,
+       0x04006751,
+       0x04006751,
+       0x04006751,
+       0x04006751,
+       0x04006751,
+       0x04006751,
+       0x04006751,
+       0x04006751,
+       0x04006751,
        0x00000001,
        0x00000001,
        0x00000001,
@@ -275,36 +275,36 @@ static uint32_t zend_vm_opcodes_flags[182] = {
        0x00001003,
        0x00001001,
        0x00001001,
-       0x01002003,
+       0x01002073,
        0x01000300,
        0x00004005,
-       0x00180703,
-       0x00100703,
+       0x00186703,
+       0x00106703,
        0x08000007,
        0x00030107,
-       0x00000701,
-       0x00000701,
+       0x00000751,
+       0x00000751,
        0x00002003,
        0x03000001,
        0x00000007,
        0x00010107,
        0x00000707,
-       0x00000703,
+       0x00000753,
        0x00010107,
-       0x00000701,
-       0x00000701,
+       0x00006701,
+       0x00000751,
        0x00010107,
-       0x00000701,
-       0x00000701,
+       0x00006701,
+       0x00000751,
        0x00010107,
        0x00000707,
-       0x00000707,
+       0x00000757,
        0x00050107,
-       0x01000703,
-       0x01000703,
+       0x01006703,
+       0x01000753,
        0x00010107,
        0x00000701,
-       0x00000701,
+       0x00000751,
        0x00000307,
        0x06000301,
        0x00000000,
@@ -313,16 +313,16 @@ static uint32_t zend_vm_opcodes_flags[182] = {
        0x00000000,
        0x00000000,
        0x01000000,
-       0x01001001,
+       0x0c001001,
        0x03000103,
        0x00000003,
        0x05000700,
-       0x00000007,
+       0x00000057,
        0x0b000003,
-       0x01000707,
-       0x01000703,
+       0x01000757,
+       0x01008773,
        0x00030107,
-       0x00020707,
+       0x00020757,
        0x00001003,
        0x00001001,
        0x01000703,
@@ -339,13 +339,13 @@ static uint32_t zend_vm_opcodes_flags[182] = {
        0x00000000,
        0x00000000,
        0x00000000,
-       0x00000701,
-       0x00000701,
-       0x00000701,
-       0x00000701,
-       0x00000701,
+       0x00000751,
+       0x00000751,
+       0x00000751,
+       0x00000751,
+       0x00000751,
        0x00000000,
-       0x00000305,
+       0x00007305,
        0x00000000,
        0x02000000,
        0x00000000,
@@ -354,8 +354,8 @@ static uint32_t zend_vm_opcodes_flags[182] = {
        0x00000300,
        0x02000000,
        0x00000000,
-       0x00000701,
-       0x00020707,
+       0x00006701,
+       0x00020757,
        0x00000000,
        0x00000000,
        0x00002000,
@@ -374,21 +374,21 @@ static uint32_t zend_vm_opcodes_flags[182] = {
        0x00000010,
        0x00000000,
        0x00000707,
-       0x04000701,
+       0x04006751,
        0x00000301,
        0x00002003,
        0x00000707,
        0x00000020,
        0x02000020,
-       0x00000307,
-       0x00000307,
-       0x00000307,
-       0x00000307,
-       0x01000307,
-       0x00000307,
-       0x00000307,
-       0x00020307,
-       0x00000303,
+       0x00007307,
+       0x00007307,
+       0x00007307,
+       0x00007307,
+       0x01007307,
+       0x00007307,
+       0x00007307,
+       0x00027307,
+       0x00000373,
 };
 
 ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) {
index 358afc6fe1d747c0b7bfc49c05f094769c14407c..760b18c31c999caddd4fd11e56528fa357ec2930 100644 (file)
 #define ZEND_VM_OP1_JMP_ADDR     0x00000020
 #define ZEND_VM_OP1_TRY_CATCH    0x00000030
 #define ZEND_VM_OP1_LIVE_RANGE   0x00000040
+#define ZEND_VM_OP1_THIS         0x00000050
+#define ZEND_VM_OP1_NEXT         0x00000060
+#define ZEND_VM_OP1_CLASS_FETCH  0x00000070
+#define ZEND_VM_OP1_CONSTRUCTOR  0x00000080
 #define ZEND_VM_OP2_SPEC         0x00000100
 #define ZEND_VM_OP2_CONST        0x00000200
 #define ZEND_VM_OP2_TMPVAR       0x00000400
 #define ZEND_VM_OP2_JMP_ADDR     0x00002000
 #define ZEND_VM_OP2_TRY_CATCH    0x00003000
 #define ZEND_VM_OP2_LIVE_RANGE   0x00004000
+#define ZEND_VM_OP2_THIS         0x00005000
+#define ZEND_VM_OP2_NEXT         0x00006000
+#define ZEND_VM_OP2_CLASS_FETCH  0x00007000
+#define ZEND_VM_OP2_CONSTRUCTOR  0x00008000
 #define ZEND_VM_EXT_VAR_FETCH    0x00010000
 #define ZEND_VM_EXT_ISSET        0x00020000
 #define ZEND_VM_EXT_ARG_NUM      0x00040000
@@ -61,6 +69,7 @@
 #define ZEND_VM_EXT_FAST_CALL    0x09000000
 #define ZEND_VM_EXT_FAST_RET     0x0a000000
 #define ZEND_VM_EXT_SRC          0x0b000000
+#define ZEND_VM_EXT_SEND         0x0c000000
 
 BEGIN_EXTERN_C()
 
index 24a164dda7c0a304673bbb2cf9d471c81619ac4d..8971fac0c778de922bad18393d4283c862ac146c 100644 (file)
@@ -51,6 +51,39 @@ static void zend_dump_const(const zval *zv)
        }
 }
 
+static void zend_dump_class_fetch_type(uint32_t fetch_type)
+{
+       switch (fetch_type & ZEND_FETCH_CLASS_MASK) {
+               case ZEND_FETCH_CLASS_SELF:
+                       fprintf(stderr, " (self)");
+                       break;
+               case ZEND_FETCH_CLASS_PARENT:
+                       fprintf(stderr, " (parent)");
+                       break;
+               case ZEND_FETCH_CLASS_STATIC:
+                       fprintf(stderr, " (static)");
+                       break;
+               case ZEND_FETCH_CLASS_AUTO:
+                       fprintf(stderr, " (auto)");
+                       break;
+               case ZEND_FETCH_CLASS_INTERFACE:
+                       fprintf(stderr, " (interface)");
+                       break;
+               case ZEND_FETCH_CLASS_TRAIT:
+                       fprintf(stderr, " (trait)");
+                       break;
+       }
+       if (fetch_type & ZEND_FETCH_CLASS_NO_AUTOLOAD) {
+                       fprintf(stderr, " (no-autolod)");
+       }
+       if (fetch_type & ZEND_FETCH_CLASS_SILENT) {
+                       fprintf(stderr, " (silent)");
+       }
+       if (fetch_type & ZEND_FETCH_CLASS_EXCEPTION) {
+                       fprintf(stderr, " (exception)");
+       }
+}
+
 static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *b, const zend_op *opline)
 {
        const char *name = zend_get_opcode_name(opline->opcode);
@@ -71,35 +104,7 @@ static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *
                        fprintf(stderr, " (obj)");
                }
        } else if (ZEND_VM_EXT_CLASS_FETCH == (flags & ZEND_VM_EXT_MASK)) {
-               switch (opline->extended_value & ZEND_FETCH_CLASS_MASK) {
-                       case ZEND_FETCH_CLASS_SELF:
-                               fprintf(stderr, " (self)");
-                               break;
-                       case ZEND_FETCH_CLASS_PARENT:
-                               fprintf(stderr, " (parent)");
-                               break;
-                       case ZEND_FETCH_CLASS_STATIC:
-                               fprintf(stderr, " (static)");
-                               break;
-                       case ZEND_FETCH_CLASS_AUTO:
-                               fprintf(stderr, " (auto)");
-                               break;
-                       case ZEND_FETCH_CLASS_INTERFACE:
-                               fprintf(stderr, " (interface)");
-                               break;
-                       case ZEND_FETCH_CLASS_TRAIT:
-                               fprintf(stderr, " (trait)");
-                               break;
-               }
-               if (opline->extended_value & ZEND_FETCH_CLASS_NO_AUTOLOAD) {
-                               fprintf(stderr, " (no-autolod)");
-               }
-               if (opline->extended_value & ZEND_FETCH_CLASS_SILENT) {
-                               fprintf(stderr, " (silent)");
-               }
-               if (opline->extended_value & ZEND_FETCH_CLASS_EXCEPTION) {
-                               fprintf(stderr, " (exception)");
-               }
+               zend_dump_class_fetch_type(opline->extended_value);
        } else if (ZEND_VM_EXT_CONST_FETCH == (flags & ZEND_VM_EXT_MASK)) {
                if (opline->extended_value & IS_CONSTANT_UNQUALIFIED) {
                                fprintf(stderr, " (unqualified)");
@@ -189,6 +194,19 @@ static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *
                } else if (opline->extended_value == ZEND_RETURNS_FUNCTION) {
                        fprintf(stderr, " (function)");
                }
+       } else if (ZEND_VM_EXT_SEND == (flags & ZEND_VM_EXT_MASK)) {
+               if (opline->extended_value & ZEND_ARG_SEND_BY_REF) {
+                       fprintf(stderr, " (ref)");
+               }
+               if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) {
+                       fprintf(stderr, " (compile-time)");
+               }
+               if (opline->extended_value & ZEND_ARG_SEND_FUNCTION) {
+                       fprintf(stderr, " (function)");
+               }
+               if (opline->extended_value & ZEND_ARG_SEND_SILENT) {
+                       fprintf(stderr, " (silent)");
+               }
        } else {
                if (ZEND_VM_EXT_VAR_FETCH & flags) {
                        switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
@@ -256,6 +274,14 @@ static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *
                fprintf(stderr, " V%u", EX_VAR_TO_NUM(opline->op1.var));
        } else if ( opline->op1_type == IS_TMP_VAR) {
                fprintf(stderr, " T%u", EX_VAR_TO_NUM(opline->op1.var));
+       } else if (ZEND_VM_OP1_THIS == (flags & ZEND_VM_OP1_MASK)) {
+               fprintf(stderr, " THIS");
+       } else if (ZEND_VM_OP1_NEXT == (flags & ZEND_VM_OP1_MASK)) {
+               fprintf(stderr, " NEXT");
+       } else if (ZEND_VM_OP1_CLASS_FETCH == (flags & ZEND_VM_OP1_MASK)) {
+               zend_dump_class_fetch_type(opline->op1.num);
+       } else if (ZEND_VM_OP1_CONSTRUCTOR == (flags & ZEND_VM_OP1_MASK)) {
+               fprintf(stderr, " CONSTRUCTOR");
        }
        if (ZEND_VM_OP2_JMP_ADDR == (flags & ZEND_VM_OP2_MASK)) {
                if (b) {
@@ -279,6 +305,14 @@ static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *
                fprintf(stderr, " V%u", EX_VAR_TO_NUM(opline->op2.var));
        } else if ( opline->op2_type == IS_TMP_VAR) {
                fprintf(stderr, " T%u", EX_VAR_TO_NUM(opline->op2.var));
+       } else if (ZEND_VM_OP2_THIS == (flags & ZEND_VM_OP2_MASK)) {
+               fprintf(stderr, " THIS");
+       } else if (ZEND_VM_OP2_NEXT == (flags & ZEND_VM_OP2_MASK)) {
+               fprintf(stderr, " NEXT");
+       } else if (ZEND_VM_OP2_CLASS_FETCH == (flags & ZEND_VM_OP2_MASK)) {
+               zend_dump_class_fetch_type(opline->op2.num);
+       } else if (ZEND_VM_OP2_CONSTRUCTOR == (flags & ZEND_VM_OP2_MASK)) {
+               fprintf(stderr, " CONSTRUCTOR");
        }
        if (ZEND_VM_EXT_JMP_ADDR == (flags & ZEND_VM_EXT_MASK)) {
                if (opline->opcode != ZEND_CATCH || !opline->result.num) {