]> granicus.if.org Git - php/commitdiff
Moar removal
authorNikita Popov <nikic@php.net>
Sat, 12 Jul 2014 17:20:21 +0000 (19:20 +0200)
committerNikita Popov <nikic@php.net>
Sat, 12 Jul 2014 17:20:21 +0000 (19:20 +0200)
Zend/zend_compile.c
Zend/zend_compile.h

index 7db59b750513658af826444ae2ba3637984e6820..a801a30c360168303d7472c6d4d3d3688e4af3ba 100644 (file)
@@ -3805,27 +3805,6 @@ ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS
 }
 /* }}} */
 
-void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC) /* {{{ */
-{
-       zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
-
-       opline->opcode = op;
-       opline->op1.opline_num = CG(context).current_brk_cont;
-       SET_UNUSED(opline->op1);
-       if (expr) {
-               if (expr->op_type != IS_CONST) {
-                       zend_error_noreturn(E_COMPILE_ERROR, "'%s' operator with non-constant operand is no longer supported", op == ZEND_BRK ? "break" : "continue");
-               } else if (Z_TYPE(expr->u.constant) != IS_LONG || Z_LVAL(expr->u.constant) < 1) {
-                       zend_error_noreturn(E_COMPILE_ERROR, "'%s' operator accepts only positive numbers", op == ZEND_BRK ? "break" : "continue");
-               }
-               SET_NODE(opline->op2, expr);
-       } else {
-               LITERAL_LONG(opline->op2, 1);
-               opline->op2_type = IS_CONST;
-       }
-}
-/* }}} */
-
 void zend_do_begin_class_declaration(const znode *class_token, znode *class_name, const znode *parent_class_name TSRMLS_DC) /* {{{ */
 {
        zend_op *opline;
@@ -4392,37 +4371,6 @@ void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC)
 }
 /* }}} */
 
-void zend_do_fetch_global_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC) /* {{{ */
-{
-       zend_op *opline;
-       znode lval;
-       znode result;
-
-       if (varname->op_type == IS_CONST) {
-               if (Z_TYPE(varname->u.constant) != IS_STRING) {
-                       convert_to_string(&varname->u.constant);
-               }
-       }
-
-       opline = get_next_op(CG(active_op_array) TSRMLS_CC);
-       opline->opcode = ZEND_FETCH_W;          /* the default mode must be Write, since fetch_simple_variable() is used to define function arguments */
-       opline->result_type = IS_VAR;
-       opline->result.var = get_temporary_variable(CG(active_op_array));
-       SET_NODE(opline->op1, varname);
-       SET_UNUSED(opline->op2);
-       opline->extended_value = fetch_type; // ZEND_FETCH_GLOBAL_LOCK
-       GET_NODE(&result, opline->result);
-
-       if (varname->op_type == IS_CONST) {
-               zval_copy_ctor(&varname->u.constant);
-       }
-       fetch_simple_variable(&lval, varname, 0 TSRMLS_CC); /* Relies on the fact that the default fetch is BP_VAR_W */
-
-       zend_do_assign_ref(NULL, &lval, &result TSRMLS_CC);
-       CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result_type |= EXT_TYPE_UNUSED;
-}
-/* }}} */
-
 void zend_do_declare_begin(TSRMLS_D) /* {{{ */
 {
        zend_stack_push(&CG(declare_stack), &CG(declarables));
index e2171fe6e881d2dc977057a48c37d10ed820dca0..3d0206a7851662ca56679d107c84ee9cfa903470 100644 (file)
@@ -477,7 +477,6 @@ void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar TSRMLS_DC);
 void fetch_simple_variable(znode *result, znode *varname, int bp TSRMLS_DC);
 void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC);
 void zend_do_fetch_static_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC);
-void zend_do_fetch_global_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC);
 
 typedef int (*unary_op_type)(zval *, zval * TSRMLS_DC);
 typedef int (*binary_op_type)(zval *, zval *, zval * TSRMLS_DC);
@@ -525,8 +524,6 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
 void zend_do_early_binding(TSRMLS_D);
 ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC);
 
-void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC);
-
 void zend_do_begin_class_declaration(const znode *class_token, znode *class_name, const znode *parent_class_name TSRMLS_DC);
 void zend_do_end_class_declaration(const znode *class_token, const znode *parent_token TSRMLS_DC);
 void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_type TSRMLS_DC);