Lines Matching refs:opcode

59 	zend_uchar opcode;  member
91 static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2);
675 info.opcode = free_opcode; in zend_begin_loop()
680 info.opcode = ZEND_NOP; in zend_begin_loop()
708 while (opline->opcode == ZEND_END_SILENCE || in zend_do_free()
709 opline->opcode == ZEND_OP_DATA) { in zend_do_free()
714 switch (opline->opcode) { in zend_do_free()
726 opline->opcode -= 2; in zend_do_free()
751 while (opline->opcode == ZEND_END_SILENCE || in zend_do_free()
752 opline->opcode == ZEND_EXT_FCALL_END || in zend_do_free()
753 opline->opcode == ZEND_OP_DATA) { in zend_do_free()
758 if (opline->opcode == ZEND_FETCH_THIS) { in zend_do_free()
759 opline->opcode = ZEND_NOP; in zend_do_free()
764 if ((opline->opcode == ZEND_FETCH_LIST_R || in zend_do_free()
765 opline->opcode == ZEND_FETCH_LIST_W) && in zend_do_free()
773 if (opline->opcode == ZEND_NEW) { in zend_do_free()
1738 opline->opcode = ZEND_EXT_STMT; in zend_do_extended_stmt()
1752 opline->opcode = ZEND_EXT_FCALL_BEGIN; in zend_do_extended_fcall_begin()
1766 opline->opcode = ZEND_EXT_FCALL_END; in zend_do_extended_fcall_end()
2038 zend_uchar factor = (opline->opcode == ZEND_FETCH_STATIC_PROP_R) ? 1 : 3; in zend_adjust_for_fetch_type()
2046 opline->opcode += 1 * factor; in zend_adjust_for_fetch_type()
2049 opline->opcode += 2 * factor; in zend_adjust_for_fetch_type()
2054 opline->opcode += 3 * factor; in zend_adjust_for_fetch_type()
2057 opline->opcode += 4 * factor; in zend_adjust_for_fetch_type()
2060 opline->opcode += 5 * factor; in zend_adjust_for_fetch_type()
2083 static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2) /* {{{ */ in zend_emit_op() argument
2086 opline->opcode = opcode; in zend_emit_op()
2103 static zend_op *zend_emit_op_tmp(znode *result, zend_uchar opcode, znode *op1, znode *op2) /* {{{ */ in zend_emit_op_tmp() argument
2106 opline->opcode = opcode; in zend_emit_op_tmp()
2129 …array)->last && CG(active_op_array)->opcodes[CG(active_op_array)->last - 1].opcode == ZEND_TICKS) { in zend_emit_tick()
2135 opline->opcode = ZEND_TICKS; in zend_emit_tick()
2157 switch (opline->opcode) { in zend_is_smart_branch()
2183 static inline uint32_t zend_emit_cond_jump(zend_uchar opcode, znode *cond, uint32_t opnum_target) /… in zend_emit_cond_jump() argument
2193 if (opcode == ZEND_JMPZ) { in zend_emit_cond_jump()
2196 ZEND_ASSERT(opcode == ZEND_JMPNZ); in zend_emit_cond_jump()
2201 opline = zend_emit_op(NULL, opcode, cond, NULL); in zend_emit_cond_jump()
2210 switch (opline->opcode) { in zend_update_jump_target()
2234 static inline zend_op *zend_delayed_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op… in zend_delayed_emit_op() argument
2240 tmp_opline.opcode = opcode; in zend_delayed_emit_op()
2269 if (EXPECTED(oplines[i].opcode != ZEND_NOP)) { in zend_delayed_compile_end()
2872 …if (type == BP_VAR_W && (opline->opcode == ZEND_FETCH_STATIC_PROP_W || opline->opcode == ZEND_FETC… in zend_delayed_compile_dim()
2874 } else if (opline->opcode == ZEND_FETCH_DIM_W in zend_delayed_compile_dim()
2875 || opline->opcode == ZEND_FETCH_DIM_RW in zend_delayed_compile_dim()
2876 || opline->opcode == ZEND_FETCH_DIM_FUNC_ARG in zend_delayed_compile_dim()
2877 || opline->opcode == ZEND_FETCH_DIM_UNSET) { in zend_delayed_compile_dim()
2939 if (opline && (opline->opcode == ZEND_FETCH_DIM_W in zend_delayed_compile_prop()
2940 || opline->opcode == ZEND_FETCH_DIM_RW in zend_delayed_compile_prop()
2941 || opline->opcode == ZEND_FETCH_DIM_FUNC_ARG in zend_delayed_compile_prop()
2942 || opline->opcode == ZEND_FETCH_DIM_UNSET)) { in zend_delayed_compile_prop()
2964 if (oplines[i].opcode != ZEND_NOP) { in zend_delayed_compile_prop()
2967 oplines[i].opcode = ZEND_NOP; in zend_delayed_compile_prop()
3278 opline->opcode = ZEND_ASSIGN_STATIC_PROP; in zend_compile_assign()
3290 opline->opcode = ZEND_ASSIGN_DIM; in zend_compile_assign()
3303 opline->opcode = ZEND_ASSIGN_OBJ; in zend_compile_assign()
3387 if (opline && opline->opcode == ZEND_FETCH_OBJ_W) { in zend_compile_assign_ref()
3388 opline->opcode = ZEND_ASSIGN_OBJ_REF; in zend_compile_assign_ref()
3393 } else if (opline && opline->opcode == ZEND_FETCH_STATIC_PROP_W) { in zend_compile_assign_ref()
3394 opline->opcode = ZEND_ASSIGN_STATIC_PROP_REF; in zend_compile_assign_ref()
3420 uint32_t opcode = ast->attr; in zend_compile_compound_assign() local
3437 opline->extended_value = opcode; in zend_compile_compound_assign()
3446 opline->opcode = ZEND_ASSIGN_STATIC_PROP_OP; in zend_compile_compound_assign()
3447 opline->extended_value = opcode; in zend_compile_compound_assign()
3460 opline->opcode = ZEND_ASSIGN_DIM_OP; in zend_compile_compound_assign()
3461 opline->extended_value = opcode; in zend_compile_compound_assign()
3475 opline->opcode = ZEND_ASSIGN_OBJ_OP; in zend_compile_compound_assign()
3476 opline->extended_value = opcode; in zend_compile_compound_assign()
3534 zend_uchar opcode; in zend_compile_args() local
3602 opcode = ZEND_SEND_VAL_EX; in zend_compile_args()
3604 opcode = ZEND_SEND_VAL; in zend_compile_args()
3609 opcode = ZEND_SEND_VAR_NO_REF; in zend_compile_args()
3614 opcode = ZEND_SEND_VAL; in zend_compile_args()
3616 opcode = ZEND_SEND_VAR; in zend_compile_args()
3619 opcode = ZEND_SEND_VAR_NO_REF_EX; in zend_compile_args()
3626 opcode = ZEND_SEND_REF; in zend_compile_args()
3629 opcode = (arg_node.op_type == IS_TMP_VAR) ? ZEND_SEND_VAL : ZEND_SEND_VAR; in zend_compile_args()
3637 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3641 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3655 opcode = ZEND_SEND_FUNC_ARG; in zend_compile_args()
3664 opcode = ZEND_SEND_VAR_NO_REF; in zend_compile_args()
3666 opcode = ZEND_SEND_VAL; in zend_compile_args()
3668 opcode = ZEND_SEND_VAR; in zend_compile_args()
3671 opcode = ZEND_SEND_VAR_NO_REF_EX; in zend_compile_args()
3676 opcode = ZEND_SEND_REF; in zend_compile_args()
3678 opcode = ZEND_SEND_VAR; in zend_compile_args()
3681 opcode = ZEND_SEND_VAR_EX; in zend_compile_args()
3686 opcode = ZEND_SEND_VAL; in zend_compile_args()
3688 opcode = ZEND_SEND_VAL_EX; in zend_compile_args()
3693 opline = zend_emit_op(NULL, opcode, &arg_node, NULL); in zend_compile_args()
3718 if (init_op->opcode == ZEND_INIT_FCALL && !zend_execute_internal) { in zend_get_call_op()
3732 (init_op->opcode == ZEND_INIT_FCALL_BY_NAME || in zend_get_call_op()
3733 init_op->opcode == ZEND_INIT_NS_FCALL_BY_NAME)) { in zend_get_call_op()
3749 if (opline->opcode == ZEND_NEW) { in zend_compile_call_common()
3753 if (opline->opcode == ZEND_INIT_FCALL) { in zend_compile_call_common()
3769 if (opline->opcode == ZEND_INIT_FCALL) { in zend_compile_call_common()
3799 opline->opcode = ZEND_INIT_NS_FCALL_BY_NAME; in zend_compile_ns_call()
3819 opline->opcode = ZEND_INIT_STATIC_METHOD_CALL; in zend_compile_dynamic_call()
3830 opline->opcode = ZEND_INIT_FCALL_BY_NAME; in zend_compile_dynamic_call()
4711 opline->opcode = ZEND_INIT_STATIC_METHOD_CALL; in zend_compile_static_call()
4907 opline->opcode = ZEND_UNSET_VAR; in zend_compile_unset()
4912 opline->opcode = ZEND_UNSET_DIM; in zend_compile_unset()
4917 opline->opcode = ZEND_UNSET_OBJ; in zend_compile_unset()
4921 opline->opcode = ZEND_UNSET_STATIC_PROP; in zend_compile_unset()
4938 if (loop_var->opcode == ZEND_FAST_CALL) { in zend_handle_loops_and_finally_ex()
4941 opline->opcode = ZEND_FAST_CALL; in zend_handle_loops_and_finally_ex()
4948 } else if (loop_var->opcode == ZEND_DISCARD_EXCEPTION) { in zend_handle_loops_and_finally_ex()
4950 opline->opcode = ZEND_DISCARD_EXCEPTION; in zend_handle_loops_and_finally_ex()
4953 } else if (loop_var->opcode == ZEND_RETURN) { in zend_handle_loops_and_finally_ex()
4958 } else if (loop_var->opcode == ZEND_NOP) { in zend_handle_loops_and_finally_ex()
4966 opline->opcode = loop_var->opcode; in zend_handle_loops_and_finally_ex()
4993 if (loop_var->opcode == ZEND_FAST_CALL) { in zend_has_finally_ex()
4995 } else if (loop_var->opcode == ZEND_DISCARD_EXCEPTION) { in zend_has_finally_ex()
4996 } else if (loop_var->opcode == ZEND_RETURN) { in zend_has_finally_ex()
5223 opline->opcode = ZEND_JMP; in zend_resolve_goto_label()
5818 …uint32_t opcode = (expr_node.op_type & (IS_VAR|IS_TMP_VAR)) ? ZEND_CASE_STRICT : ZEND_IS_IDENTICAL; in zend_compile_match() local
5819 zend_op *opline = zend_emit_op(NULL, opcode, &expr_node, &cond_node); in zend_compile_match()
5979 fast_call.opcode = ZEND_FAST_CALL; in zend_compile_try()
6021 opline->opcode = ZEND_CATCH; in zend_compile_try()
6076 discard_exception.opcode = ZEND_DISCARD_EXCEPTION; in zend_compile_try()
6848 zend_uchar opcode; in zend_compile_params() local
6872 opcode = ZEND_RECV_VARIADIC; in zend_compile_params()
6884 opcode = ZEND_RECV_INIT; in zend_compile_params()
6907 opcode = ZEND_RECV; in zend_compile_params()
6912 opcode = ZEND_RECV; in zend_compile_params()
6953 opline = zend_emit_op(NULL, opcode, NULL, &default_node); in zend_compile_params()
6966 if (opcode == ZEND_RECV) { in zend_compile_params()
7394 opline->opcode = ZEND_DECLARE_FUNCTION; in zend_begin_func_decl()
7480 dummy_var.opcode = ZEND_RETURN; in zend_compile_func_decl()
8055 opline->opcode = ZEND_DECLARE_ANON_CLASS; in zend_compile_class_decl()
8074 opline->opcode = ZEND_DECLARE_CLASS; in zend_compile_class_decl()
8081 opline->opcode = ZEND_DECLARE_CLASS_DELAYED; in zend_compile_class_decl()
8532 ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zval *op2) /* {{{ */ in zend_binary_op_produces_error() argument
8534 if ((opcode == ZEND_CONCAT || opcode == ZEND_FAST_CONCAT)) { in zend_binary_op_produces_error()
8539 if (!(opcode == ZEND_ADD || opcode == ZEND_SUB || opcode == ZEND_MUL || opcode == ZEND_DIV in zend_binary_op_produces_error()
8540 || opcode == ZEND_POW || opcode == ZEND_MOD || opcode == ZEND_SL || opcode == ZEND_SR in zend_binary_op_produces_error()
8541 || opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR)) { in zend_binary_op_produces_error()
8547 if (opcode == ZEND_ADD && Z_TYPE_P(op1) == IS_ARRAY && Z_TYPE_P(op2) == IS_ARRAY) { in zend_binary_op_produces_error()
8558 if ((opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR) in zend_binary_op_produces_error()
8573 if ((opcode == ZEND_MOD && zval_get_long(op2) == 0) in zend_binary_op_produces_error()
8574 || (opcode == ZEND_DIV && zval_get_double(op2) == 0.0)) { in zend_binary_op_produces_error()
8578 if ((opcode == ZEND_SL || opcode == ZEND_SR) && zval_get_long(op2) < 0) { in zend_binary_op_produces_error()
8584 if (opcode == ZEND_SL || opcode == ZEND_SR || opcode == ZEND_BW_OR in zend_binary_op_produces_error()
8585 || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR || opcode == ZEND_MOD) { in zend_binary_op_produces_error()
8593 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
8595 if (zend_binary_op_produces_error(opcode, op1, op2)) { in zend_try_ct_eval_binary_op()
8599 binary_op_type fn = get_binary_op(opcode); in zend_try_ct_eval_binary_op()
8605 ZEND_API bool zend_unary_op_produces_error(uint32_t opcode, zval *op) in zend_unary_op_produces_error() argument
8607 if (opcode == ZEND_BW_NOT) { in zend_unary_op_produces_error()
8618 static inline bool zend_try_ct_eval_unary_op(zval *result, uint32_t opcode, zval *op) /* {{{ */ in zend_try_ct_eval_unary_op() argument
8620 if (zend_unary_op_produces_error(opcode, op)) { in zend_try_ct_eval_unary_op()
8624 unary_op_type fn = get_unary_op(opcode); in zend_try_ct_eval_unary_op()
8778 uint32_t opcode = ast->attr; in zend_compile_binary_op() local
8786 if (zend_try_ct_eval_binary_op(&result->u.constant, opcode, in zend_compile_binary_op()
8797 if (opcode == ZEND_IS_EQUAL || opcode == ZEND_IS_NOT_EQUAL) { in zend_compile_binary_op()
8800 opcode = (opcode == ZEND_IS_NOT_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
8801 zend_emit_op_tmp(result, opcode, &right_node, NULL); in zend_compile_binary_op()
8804 opcode = (opcode == ZEND_IS_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
8805 zend_emit_op_tmp(result, opcode, &right_node, NULL); in zend_compile_binary_op()
8810 opcode = (opcode == ZEND_IS_NOT_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
8811 zend_emit_op_tmp(result, opcode, &left_node, NULL); in zend_compile_binary_op()
8814 opcode = (opcode == ZEND_IS_EQUAL) ? ZEND_BOOL : ZEND_BOOL_NOT; in zend_compile_binary_op()
8815 zend_emit_op_tmp(result, opcode, &left_node, NULL); in zend_compile_binary_op()
8819 } else if (opcode == ZEND_IS_IDENTICAL || opcode == ZEND_IS_NOT_IDENTICAL) { in zend_compile_binary_op()
8825 (opcode == ZEND_IS_IDENTICAL) ? in zend_compile_binary_op()
8834 (opcode == ZEND_IS_IDENTICAL) ? in zend_compile_binary_op()
8840 } else if (opcode == ZEND_CONCAT) { in zend_compile_binary_op()
8857 opcode = ZEND_FAST_CONCAT; in zend_compile_binary_op()
8860 zend_emit_op_tmp(result, opcode, &left_node, &right_node); in zend_compile_binary_op()
8896 uint32_t opcode = ast->attr; in zend_compile_unary_op() local
8902 && zend_try_ct_eval_unary_op(&result->u.constant, opcode, &expr_node.u.constant)) { in zend_compile_unary_op()
8908 zend_emit_op_tmp(result, opcode, &expr_node, NULL); in zend_compile_unary_op()
8998 opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_OBJ : ZEND_POST_DEC_OBJ; in zend_compile_post_incdec()
9002 …opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_STATIC_PROP : ZEND_POST_DEC_STATIC… in zend_compile_post_incdec()
9007 if (opline && opline->opcode == ZEND_FETCH_DIM_RW) { in zend_compile_post_incdec()
9025 opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_OBJ : ZEND_PRE_DEC_OBJ; in zend_compile_pre_incdec()
9030 …opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_STATIC_PROP : ZEND_PRE_DEC_STATIC_PR… in zend_compile_pre_incdec()
9036 if (opline && opline->opcode == ZEND_FETCH_DIM_RW) { in zend_compile_pre_incdec()
9229 opline->opcode = ZEND_ASSIGN_STATIC_PROP; in zend_compile_assign_coalesce()
9236 opline->opcode = ZEND_ASSIGN_DIM; in zend_compile_assign_coalesce()
9244 opline->opcode = ZEND_ASSIGN_OBJ; in zend_compile_assign_coalesce()
9475 opline->opcode = ZEND_ISSET_ISEMPTY_VAR; in zend_compile_isset_or_empty()
9480 opline->opcode = ZEND_ISSET_ISEMPTY_DIM_OBJ; in zend_compile_isset_or_empty()
9485 opline->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ; in zend_compile_isset_or_empty()
9489 opline->opcode = ZEND_ISSET_ISEMPTY_STATIC_PROP; in zend_compile_isset_or_empty()
9736 opline->opcode = ZEND_ROPE_INIT; in zend_compile_rope_add_ex()
9738 opline->opcode = ZEND_ROPE_ADD; in zend_compile_rope_add_ex()
9755 opline->opcode = ZEND_ROPE_INIT; in zend_compile_rope_add()
9757 opline->opcode = ZEND_ROPE_ADD; in zend_compile_rope_add()
9807 opline->opcode = ZEND_NOP; in zend_compile_encaps_list()
9847 opline->opcode = ZEND_CAST; in zend_compile_encaps_list()
9855 opline->opcode = ZEND_FAST_CONCAT; in zend_compile_encaps_list()
9865 opline->opcode = ZEND_ROPE_END; in zend_compile_encaps_list()
9879 if (opline->opcode == ZEND_ROPE_ADD && in zend_compile_encaps_list()
9883 } else if (opline->opcode == ZEND_ROPE_INIT && in zend_compile_encaps_list()
10483 zend_op *opcode = zend_compile_var_inner(result, ast, type, by_ref); in zend_compile_var() local
10485 return opcode; in zend_compile_var()