Lines Matching refs:opcode
56 zend_uchar opcode; member
89 static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2);
667 info.opcode = free_opcode; in zend_begin_loop()
673 info.opcode = ZEND_NOP; in zend_begin_loop()
695 loop_var->opcode == ZEND_FE_FREE ? ZEND_LIVE_LOOP : ZEND_LIVE_TMPVAR, in zend_end_loop()
708 while (opline->opcode == ZEND_END_SILENCE) { in zend_do_free()
713 if (opline->opcode == ZEND_BOOL || opline->opcode == ZEND_BOOL_NOT) { in zend_do_free()
721 while (opline->opcode == ZEND_END_SILENCE || in zend_do_free()
722 opline->opcode == ZEND_EXT_FCALL_END || in zend_do_free()
723 opline->opcode == ZEND_OP_DATA) { in zend_do_free()
728 if (opline->opcode == ZEND_FETCH_THIS) { in zend_do_free()
729 opline->opcode = ZEND_NOP; in zend_do_free()
736 if ((opline->opcode == ZEND_FETCH_LIST_R || in zend_do_free()
737 opline->opcode == ZEND_FETCH_LIST_W) && in zend_do_free()
745 if (opline->opcode == ZEND_NEW) { in zend_do_free()
1168 while (opline->opcode == ZEND_TICKS && opline > CG(active_op_array)->opcodes) { in zend_do_early_binding()
1172 switch (opline->opcode) { in zend_do_early_binding()
1196 opline->opcode = ZEND_DECLARE_INHERITED_CLASS_DELAYED; in zend_do_early_binding()
1268 if (opline->opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED) { in zend_build_delayed_early_binding_list()
1603 opline->opcode = ZEND_EXT_STMT; in zend_do_extended_info()
1617 opline->opcode = ZEND_EXT_FCALL_BEGIN; in zend_do_extended_fcall_begin()
1631 opline->opcode = ZEND_EXT_FCALL_END; in zend_do_extended_fcall_end()
1910 zend_uchar factor = (opline->opcode == ZEND_FETCH_STATIC_PROP_R) ? 1 : 3; in zend_adjust_for_fetch_type()
1918 opline->opcode += 1 * factor; in zend_adjust_for_fetch_type()
1921 opline->opcode += 2 * factor; in zend_adjust_for_fetch_type()
1926 opline->opcode += 3 * factor; in zend_adjust_for_fetch_type()
1929 opline->opcode += 4 * factor; in zend_adjust_for_fetch_type()
1932 opline->opcode += 5 * factor; in zend_adjust_for_fetch_type()
1962 if (def->opcode == ZEND_ADD_ARRAY_ELEMENT || in zend_find_live_range()
1963 def->opcode == ZEND_ROPE_ADD) { in zend_find_live_range()
1966 } else if (def->opcode == ZEND_JMPZ_EX || in zend_find_live_range()
1967 def->opcode == ZEND_JMPNZ_EX || in zend_find_live_range()
1968 def->opcode == ZEND_BOOL || in zend_find_live_range()
1969 def->opcode == ZEND_BOOL_NOT) { in zend_find_live_range()
1972 } else if (def->opcode == ZEND_DECLARE_CLASS || in zend_find_live_range()
1973 def->opcode == ZEND_DECLARE_INHERITED_CLASS || in zend_find_live_range()
1974 def->opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED || in zend_find_live_range()
1975 def->opcode == ZEND_DECLARE_ANON_CLASS || in zend_find_live_range()
1976 def->opcode == ZEND_DECLARE_ANON_INHERITED_CLASS) { in zend_find_live_range()
1979 } else if (def->opcode == ZEND_FAST_CALL) { in zend_find_live_range()
1982 } else if (def->opcode == ZEND_NEW) { in zend_find_live_range()
1988 if (def->opcode == ZEND_DO_FCALL) { in zend_find_live_range()
1994 switch(def->opcode) { in zend_find_live_range()
2033 return opline->opcode != ZEND_ADD_ARRAY_ELEMENT && in zend_is_def_range()
2034 opline->opcode != ZEND_ROPE_ADD; in zend_is_def_range()
2035 } else if (opline->opcode == ZEND_OP_DATA) { in zend_is_def_range()
2038 } else if (opline->opcode == ZEND_END_SILENCE || in zend_is_def_range()
2039 opline->opcode == ZEND_NOP || in zend_is_def_range()
2040 opline->opcode == ZEND_EXT_NOP || in zend_is_def_range()
2041 opline->opcode == ZEND_EXT_STMT || in zend_is_def_range()
2042 opline->opcode == ZEND_EXT_FCALL_BEGIN || in zend_is_def_range()
2043 opline->opcode == ZEND_EXT_FCALL_END || in zend_is_def_range()
2044 opline->opcode == ZEND_TICKS) { in zend_is_def_range()
2058 if (opline->opcode == ZEND_OP_DATA) { in zend_check_live_ranges()
2062 } else if (opline->opcode == ZEND_INIT_STATIC_METHOD_CALL || in zend_check_live_ranges()
2063 opline->opcode == ZEND_NEW || in zend_check_live_ranges()
2064 opline->opcode == ZEND_FETCH_CLASS_CONSTANT || in zend_check_live_ranges()
2065 opline->opcode == ZEND_ADD_INTERFACE || in zend_check_live_ranges()
2066 opline->opcode == ZEND_ADD_TRAIT || in zend_check_live_ranges()
2067 opline->opcode == ZEND_BIND_TRAITS || in zend_check_live_ranges()
2068 opline->opcode == ZEND_VERIFY_ABSTRACT_CLASS) { in zend_check_live_ranges()
2070 } else if (opline->opcode == ZEND_FAST_RET) { in zend_check_live_ranges()
2072 } else if (opline->opcode == ZEND_CASE || in zend_check_live_ranges()
2073 opline->opcode == ZEND_SWITCH_LONG || in zend_check_live_ranges()
2074 opline->opcode == ZEND_SWITCH_STRING || in zend_check_live_ranges()
2075 opline->opcode == ZEND_FE_FETCH_R || in zend_check_live_ranges()
2076 opline->opcode == ZEND_FE_FETCH_RW || in zend_check_live_ranges()
2077 opline->opcode == ZEND_FE_FREE || in zend_check_live_ranges()
2078 opline->opcode == ZEND_ROPE_ADD || in zend_check_live_ranges()
2079 opline->opcode == ZEND_ROPE_END || in zend_check_live_ranges()
2080 opline->opcode == ZEND_END_SILENCE || in zend_check_live_ranges()
2081 opline->opcode == ZEND_FETCH_LIST_R || in zend_check_live_ranges()
2082 opline->opcode == ZEND_FETCH_LIST_W || in zend_check_live_ranges()
2083 opline->opcode == ZEND_VERIFY_RETURN_TYPE || in zend_check_live_ranges()
2084 opline->opcode == ZEND_BIND_LEXICAL) { in zend_check_live_ranges()
2094 if (opline->opcode == ZEND_OP_DATA) { in zend_check_live_ranges()
2098 } else if (opline->opcode == ZEND_FETCH_STATIC_PROP_R || in zend_check_live_ranges()
2099 opline->opcode == ZEND_FETCH_STATIC_PROP_W || in zend_check_live_ranges()
2100 opline->opcode == ZEND_FETCH_STATIC_PROP_RW || in zend_check_live_ranges()
2101 opline->opcode == ZEND_FETCH_STATIC_PROP_IS || in zend_check_live_ranges()
2102 opline->opcode == ZEND_FETCH_STATIC_PROP_FUNC_ARG || in zend_check_live_ranges()
2103 opline->opcode == ZEND_FETCH_STATIC_PROP_UNSET || in zend_check_live_ranges()
2104 opline->opcode == ZEND_UNSET_STATIC_PROP || in zend_check_live_ranges()
2105 opline->opcode == ZEND_ISSET_ISEMPTY_STATIC_PROP || in zend_check_live_ranges()
2106 opline->opcode == ZEND_INSTANCEOF) { in zend_check_live_ranges()
2115 static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2) /* {{{ */ in zend_emit_op() argument
2118 opline->opcode = opcode; in zend_emit_op()
2137 static zend_op *zend_emit_op_tmp(znode *result, zend_uchar opcode, znode *op1, znode *op2) /* {{{ */ in zend_emit_op_tmp() argument
2140 opline->opcode = opcode; in zend_emit_op_tmp()
2165 …array)->last && CG(active_op_array)->opcodes[CG(active_op_array)->last - 1].opcode == ZEND_TICKS) { in zend_emit_tick()
2171 opline->opcode = ZEND_TICKS; in zend_emit_tick()
2193 switch (opline->opcode) { in zend_is_smart_branch()
2217 static inline uint32_t zend_emit_cond_jump(zend_uchar opcode, znode *cond, uint32_t opnum_target) /… in zend_emit_cond_jump() argument
2229 opline = zend_emit_op(NULL, opcode, cond, NULL); in zend_emit_cond_jump()
2238 switch (opline->opcode) { in zend_update_jump_target()
2260 static inline zend_op *zend_delayed_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op… in zend_delayed_emit_op() argument
2266 tmp_opline.opcode = opcode; in zend_delayed_emit_op()
3007 opline->opcode = ZEND_ASSIGN_DIM; in zend_compile_assign()
3017 opline->opcode = ZEND_ASSIGN_OBJ; in zend_compile_assign()
3113 uint32_t opcode = ast->attr; in zend_compile_compound_assign() local
3128 zend_emit_op(result, opcode, &var_node, &expr_node); in zend_compile_compound_assign()
3136 opline->opcode = opcode; in zend_compile_compound_assign()
3148 opline->opcode = opcode; in zend_compile_compound_assign()
3172 zend_uchar opcode; in zend_compile_args() local
3196 opcode = ZEND_SEND_VAL; in zend_compile_args()
3200 opcode = ZEND_SEND_VAR_NO_REF; in zend_compile_args()
3202 opcode = ZEND_SEND_VAL; in zend_compile_args()
3204 opcode = ZEND_SEND_VAR; in zend_compile_args()
3207 opcode = ZEND_SEND_VAR_NO_REF_EX; in zend_compile_args()
3213 opcode = ZEND_SEND_REF; in zend_compile_args()
3216 opcode = (arg_node.op_type == IS_TMP_VAR) ? ZEND_SEND_VAL : ZEND_SEND_VAR; in zend_compile_args()
3224 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3227 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3234 opcode = ZEND_SEND_FUNC_ARG; in zend_compile_args()
3243 opcode = ZEND_SEND_VAR_NO_REF; in zend_compile_args()
3245 opcode = ZEND_SEND_VAL; in zend_compile_args()
3247 opcode = ZEND_SEND_VAR; in zend_compile_args()
3250 opcode = ZEND_SEND_VAR_NO_REF_EX; in zend_compile_args()
3255 opcode = ZEND_SEND_REF; in zend_compile_args()
3257 opcode = ZEND_SEND_VAR; in zend_compile_args()
3260 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3264 opcode = ZEND_SEND_VAL; in zend_compile_args()
3269 opcode = ZEND_SEND_VAL_EX; in zend_compile_args()
3274 opline = zend_emit_op(NULL, opcode, &arg_node, NULL); in zend_compile_args()
3287 if (init_op->opcode == ZEND_INIT_FCALL && !zend_execute_internal) { in zend_get_call_op()
3301 (init_op->opcode == ZEND_INIT_FCALL_BY_NAME || in zend_get_call_op()
3302 init_op->opcode == ZEND_INIT_NS_FCALL_BY_NAME)) { in zend_get_call_op()
3323 if (opline->opcode == ZEND_INIT_FCALL) { in zend_compile_call_common()
3327 call_flags = (opline->opcode == ZEND_NEW ? ZEND_CALL_CTOR : 0); in zend_compile_call_common()
3351 opline->opcode = ZEND_INIT_NS_FCALL_BY_NAME; in zend_compile_ns_call()
3371 opline->opcode = ZEND_INIT_STATIC_METHOD_CALL; in zend_compile_dynamic_call()
3382 opline->opcode = ZEND_INIT_FCALL_BY_NAME; in zend_compile_dynamic_call()
4134 opline->opcode = ZEND_INIT_STATIC_METHOD_CALL; in zend_compile_static_call()
4199 if (opline->opcode == ZEND_FETCH_CLASS) { in zend_compile_new()
4344 opline->opcode = ZEND_UNSET_VAR; in zend_compile_unset()
4349 opline->opcode = ZEND_UNSET_DIM; in zend_compile_unset()
4353 opline->opcode = ZEND_UNSET_OBJ; in zend_compile_unset()
4357 opline->opcode = ZEND_UNSET_STATIC_PROP; in zend_compile_unset()
4374 if (loop_var->opcode == ZEND_FAST_CALL) { in zend_handle_loops_and_finally_ex()
4377 opline->opcode = ZEND_FAST_CALL; in zend_handle_loops_and_finally_ex()
4384 } else if (loop_var->opcode == ZEND_DISCARD_EXCEPTION) { in zend_handle_loops_and_finally_ex()
4386 opline->opcode = ZEND_DISCARD_EXCEPTION; in zend_handle_loops_and_finally_ex()
4389 } else if (loop_var->opcode == ZEND_RETURN) { in zend_handle_loops_and_finally_ex()
4394 } else if (loop_var->opcode == ZEND_NOP) { in zend_handle_loops_and_finally_ex()
4402 opline->opcode = loop_var->opcode; in zend_handle_loops_and_finally_ex()
4429 if (loop_var->opcode == ZEND_FAST_CALL) { in zend_has_finally_ex()
4431 } else if (loop_var->opcode == ZEND_DISCARD_EXCEPTION) { in zend_has_finally_ex()
4432 } else if (loop_var->opcode == ZEND_RETURN) { in zend_has_finally_ex()
4641 opline->opcode = ZEND_JMP; in zend_resolve_goto_label()
5111 opline->opcode = ZEND_FREE; in zend_compile_switch()
5159 fast_call.opcode = ZEND_FAST_CALL; in zend_compile_try()
5202 opline->opcode = ZEND_CATCH; in zend_compile_try()
5256 discard_exception.opcode = ZEND_DISCARD_EXCEPTION; in zend_compile_try()
5546 zend_uchar opcode; in zend_compile_params() local
5570 opcode = ZEND_RECV_VARIADIC; in zend_compile_params()
5582 opcode = ZEND_RECV_INIT; in zend_compile_params()
5587 opcode = ZEND_RECV; in zend_compile_params()
5592 opline = zend_emit_op(NULL, opcode, NULL, &default_node); in zend_compile_params()
5674 if (opline->opcode == ZEND_RECV_INIT) { in zend_compile_params()
5687 if (opline->opcode != ZEND_RECV_INIT) { in zend_compile_params()
6002 opline->opcode = ZEND_DECLARE_FUNCTION; in zend_begin_func_decl()
6061 dummy_var.opcode = ZEND_RETURN; in zend_compile_func_decl()
6276 opline->opcode = ZEND_ADD_TRAIT; in zend_compile_use_trait()
6437 opline->opcode = ZEND_DECLARE_ANON_INHERITED_CLASS; in zend_compile_class_decl()
6441 opline->opcode = ZEND_DECLARE_ANON_CLASS; in zend_compile_class_decl()
6479 opline->opcode = ZEND_DECLARE_INHERITED_CLASS; in zend_compile_class_decl()
6483 opline->opcode = ZEND_DECLARE_CLASS; in zend_compile_class_decl()
6808 (CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT || in zend_compile_namespace()
6809 CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) { in zend_compile_namespace()
6960 ZEND_API zend_bool zend_binary_op_produces_numeric_string_error(uint32_t opcode, zval *op1, zval *o… in zend_binary_op_produces_numeric_string_error() argument
6962 if (!(opcode == ZEND_ADD || opcode == ZEND_SUB || opcode == ZEND_MUL || opcode == ZEND_DIV in zend_binary_op_produces_numeric_string_error()
6963 || opcode == ZEND_POW || opcode == ZEND_MOD || opcode == ZEND_SL || opcode == ZEND_SR in zend_binary_op_produces_numeric_string_error()
6964 || opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR)) { in zend_binary_op_produces_numeric_string_error()
6970 if ((opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR) in zend_binary_op_produces_numeric_string_error()
6989 static inline zend_bool zend_try_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *… in zend_try_ct_eval_binary_op() argument
6991 binary_op_type fn = get_binary_op(opcode); in zend_try_ct_eval_binary_op()
6994 if ((opcode == ZEND_DIV || opcode == ZEND_MOD) && in zend_try_ct_eval_binary_op()
6997 } else if ((opcode == ZEND_SL || opcode == ZEND_SR) && in zend_try_ct_eval_binary_op()
7003 if (zend_binary_op_produces_numeric_string_error(opcode, op1, op2)) { in zend_try_ct_eval_binary_op()
7012 static inline void zend_ct_eval_unary_op(zval *result, uint32_t opcode, zval *op) /* {{{ */ in zend_ct_eval_unary_op() argument
7014 unary_op_type fn = get_unary_op(opcode); in zend_ct_eval_unary_op()
7131 uint32_t opcode = ast->attr; in zend_compile_binary_op() local
7138 if (zend_try_ct_eval_binary_op(&result->u.constant, opcode, in zend_compile_binary_op()
7149 if (opcode == ZEND_IS_EQUAL || opcode == ZEND_IS_NOT_EQUAL) { in zend_compile_binary_op()
7152 opcode = (opcode == ZEND_IS_NOT_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
7153 zend_emit_op_tmp(result, opcode, &right_node, NULL); in zend_compile_binary_op()
7156 opcode = (opcode == ZEND_IS_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
7157 zend_emit_op_tmp(result, opcode, &right_node, NULL); in zend_compile_binary_op()
7162 opcode = (opcode == ZEND_IS_NOT_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
7163 zend_emit_op_tmp(result, opcode, &left_node, NULL); in zend_compile_binary_op()
7166 opcode = (opcode == ZEND_IS_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
7167 zend_emit_op_tmp(result, opcode, &left_node, NULL); in zend_compile_binary_op()
7172 if (opcode == ZEND_CONCAT) { in zend_compile_binary_op()
7181 opcode = ZEND_FAST_CONCAT; in zend_compile_binary_op()
7184 zend_emit_op_tmp(result, opcode, &left_node, &right_node); in zend_compile_binary_op()
7220 uint32_t opcode = ast->attr; in zend_compile_unary_op() local
7227 zend_ct_eval_unary_op(&result->u.constant, opcode, in zend_compile_unary_op()
7233 zend_emit_op_tmp(result, opcode, &expr_node, NULL); in zend_compile_unary_op()
7326 opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_OBJ : ZEND_POST_DEC_OBJ; in zend_compile_post_incdec()
7346 opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_OBJ : ZEND_PRE_DEC_OBJ; in zend_compile_pre_incdec()
7620 opline->opcode = ZEND_ISSET_ISEMPTY_VAR; in zend_compile_isset_or_empty()
7625 opline->opcode = ZEND_ISSET_ISEMPTY_DIM_OBJ; in zend_compile_isset_or_empty()
7629 opline->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ; in zend_compile_isset_or_empty()
7633 opline->opcode = ZEND_ISSET_ISEMPTY_STATIC_PROP; in zend_compile_isset_or_empty()
7902 opline->opcode = ZEND_ROPE_INIT; in zend_compile_rope_add()
7904 opline->opcode = ZEND_ROPE_ADD; in zend_compile_rope_add()
7972 opline->opcode = ZEND_CAST; in zend_compile_encaps_list()
7982 opline->opcode = ZEND_FAST_CONCAT; in zend_compile_encaps_list()
7995 opline->opcode = ZEND_ROPE_END; in zend_compile_encaps_list()
8013 if (opline->opcode == ZEND_ROPE_ADD && in zend_compile_encaps_list()
8017 } else if (opline->opcode == ZEND_ROPE_INIT && in zend_compile_encaps_list()