Lines Matching refs:opcode

60 	uint8_t opcode;  member
92 static zend_op *zend_emit_op(znode *result, uint8_t opcode, znode *op1, znode *op2);
696 info.opcode = free_opcode; in zend_begin_loop()
701 info.opcode = ZEND_NOP; in zend_begin_loop()
729 while (opline->opcode == ZEND_END_SILENCE || in zend_do_free()
730 opline->opcode == ZEND_OP_DATA) { in zend_do_free()
735 switch (opline->opcode) { in zend_do_free()
747 opline->opcode -= 2; in zend_do_free()
772 while (opline->opcode == ZEND_END_SILENCE || in zend_do_free()
773 opline->opcode == ZEND_EXT_FCALL_END || in zend_do_free()
774 opline->opcode == ZEND_OP_DATA) { in zend_do_free()
779 if (opline->opcode == ZEND_FETCH_THIS) { in zend_do_free()
780 opline->opcode = ZEND_NOP; in zend_do_free()
785 if ((opline->opcode == ZEND_FETCH_LIST_R || in zend_do_free()
786 opline->opcode == ZEND_FETCH_LIST_W) && in zend_do_free()
794 if (opline->opcode == ZEND_NEW) { in zend_do_free()
1862 opline->opcode = ZEND_EXT_STMT; in zend_do_extended_stmt()
1876 opline->opcode = ZEND_EXT_FCALL_BEGIN; in zend_do_extended_fcall_begin()
1890 opline->opcode = ZEND_EXT_FCALL_END; in zend_do_extended_fcall_end()
2163 uint_fast8_t factor = (opline->opcode == ZEND_FETCH_STATIC_PROP_R) ? 1 : 3; in zend_adjust_for_fetch_type()
2171 opline->opcode += 1 * factor; in zend_adjust_for_fetch_type()
2174 opline->opcode += 2 * factor; in zend_adjust_for_fetch_type()
2179 opline->opcode += 3 * factor; in zend_adjust_for_fetch_type()
2182 opline->opcode += 4 * factor; in zend_adjust_for_fetch_type()
2185 opline->opcode += 5 * factor; in zend_adjust_for_fetch_type()
2208 static zend_op *zend_emit_op(znode *result, uint8_t opcode, znode *op1, znode *op2) /* {{{ */ in zend_emit_op() argument
2211 opline->opcode = opcode; in zend_emit_op()
2228 static zend_op *zend_emit_op_tmp(znode *result, uint8_t opcode, znode *op1, znode *op2) /* {{{ */ in zend_emit_op_tmp() argument
2231 opline->opcode = opcode; in zend_emit_op_tmp()
2254 …array)->last && CG(active_op_array)->opcodes[CG(active_op_array)->last - 1].opcode == ZEND_TICKS) { in zend_emit_tick()
2260 opline->opcode = ZEND_TICKS; in zend_emit_tick()
2282 switch (opline->opcode) { in zend_is_smart_branch()
2308 static inline uint32_t zend_emit_cond_jump(uint8_t opcode, znode *cond, uint32_t opnum_target) /* {… in zend_emit_cond_jump() argument
2318 if (opcode == ZEND_JMPZ) { in zend_emit_cond_jump()
2321 ZEND_ASSERT(opcode == ZEND_JMPNZ); in zend_emit_cond_jump()
2326 opline = zend_emit_op(NULL, opcode, cond, NULL); in zend_emit_cond_jump()
2335 switch (opline->opcode) { in zend_update_jump_target()
2360 static inline zend_op *zend_delayed_emit_op(znode *result, uint8_t opcode, znode *op1, znode *op2) … in zend_delayed_emit_op() argument
2366 tmp_opline.opcode = opcode; in zend_delayed_emit_op()
2395 if (EXPECTED(oplines[i].opcode != ZEND_NOP)) { in zend_delayed_compile_end()
2994 …if (type == BP_VAR_W && (opline->opcode == ZEND_FETCH_STATIC_PROP_W || opline->opcode == ZEND_FETC… in zend_delayed_compile_dim()
2996 } else if (opline->opcode == ZEND_FETCH_DIM_W in zend_delayed_compile_dim()
2997 || opline->opcode == ZEND_FETCH_DIM_RW in zend_delayed_compile_dim()
2998 || opline->opcode == ZEND_FETCH_DIM_FUNC_ARG in zend_delayed_compile_dim()
2999 || opline->opcode == ZEND_FETCH_DIM_UNSET) { in zend_delayed_compile_dim()
3061 if (opline && (opline->opcode == ZEND_FETCH_DIM_W in zend_delayed_compile_prop()
3062 || opline->opcode == ZEND_FETCH_DIM_RW in zend_delayed_compile_prop()
3063 || opline->opcode == ZEND_FETCH_DIM_FUNC_ARG in zend_delayed_compile_prop()
3064 || opline->opcode == ZEND_FETCH_DIM_UNSET)) { in zend_delayed_compile_prop()
3086 if (oplines[i].opcode != ZEND_NOP) { in zend_delayed_compile_prop()
3089 oplines[i].opcode = ZEND_NOP; in zend_delayed_compile_prop()
3400 opline->opcode = ZEND_ASSIGN_STATIC_PROP; in zend_compile_assign()
3412 opline->opcode = ZEND_ASSIGN_DIM; in zend_compile_assign()
3425 opline->opcode = ZEND_ASSIGN_OBJ; in zend_compile_assign()
3509 if (opline && opline->opcode == ZEND_FETCH_OBJ_W) { in zend_compile_assign_ref()
3510 opline->opcode = ZEND_ASSIGN_OBJ_REF; in zend_compile_assign_ref()
3515 } else if (opline && opline->opcode == ZEND_FETCH_STATIC_PROP_W) { in zend_compile_assign_ref()
3516 opline->opcode = ZEND_ASSIGN_STATIC_PROP_REF; in zend_compile_assign_ref()
3542 uint32_t opcode = ast->attr; in zend_compile_compound_assign() local
3559 opline->extended_value = opcode; in zend_compile_compound_assign()
3568 opline->opcode = ZEND_ASSIGN_STATIC_PROP_OP; in zend_compile_compound_assign()
3569 opline->extended_value = opcode; in zend_compile_compound_assign()
3582 opline->opcode = ZEND_ASSIGN_DIM_OP; in zend_compile_compound_assign()
3583 opline->extended_value = opcode; in zend_compile_compound_assign()
3597 opline->opcode = ZEND_ASSIGN_OBJ_OP; in zend_compile_compound_assign()
3598 opline->extended_value = opcode; in zend_compile_compound_assign()
3656 uint8_t opcode; in zend_compile_args() local
3724 opcode = ZEND_SEND_VAL_EX; in zend_compile_args()
3726 opcode = ZEND_SEND_VAL; in zend_compile_args()
3731 opcode = ZEND_SEND_VAR_NO_REF; in zend_compile_args()
3736 opcode = ZEND_SEND_VAL; in zend_compile_args()
3738 opcode = ZEND_SEND_VAR; in zend_compile_args()
3741 opcode = ZEND_SEND_VAR_NO_REF_EX; in zend_compile_args()
3748 opcode = ZEND_SEND_REF; in zend_compile_args()
3751 opcode = (arg_node.op_type == IS_TMP_VAR) ? ZEND_SEND_VAL : ZEND_SEND_VAR; in zend_compile_args()
3759 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3763 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3777 opcode = ZEND_SEND_FUNC_ARG; in zend_compile_args()
3786 opcode = ZEND_SEND_VAR_NO_REF; in zend_compile_args()
3788 opcode = ZEND_SEND_VAL; in zend_compile_args()
3790 opcode = ZEND_SEND_VAR; in zend_compile_args()
3793 opcode = ZEND_SEND_VAR_NO_REF_EX; in zend_compile_args()
3798 opcode = ZEND_SEND_REF; in zend_compile_args()
3800 opcode = ZEND_SEND_VAR; in zend_compile_args()
3803 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3808 opcode = ZEND_SEND_VAL; in zend_compile_args()
3810 opcode = ZEND_SEND_VAL_EX; in zend_compile_args()
3815 opline = zend_emit_op(NULL, opcode, &arg_node, NULL); in zend_compile_args()
3840 if (init_op->opcode == ZEND_INIT_FCALL && !zend_execute_internal) { in zend_get_call_op()
3854 (init_op->opcode == ZEND_INIT_FCALL_BY_NAME || in zend_get_call_op()
3855 init_op->opcode == ZEND_INIT_NS_FCALL_BY_NAME)) { in zend_get_call_op()
3871 if (opline->opcode == ZEND_NEW) { in zend_compile_call_common()
3875 if (opline->opcode == ZEND_INIT_FCALL) { in zend_compile_call_common()
3891 if (opline->opcode == ZEND_INIT_FCALL) { in zend_compile_call_common()
3921 opline->opcode = ZEND_INIT_NS_FCALL_BY_NAME; in zend_compile_ns_call()
3941 opline->opcode = ZEND_INIT_STATIC_METHOD_CALL; in zend_compile_dynamic_call()
3952 opline->opcode = ZEND_INIT_FCALL_BY_NAME; in zend_compile_dynamic_call()
4819 opline->opcode = ZEND_INIT_STATIC_METHOD_CALL; in zend_compile_static_call()
5054 opline->opcode = ZEND_UNSET_VAR; in zend_compile_unset()
5059 opline->opcode = ZEND_UNSET_DIM; in zend_compile_unset()
5064 opline->opcode = ZEND_UNSET_OBJ; in zend_compile_unset()
5068 opline->opcode = ZEND_UNSET_STATIC_PROP; in zend_compile_unset()
5085 if (loop_var->opcode == ZEND_FAST_CALL) { in zend_handle_loops_and_finally_ex()
5088 opline->opcode = ZEND_FAST_CALL; in zend_handle_loops_and_finally_ex()
5095 } else if (loop_var->opcode == ZEND_DISCARD_EXCEPTION) { in zend_handle_loops_and_finally_ex()
5097 opline->opcode = ZEND_DISCARD_EXCEPTION; in zend_handle_loops_and_finally_ex()
5100 } else if (loop_var->opcode == ZEND_RETURN) { in zend_handle_loops_and_finally_ex()
5105 } else if (loop_var->opcode == ZEND_NOP) { in zend_handle_loops_and_finally_ex()
5113 opline->opcode = loop_var->opcode; in zend_handle_loops_and_finally_ex()
5140 if (loop_var->opcode == ZEND_FAST_CALL) { in zend_has_finally_ex()
5142 } else if (loop_var->opcode == ZEND_DISCARD_EXCEPTION) { in zend_has_finally_ex()
5143 } else if (loop_var->opcode == ZEND_RETURN) { in zend_has_finally_ex()
5370 opline->opcode = ZEND_JMP; in zend_resolve_goto_label()
5965 …uint32_t opcode = (expr_node.op_type & (IS_VAR|IS_TMP_VAR)) ? ZEND_CASE_STRICT : ZEND_IS_IDENTICAL; in zend_compile_match() local
5966 zend_op *opline = zend_emit_op(NULL, opcode, &expr_node, &cond_node); in zend_compile_match()
6126 fast_call.opcode = ZEND_FAST_CALL; in zend_compile_try()
6168 opline->opcode = ZEND_CATCH; in zend_compile_try()
6223 discard_exception.opcode = ZEND_DISCARD_EXCEPTION; in zend_compile_try()
7007 uint8_t opcode; in zend_compile_params() local
7031 opcode = ZEND_RECV_VARIADIC; in zend_compile_params()
7043 opcode = ZEND_RECV_INIT; in zend_compile_params()
7049 opcode = ZEND_RECV; in zend_compile_params()
7106 opcode = ZEND_RECV; in zend_compile_params()
7111 opline = zend_emit_op(NULL, opcode, NULL, &default_node); in zend_compile_params()
7124 if (opcode == ZEND_RECV) { in zend_compile_params()
7552 opline->opcode = ZEND_DECLARE_FUNCTION; in zend_begin_func_decl()
7648 dummy_var.opcode = ZEND_RETURN; in zend_compile_func_decl()
8232 opline->opcode = ZEND_DECLARE_ANON_CLASS; in zend_compile_class_decl()
8251 opline->opcode = ZEND_DECLARE_CLASS; in zend_compile_class_decl()
8264 opline->opcode = ZEND_DECLARE_CLASS_DELAYED; in zend_compile_class_decl()
8715 ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, const zval *op1, const zval *op2) /* {… in zend_binary_op_produces_error() argument
8717 if ((opcode == ZEND_CONCAT || opcode == ZEND_FAST_CONCAT)) { in zend_binary_op_produces_error()
8722 if (!(opcode == ZEND_ADD || opcode == ZEND_SUB || opcode == ZEND_MUL || opcode == ZEND_DIV in zend_binary_op_produces_error()
8723 || opcode == ZEND_POW || opcode == ZEND_MOD || opcode == ZEND_SL || opcode == ZEND_SR in zend_binary_op_produces_error()
8724 || opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR)) { in zend_binary_op_produces_error()
8730 if (opcode == ZEND_ADD && Z_TYPE_P(op1) == IS_ARRAY && Z_TYPE_P(op2) == IS_ARRAY) { in zend_binary_op_produces_error()
8741 if ((opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR) in zend_binary_op_produces_error()
8756 if ((opcode == ZEND_MOD && zval_get_long(op2) == 0) in zend_binary_op_produces_error()
8757 || (opcode == ZEND_DIV && zval_get_double(op2) == 0.0)) { in zend_binary_op_produces_error()
8761 if ((opcode == ZEND_SL || opcode == ZEND_SR) && zval_get_long(op2) < 0) { in zend_binary_op_produces_error()
8767 if (opcode == ZEND_SL || opcode == ZEND_SR || opcode == ZEND_BW_OR in zend_binary_op_produces_error()
8768 || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR || opcode == ZEND_MOD) { in zend_binary_op_produces_error()
8776 static inline bool zend_try_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *op2) … in zend_try_ct_eval_binary_op() argument
8778 if (zend_binary_op_produces_error(opcode, op1, op2)) { in zend_try_ct_eval_binary_op()
8782 binary_op_type fn = get_binary_op(opcode); in zend_try_ct_eval_binary_op()
8788 ZEND_API bool zend_unary_op_produces_error(uint32_t opcode, const zval *op) in zend_unary_op_produces_error() argument
8790 if (opcode == ZEND_BW_NOT) { in zend_unary_op_produces_error()
8801 static inline bool zend_try_ct_eval_unary_op(zval *result, uint32_t opcode, zval *op) /* {{{ */ in zend_try_ct_eval_unary_op() argument
8803 if (zend_unary_op_produces_error(opcode, op)) { in zend_try_ct_eval_unary_op()
8807 unary_op_type fn = get_unary_op(opcode); in zend_try_ct_eval_unary_op()
8961 uint32_t opcode = ast->attr; in zend_compile_binary_op() local
8969 if (zend_try_ct_eval_binary_op(&result->u.constant, opcode, in zend_compile_binary_op()
8980 if (opcode == ZEND_IS_EQUAL || opcode == ZEND_IS_NOT_EQUAL) { in zend_compile_binary_op()
8983 opcode = (opcode == ZEND_IS_NOT_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
8984 zend_emit_op_tmp(result, opcode, &right_node, NULL); in zend_compile_binary_op()
8987 opcode = (opcode == ZEND_IS_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
8988 zend_emit_op_tmp(result, opcode, &right_node, NULL); in zend_compile_binary_op()
8993 opcode = (opcode == ZEND_IS_NOT_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
8994 zend_emit_op_tmp(result, opcode, &left_node, NULL); in zend_compile_binary_op()
8997 opcode = (opcode == ZEND_IS_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
8998 zend_emit_op_tmp(result, opcode, &left_node, NULL); in zend_compile_binary_op()
9002 } else if (opcode == ZEND_IS_IDENTICAL || opcode == ZEND_IS_NOT_IDENTICAL) { in zend_compile_binary_op()
9008 (opcode == ZEND_IS_IDENTICAL) ? in zend_compile_binary_op()
9017 (opcode == ZEND_IS_IDENTICAL) ? in zend_compile_binary_op()
9023 } else if (opcode == ZEND_CONCAT) { in zend_compile_binary_op()
9040 opcode = ZEND_FAST_CONCAT; in zend_compile_binary_op()
9043 zend_emit_op_tmp(result, opcode, &left_node, &right_node); in zend_compile_binary_op()
9079 uint32_t opcode = ast->attr; in zend_compile_unary_op() local
9085 && zend_try_ct_eval_unary_op(&result->u.constant, opcode, &expr_node.u.constant)) { in zend_compile_unary_op()
9091 zend_emit_op_tmp(result, opcode, &expr_node, NULL); in zend_compile_unary_op()
9181 opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_OBJ : ZEND_POST_DEC_OBJ; in zend_compile_post_incdec()
9185 …opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_STATIC_PROP : ZEND_POST_DEC_STATIC… in zend_compile_post_incdec()
9190 if (opline && opline->opcode == ZEND_FETCH_DIM_RW) { in zend_compile_post_incdec()
9208 opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_OBJ : ZEND_PRE_DEC_OBJ; in zend_compile_pre_incdec()
9213 …opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_STATIC_PROP : ZEND_PRE_DEC_STATIC_PR… in zend_compile_pre_incdec()
9219 if (opline && opline->opcode == ZEND_FETCH_DIM_RW) { in zend_compile_pre_incdec()
9412 opline->opcode = ZEND_ASSIGN_STATIC_PROP; in zend_compile_assign_coalesce()
9419 opline->opcode = ZEND_ASSIGN_DIM; in zend_compile_assign_coalesce()
9427 opline->opcode = ZEND_ASSIGN_OBJ; in zend_compile_assign_coalesce()
9658 opline->opcode = ZEND_ISSET_ISEMPTY_VAR; in zend_compile_isset_or_empty()
9663 opline->opcode = ZEND_ISSET_ISEMPTY_DIM_OBJ; in zend_compile_isset_or_empty()
9668 opline->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ; in zend_compile_isset_or_empty()
9672 opline->opcode = ZEND_ISSET_ISEMPTY_STATIC_PROP; in zend_compile_isset_or_empty()
9923 opline->opcode = ZEND_ROPE_INIT; in zend_compile_rope_add_ex()
9925 opline->opcode = ZEND_ROPE_ADD; in zend_compile_rope_add_ex()
9942 opline->opcode = ZEND_ROPE_INIT; in zend_compile_rope_add()
9944 opline->opcode = ZEND_ROPE_ADD; in zend_compile_rope_add()
9994 opline->opcode = ZEND_NOP; in zend_compile_encaps_list()
10034 opline->opcode = ZEND_CAST; in zend_compile_encaps_list()
10042 opline->opcode = ZEND_FAST_CONCAT; in zend_compile_encaps_list()
10052 opline->opcode = ZEND_ROPE_END; in zend_compile_encaps_list()
10066 if (opline->opcode == ZEND_ROPE_ADD && in zend_compile_encaps_list()
10070 } else if (opline->opcode == ZEND_ROPE_INIT && in zend_compile_encaps_list()
10689 zend_op *opcode = zend_compile_var_inner(result, ast, type, by_ref); in zend_compile_var() local
10691 return opcode; in zend_compile_var()