Back to index

php5  5.3.10
zend_vm_execute.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | Zend Engine                                                          |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 2.00 of the Zend license,     |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.zend.com/license/2_00.txt.                                |
00011    | If you did not receive a copy of the Zend license and are unable to  |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@zend.com so we can mail you a copy immediately.              |
00014    +----------------------------------------------------------------------+
00015    | Authors: Andi Gutmans <andi@zend.com>                                |
00016    |          Zeev Suraski <zeev@zend.com>                                |
00017    |          Dmitry Stogov <dmitry@zend.com>                             |
00018    +----------------------------------------------------------------------+
00019 */
00020 
00021 #ifdef ZEND_WIN32
00022 # pragma warning(once : 4101)
00023 #endif
00024 static user_opcode_handler_t zend_user_opcode_handlers[256] = {(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL};
00025 
00026 static zend_uchar zend_user_opcodes[256] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255};
00027 
00028 static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op);
00029 
00030 
00031 #define ZEND_VM_CONTINUE()   return 0
00032 #define ZEND_VM_RETURN()     return 1
00033 #define ZEND_VM_ENTER()      return 2
00034 #define ZEND_VM_LEAVE()      return 3
00035 #define ZEND_VM_DISPATCH(opcode, opline) return zend_vm_get_opcode_handler(opcode, opline)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
00036 
00037 #define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC
00038 #undef EX
00039 #define EX(element) execute_data->element
00040 
00041 
00042 ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
00043 {
00044        zend_execute_data *execute_data;
00045        zend_bool nested = 0;
00046        zend_bool original_in_execution = EG(in_execution);
00047 
00048 
00049        if (EG(exception)) {
00050               return;
00051        }
00052 
00053        EG(in_execution) = 1;
00054 
00055 zend_vm_enter:
00056        /* Initialize execute_data */
00057        execute_data = (zend_execute_data *)zend_vm_stack_alloc(
00058               ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)) +
00059               ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)) +
00060               ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T TSRMLS_CC);
00061 
00062        EX(CVs) = (zval***)((char*)execute_data + ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)));
00063        memset(EX(CVs), 0, sizeof(zval**) * op_array->last_var);
00064        EX(Ts) = (temp_variable *)(((char*)EX(CVs)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)));
00065        EX(fbc) = NULL;
00066        EX(called_scope) = NULL;
00067        EX(object) = NULL;
00068        EX(old_error_reporting) = NULL;
00069        EX(op_array) = op_array;
00070        EX(symbol_table) = EG(active_symbol_table);
00071        EX(prev_execute_data) = EG(current_execute_data);
00072        EG(current_execute_data) = execute_data;
00073        EX(nested) = nested;
00074        nested = 1;
00075 
00076        if (op_array->start_op) {
00077               ZEND_VM_SET_OPCODE(op_array->start_op);
00078        } else {
00079               ZEND_VM_SET_OPCODE(op_array->opcodes);
00080        }
00081 
00082        if (op_array->this_var != -1 && EG(This)) {
00083               Z_ADDREF_P(EG(This)); /* For $this pointer */
00084               if (!EG(active_symbol_table)) {
00085                      EX(CVs)[op_array->this_var] = (zval**)EX(CVs) + (op_array->last_var + op_array->this_var);
00086                      *EX(CVs)[op_array->this_var] = EG(This);
00087               } else {
00088                      if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void**)&EX(CVs)[op_array->this_var])==FAILURE) {
00089                             Z_DELREF_P(EG(This));
00090                      }
00091               }
00092        }
00093 
00094        EG(opline_ptr) = &EX(opline);
00095 
00096        EX(function_state).function = (zend_function *) op_array;
00097        EX(function_state).arguments = NULL;
00098        
00099        while (1) {
00100        int ret;
00101 #ifdef ZEND_WIN32
00102               if (EG(timed_out)) {
00103                      zend_timeout(0);
00104               }
00105 #endif
00106 
00107               if ((ret = EX(opline)->handler(execute_data TSRMLS_CC)) > 0) {
00108                      switch (ret) {
00109                             case 1:
00110                                    EG(in_execution) = original_in_execution;
00111                                    return;
00112                             case 2:
00113                                    op_array = EG(active_op_array);
00114                                    goto zend_vm_enter;
00115                             case 3:
00116                                    execute_data = EG(current_execute_data);
00117                             default:
00118                                    break;
00119                      }
00120               }
00121 
00122        }
00123        zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen");
00124 }
00125 
00126 static int ZEND_FASTCALL  ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00127 {
00128 #if DEBUG_ZEND>=2
00129        printf("Jumping to %d\n", EX(opline)->op1.u.opline_num);
00130 #endif
00131        ZEND_VM_SET_OPCODE(EX(opline)->op1.u.jmp_addr);
00132        ZEND_VM_CONTINUE(); /* CHECK_ME */
00133 }
00134 
00135 static int ZEND_FASTCALL  ZEND_INIT_STRING_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00136 {
00137        zval *tmp = &EX_T(EX(opline)->result.u.var).tmp_var;
00138 
00139        tmp->value.str.val = emalloc(1);
00140        tmp->value.str.val[0] = 0;
00141        tmp->value.str.len = 0;
00142        Z_SET_REFCOUNT_P(tmp, 1);
00143        tmp->type = IS_STRING;
00144        Z_UNSET_ISREF_P(tmp);
00145        ZEND_VM_NEXT_OPCODE();
00146 }
00147 
00148 static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
00149 {
00150        zend_bool nested;
00151        zend_op_array *op_array = EX(op_array);
00152 
00153        EG(current_execute_data) = EX(prev_execute_data);
00154        EG(opline_ptr) = NULL;
00155        if (!EG(active_symbol_table)) {
00156               zval ***cv = EX(CVs);
00157               zval ***end = cv + EX(op_array)->last_var;
00158               while (cv != end) {
00159                      if (*cv) {
00160                             zval_ptr_dtor(*cv);
00161                      }
00162                      cv++;
00163               }
00164        }
00165 
00166        if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
00167               zval_ptr_dtor((zval**)&op_array->prototype);
00168        }
00169 
00170        nested = EX(nested);
00171 
00172        zend_vm_stack_free(execute_data TSRMLS_CC);
00173 
00174        if (nested) {
00175               execute_data = EG(current_execute_data);
00176 
00177               if (EX(call_opline)->opcode == ZEND_INCLUDE_OR_EVAL) {
00178 
00179                      EX(function_state).function = (zend_function *) EX(op_array);
00180                      EX(function_state).arguments = NULL;
00181                      EX(object) = EX(current_object);
00182 
00183                      if (RETURN_VALUE_USED(EX(call_opline))) {
00184                             if (!EX_T(EX(call_opline)->result.u.var).var.ptr) { /* there was no return statement */
00185                                    ALLOC_ZVAL(EX_T(EX(call_opline)->result.u.var).var.ptr);
00186                                    INIT_PZVAL(EX_T(EX(call_opline)->result.u.var).var.ptr);
00187                                    Z_LVAL_P(EX_T(EX(call_opline)->result.u.var).var.ptr) = 1;
00188                                    Z_TYPE_P(EX_T(EX(call_opline)->result.u.var).var.ptr) = IS_BOOL;
00189                             }
00190                      }
00191 
00192                      EG(opline_ptr) = &EX(opline);
00193                      EG(active_op_array) = EX(op_array);
00194                      EG(return_value_ptr_ptr) = EX(original_return_value);
00195                      destroy_op_array(op_array TSRMLS_CC);
00196                      efree(op_array);
00197                      if (EG(exception)) {
00198                             zend_throw_exception_internal(NULL TSRMLS_CC);
00199                      }
00200 
00201                      EX(opline)++;
00202                      ZEND_VM_LEAVE();
00203               } else {
00204 
00205                      EG(opline_ptr) = &EX(opline);
00206                      EG(active_op_array) = EX(op_array);
00207                      EG(return_value_ptr_ptr) = EX(original_return_value);
00208                      if (EG(active_symbol_table)) {
00209                             if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) {
00210                                    zend_hash_destroy(EG(active_symbol_table));
00211                                    FREE_HASHTABLE(EG(active_symbol_table));
00212                             } else {
00213                                    /* clean before putting into the cache, since clean
00214                                       could call dtors, which could use cached hash */
00215                                    zend_hash_clean(EG(active_symbol_table));
00216                                    *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
00217                             }
00218                      }
00219                      EG(active_symbol_table) = EX(symbol_table);
00220 
00221                      EX(function_state).function = (zend_function *) EX(op_array);
00222                      EX(function_state).arguments = NULL;
00223 
00224                      if (EG(This)) {
00225                             if (EG(exception) && IS_CTOR_CALL(EX(called_scope))) {
00226                                    if (IS_CTOR_USED(EX(called_scope))) {
00227                                           Z_DELREF_P(EG(This));
00228                                    }
00229                                    if (Z_REFCOUNT_P(EG(This)) == 1) {
00230                                           zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
00231                                    }
00232                             }
00233                             zval_ptr_dtor(&EG(This));
00234                      }
00235                      EG(This) = EX(current_this);
00236                      EG(scope) = EX(current_scope);
00237                      EG(called_scope) = EX(current_called_scope);
00238 
00239                      EX(object) = EX(current_object);
00240                      EX(called_scope) = DECODE_CTOR(EX(called_scope));
00241 
00242                      zend_vm_stack_clear_multiple(TSRMLS_C);
00243 
00244                      if (EG(exception)) {
00245                             zend_throw_exception_internal(NULL TSRMLS_CC);
00246                             if (RETURN_VALUE_USED(EX(call_opline)) && EX_T(EX(call_opline)->result.u.var).var.ptr) {
00247                                    zval_ptr_dtor(&EX_T(EX(call_opline)->result.u.var).var.ptr);
00248                             }
00249                      }
00250 
00251                      EX(opline)++;
00252                      ZEND_VM_LEAVE();
00253               }
00254        }
00255        ZEND_VM_RETURN();
00256 }
00257 
00258 static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
00259 {
00260        zend_op *opline = EX(opline);
00261        zend_bool should_change_scope = 0;
00262 
00263        if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {
00264               if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) {
00265                      zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
00266                      ZEND_VM_NEXT_OPCODE(); /* Never reached */
00267               }
00268               if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
00269                      zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
00270                             EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
00271                             EX(function_state).function->common.scope ? "::" : "",
00272                             EX(function_state).function->common.function_name);
00273               }
00274        }
00275        if (EX(function_state).function->common.scope &&
00276               !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC) &&
00277               !EX(object)) {
00278 
00279               if (EX(function_state).function->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
00280                      /* FIXME: output identifiers properly */
00281                      zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
00282               } else {
00283                      /* FIXME: output identifiers properly */
00284                      /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
00285                      zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
00286               }
00287        }
00288 
00289        if (EX(function_state).function->type == ZEND_USER_FUNCTION ||
00290            EX(function_state).function->common.scope) {
00291               should_change_scope = 1;
00292               EX(current_this) = EG(This);
00293               EX(current_scope) = EG(scope);
00294               EX(current_called_scope) = EG(called_scope);
00295               EG(This) = EX(object);
00296               EG(scope) = (EX(function_state).function->type == ZEND_USER_FUNCTION || !EX(object)) ? EX(function_state).function->common.scope : NULL;
00297               EG(called_scope) = EX(called_scope);
00298        }
00299 
00300        zend_arg_types_stack_3_pop(&EG(arg_types_stack), &EX(called_scope), &EX(current_object), &EX(fbc));
00301        EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
00302 
00303        if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
00304               ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
00305               EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
00306               EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
00307 
00308               if (EX(function_state).function->common.arg_info) {
00309                      zend_uint i=0;
00310                      zval **p = (zval**)EX(function_state).arguments;
00311                      ulong arg_count = opline->extended_value;
00312 
00313                      while (arg_count>0) {
00314                             zend_verify_arg_type(EX(function_state).function, ++i, *(p-arg_count), 0 TSRMLS_CC);
00315                             arg_count--;
00316                      }
00317               }
00318               if (!zend_execute_internal) {
00319                      /* saves one function call if zend_execute_internal is not used */
00320                      ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
00321               } else {
00322                      zend_execute_internal(execute_data, RETURN_VALUE_USED(opline) TSRMLS_CC);
00323               }
00324 
00325               if (!RETURN_VALUE_USED(opline)) {
00326                      zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
00327               }
00328        } else if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
00329               EX(original_return_value) = EG(return_value_ptr_ptr);
00330               EG(active_symbol_table) = NULL;
00331               EG(active_op_array) = &EX(function_state).function->op_array;
00332               EG(return_value_ptr_ptr) = NULL;
00333               if (RETURN_VALUE_USED(opline)) {
00334                      EG(return_value_ptr_ptr) = &EX_T(opline->result.u.var).var.ptr;
00335                      EX_T(opline->result.u.var).var.ptr = NULL;
00336                      EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
00337                      EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
00338               }
00339 
00340               if (zend_execute == execute && !EG(exception)) {
00341                      EX(call_opline) = opline;
00342                      ZEND_VM_ENTER();
00343               } else {
00344                      zend_execute(EG(active_op_array) TSRMLS_CC);
00345               }
00346 
00347               EG(opline_ptr) = &EX(opline);
00348               EG(active_op_array) = EX(op_array);
00349               EG(return_value_ptr_ptr) = EX(original_return_value);
00350               if (EG(active_symbol_table)) {
00351                      if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) {
00352                             zend_hash_destroy(EG(active_symbol_table));
00353                             FREE_HASHTABLE(EG(active_symbol_table));
00354                      } else {
00355                             /* clean before putting into the cache, since clean
00356                                could call dtors, which could use cached hash */
00357                             zend_hash_clean(EG(active_symbol_table));
00358                             *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
00359                      }
00360               }
00361               EG(active_symbol_table) = EX(symbol_table);
00362        } else { /* ZEND_OVERLOADED_FUNCTION */
00363               ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
00364 
00365                      /* Not sure what should be done here if it's a static method */
00366               if (EX(object)) {
00367                      Z_OBJ_HT_P(EX(object))->call_method(EX(function_state).function->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, &EX_T(opline->result.u.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
00368               } else {
00369                      zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
00370               }
00371 
00372               if (EX(function_state).function->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
00373                      efree(EX(function_state).function->common.function_name);
00374               }
00375               efree(EX(function_state).function);
00376 
00377               if (!RETURN_VALUE_USED(opline)) {
00378                      zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
00379               } else {
00380                      Z_UNSET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
00381                      Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
00382                      EX_T(opline->result.u.var).var.fcall_returned_reference = 0;
00383                      EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
00384               }
00385        }
00386 
00387        EX(function_state).function = (zend_function *) EX(op_array);
00388        EX(function_state).arguments = NULL;
00389 
00390        if (should_change_scope) {
00391               if (EG(This)) {
00392                      if (EG(exception) && IS_CTOR_CALL(EX(called_scope))) {
00393                             if (IS_CTOR_USED(EX(called_scope))) {
00394                                    Z_DELREF_P(EG(This));
00395                             }
00396                             if (Z_REFCOUNT_P(EG(This)) == 1) {
00397                                    zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
00398                             }
00399                      }
00400                      zval_ptr_dtor(&EG(This));
00401               }
00402               EG(This) = EX(current_this);
00403               EG(scope) = EX(current_scope);
00404               EG(called_scope) = EX(current_called_scope);
00405        }
00406 
00407        EX(object) = EX(current_object);
00408        EX(called_scope) = DECODE_CTOR(EX(called_scope));
00409 
00410        zend_vm_stack_clear_multiple(TSRMLS_C);
00411 
00412        if (EG(exception)) {
00413               zend_throw_exception_internal(NULL TSRMLS_CC);
00414               if (RETURN_VALUE_USED(opline) && EX_T(opline->result.u.var).var.ptr) {
00415                      zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
00416               }
00417        }
00418 
00419        ZEND_VM_NEXT_OPCODE();
00420 }
00421 
00422 static int ZEND_FASTCALL  ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00423 {
00424        EX(function_state).function = EX(fbc);
00425        return zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
00426 }
00427 
00428 static int ZEND_FASTCALL  ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00429 {
00430        zend_op *opline = EX(opline);
00431        zend_uint arg_num = Z_LVAL(opline->op1.u.constant);
00432        zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
00433 
00434        if (param == NULL) {
00435               char *space;
00436               char *class_name = get_active_class_name(&space TSRMLS_CC);
00437               zend_execute_data *ptr = EX(prev_execute_data);
00438 
00439               if (zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, NULL, opline->extended_value TSRMLS_CC)) {
00440                      if(ptr && ptr->op_array) {
00441                             zend_error(E_WARNING, "Missing argument %ld for %s%s%s(), called in %s on line %d and defined", opline->op1.u.constant.value.lval, class_name, space, get_active_function_name(TSRMLS_C), ptr->op_array->filename, ptr->opline->lineno);
00442                      } else {
00443                             zend_error(E_WARNING, "Missing argument %ld for %s%s%s()", opline->op1.u.constant.value.lval, class_name, space, get_active_function_name(TSRMLS_C));
00444                      }
00445               }
00446               if (opline->result.op_type == IS_VAR) {
00447                      PZVAL_UNLOCK_FREE(*EX_T(opline->result.u.var).var.ptr_ptr);
00448               }
00449        } else {
00450               zend_free_op free_res;
00451               zval **var_ptr;
00452 
00453               zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, *param, opline->extended_value TSRMLS_CC);
00454               var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);
00455               Z_DELREF_PP(var_ptr);
00456               *var_ptr = *param;
00457               Z_ADDREF_PP(var_ptr);
00458        }
00459 
00460        ZEND_VM_NEXT_OPCODE();
00461 }
00462 
00463 static int ZEND_FASTCALL  ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00464 {
00465        zend_op *opline = EX(opline);
00466        zval *object_zval;
00467        zend_function *constructor;
00468 
00469        if (EX_T(opline->op1.u.var).class_entry->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
00470               char *class_type;
00471 
00472               if (EX_T(opline->op1.u.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) {
00473                      class_type = "interface";
00474               } else {
00475                      class_type = "abstract class";
00476               }
00477               zend_error_noreturn(E_ERROR, "Cannot instantiate %s %s", class_type,  EX_T(opline->op1.u.var).class_entry->name);
00478        }
00479        ALLOC_ZVAL(object_zval);
00480        object_init_ex(object_zval, EX_T(opline->op1.u.var).class_entry);
00481        INIT_PZVAL(object_zval);
00482 
00483        constructor = Z_OBJ_HT_P(object_zval)->get_constructor(object_zval TSRMLS_CC);
00484 
00485        if (constructor == NULL) {
00486               if (RETURN_VALUE_USED(opline)) {
00487                      AI_SET_PTR(EX_T(opline->result.u.var).var, object_zval);
00488               } else {
00489                      zval_ptr_dtor(&object_zval);
00490               }
00491               ZEND_VM_JMP(EX(op_array)->opcodes + opline->op2.u.opline_num);
00492        } else {
00493               if (RETURN_VALUE_USED(opline)) {
00494                      AI_SET_PTR(EX_T(opline->result.u.var).var, object_zval);
00495                      PZVAL_LOCK(object_zval);
00496               }
00497 
00498               zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), ENCODE_CTOR(EX(called_scope), RETURN_VALUE_USED(opline)));
00499 
00500               /* We are not handling overloaded classes right now */
00501               EX(object) = object_zval;
00502               EX(fbc) = constructor;
00503               EX(called_scope) = EX_T(opline->op1.u.var).class_entry;
00504 
00505               ZEND_VM_NEXT_OPCODE();
00506        }
00507 }
00508 
00509 static int ZEND_FASTCALL  ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00510 {
00511        zend_op *opline = EX(opline);
00512 
00513        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = EG(error_reporting);
00514        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;  /* shouldn't be necessary */
00515        if (EX(old_error_reporting) == NULL) {
00516               EX(old_error_reporting) = &EX_T(opline->result.u.var).tmp_var;
00517        }
00518 
00519        if (EG(error_reporting)) {
00520               zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC);
00521        }
00522        ZEND_VM_NEXT_OPCODE();
00523 }
00524 
00525 static int ZEND_FASTCALL  ZEND_RAISE_ABSTRACT_ERROR_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00526 {
00527        zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EG(scope)->name, EX(op_array)->function_name);
00528        ZEND_VM_NEXT_OPCODE(); /* Never reached */
00529 }
00530 
00531 static int ZEND_FASTCALL  ZEND_EXT_STMT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00532 {
00533        if (!EG(no_extensions)) {
00534               zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, EX(op_array) TSRMLS_CC);
00535        }
00536        ZEND_VM_NEXT_OPCODE();
00537 }
00538 
00539 static int ZEND_FASTCALL  ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00540 {
00541        if (!EG(no_extensions)) {
00542               zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, EX(op_array) TSRMLS_CC);
00543        }
00544        ZEND_VM_NEXT_OPCODE();
00545 }
00546 
00547 static int ZEND_FASTCALL  ZEND_EXT_FCALL_END_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00548 {
00549        if (!EG(no_extensions)) {
00550               zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, EX(op_array) TSRMLS_CC);
00551        }
00552        ZEND_VM_NEXT_OPCODE();
00553 }
00554 
00555 static int ZEND_FASTCALL  ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00556 {
00557        zend_op *opline = EX(opline);
00558 
00559        EX_T(opline->result.u.var).class_entry = do_bind_class(opline, EG(class_table), 0 TSRMLS_CC);
00560        ZEND_VM_NEXT_OPCODE();
00561 }
00562 
00563 static int ZEND_FASTCALL  ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00564 {
00565        zend_op *opline = EX(opline);
00566 
00567        EX_T(opline->result.u.var).class_entry = do_bind_inherited_class(opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
00568        ZEND_VM_NEXT_OPCODE();
00569 }
00570 
00571 static int ZEND_FASTCALL  ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00572 {
00573        zend_op *opline = EX(opline);
00574        zend_class_entry **pce, **pce_orig;
00575 
00576        if (zend_hash_find(EG(class_table), Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void**)&pce) == FAILURE ||
00577            (zend_hash_find(EG(class_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), (void**)&pce_orig) == SUCCESS &&
00578             *pce != *pce_orig)) {
00579               do_bind_inherited_class(opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
00580        }
00581        ZEND_VM_NEXT_OPCODE();
00582 }
00583 
00584 static int ZEND_FASTCALL  ZEND_DECLARE_FUNCTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00585 {
00586        do_bind_function(EX(opline), EG(function_table), 0);
00587        ZEND_VM_NEXT_OPCODE();
00588 }
00589 
00590 static int ZEND_FASTCALL  ZEND_EXT_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00591 {
00592        ZEND_VM_NEXT_OPCODE();
00593 }
00594 
00595 static int ZEND_FASTCALL  ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00596 {
00597        ZEND_VM_NEXT_OPCODE();
00598 }
00599 
00600 static int ZEND_FASTCALL  ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00601 {
00602        zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes;
00603        int i;
00604        zend_uint catch_op_num;
00605        int catched = 0;
00606        zval restored_error_reporting;
00607 
00608        void **stack_frame = (void**)(((char*)EX(Ts)) +
00609               (ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T));
00610 
00611        while (zend_vm_stack_top(TSRMLS_C) != stack_frame) {
00612               zval *stack_zval_p = zend_vm_stack_pop(TSRMLS_C);
00613               zval_ptr_dtor(&stack_zval_p);
00614        }
00615 
00616        for (i=0; i<EG(active_op_array)->last_try_catch; i++) {
00617               if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
00618                      /* further blocks will not be relevant... */
00619                      break;
00620               }
00621               if (op_num >= EG(active_op_array)->try_catch_array[i].try_op
00622                      && op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
00623                      catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
00624                      catched = 1;
00625               }
00626        }
00627 
00628        while (EX(fbc)) {
00629               EX(called_scope) = (zend_class_entry*)zend_ptr_stack_pop(&EG(arg_types_stack));
00630               if (EX(object)) {
00631                      if (IS_CTOR_CALL(EX(called_scope))) {
00632                             if (IS_CTOR_USED(EX(called_scope))) {
00633                                    Z_DELREF_P(EX(object));
00634                             }
00635                             if (Z_REFCOUNT_P(EX(object)) == 1) {
00636                                    zend_object_store_ctor_failed(EX(object) TSRMLS_CC);
00637                             }
00638                      }
00639                      zval_ptr_dtor(&EX(object));
00640               }
00641               EX(called_scope) = DECODE_CTOR(EX(called_scope));
00642               zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
00643        }
00644 
00645        for (i=0; i<EX(op_array)->last_brk_cont; i++) {
00646               if (EX(op_array)->brk_cont_array[i].start < 0) {
00647                      continue;
00648               } else if (EX(op_array)->brk_cont_array[i].start > op_num) {
00649                      /* further blocks will not be relevant... */
00650                      break;
00651               } else if (op_num < EX(op_array)->brk_cont_array[i].brk) {
00652                      if (!catched ||
00653                          catch_op_num >= EX(op_array)->brk_cont_array[i].brk) {
00654                             zend_op *brk_opline = &EX(op_array)->opcodes[EX(op_array)->brk_cont_array[i].brk];
00655 
00656                             switch (brk_opline->opcode) {
00657                                    case ZEND_SWITCH_FREE:
00658                                           if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
00659                                                  zend_switch_free(&EX_T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC);
00660                                           }
00661                                           break;
00662                                    case ZEND_FREE:
00663                                           if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
00664                                                  zendi_zval_dtor(EX_T(brk_opline->op1.u.var).tmp_var);
00665                                           }
00666                                           break;
00667                             }
00668                      }
00669               }
00670        }
00671 
00672        /* restore previous error_reporting value */
00673        if (!EG(error_reporting) && EX(old_error_reporting) != NULL && Z_LVAL_P(EX(old_error_reporting)) != 0) {
00674               Z_TYPE(restored_error_reporting) = IS_LONG;
00675               Z_LVAL(restored_error_reporting) = Z_LVAL_P(EX(old_error_reporting));
00676               convert_to_string(&restored_error_reporting);
00677               zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC);
00678               zendi_zval_dtor(restored_error_reporting);
00679        }
00680        EX(old_error_reporting) = NULL;
00681 
00682        if (!catched) {
00683               return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
00684        } else {
00685               ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
00686               ZEND_VM_CONTINUE();
00687        }
00688 }
00689 
00690 static int ZEND_FASTCALL  ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00691 {
00692        zend_verify_abstract_class(EX_T(EX(opline)->op1.u.var).class_entry TSRMLS_CC);
00693        ZEND_VM_NEXT_OPCODE();
00694 }
00695 
00696 static int ZEND_FASTCALL  ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00697 {
00698        int ret = zend_user_opcode_handlers[EX(opline)->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL);
00699 
00700        switch (ret) {
00701               case ZEND_USER_OPCODE_CONTINUE:
00702                      ZEND_VM_CONTINUE();
00703               case ZEND_USER_OPCODE_RETURN:
00704                      return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
00705               case ZEND_USER_OPCODE_ENTER:
00706                      ZEND_VM_ENTER();
00707               case ZEND_USER_OPCODE_LEAVE:
00708                      ZEND_VM_LEAVE();
00709               case ZEND_USER_OPCODE_DISPATCH:
00710                      ZEND_VM_DISPATCH(EX(opline)->opcode, EX(opline));
00711               default:
00712                      ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), EX(opline));
00713        }
00714 }
00715 
00716 static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00717 {
00718        zend_op *opline = EX(opline);
00719 
00720 
00721        if (IS_CONST == IS_UNUSED) {
00722               EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
00723               ZEND_VM_NEXT_OPCODE();
00724        } else {
00725 
00726               zval *class_name = &opline->op2.u.constant;
00727 
00728               if (IS_CONST != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
00729                      EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
00730               } else if (Z_TYPE_P(class_name) == IS_STRING) {
00731                      EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
00732               } else {
00733                      zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
00734               }
00735 
00736               ZEND_VM_NEXT_OPCODE();
00737        }
00738 }
00739 
00740 static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00741 {
00742        zend_op *opline = EX(opline);
00743        zval *function_name;
00744        char *function_name_strval, *lcname;
00745        int function_name_strlen;
00746 
00747 
00748        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
00749 
00750        if (IS_CONST == IS_CONST) {
00751               if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
00752                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
00753               }
00754        } else {
00755               function_name = &opline->op2.u.constant;
00756 
00757               if (IS_CONST != IS_CONST && IS_CONST != IS_TMP_VAR &&
00758                   Z_TYPE_P(function_name) == IS_OBJECT &&
00759                      Z_OBJ_HANDLER_P(function_name, get_closure) &&
00760                      Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
00761                      if (EX(object)) {
00762                             Z_ADDREF_P(EX(object));
00763                      }
00764                      if (IS_CONST == IS_VAR && 0 &&
00765                          EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
00766                             /* Delay closure destruction until its invocation */
00767                             EX(fbc)->common.prototype = (zend_function*)function_name;
00768                      } else {
00769 
00770                      }
00771                      ZEND_VM_NEXT_OPCODE();
00772               }
00773 
00774               if (Z_TYPE_P(function_name) != IS_STRING) {
00775                      zend_error_noreturn(E_ERROR, "Function name must be a string");
00776               }
00777               function_name_strval = Z_STRVAL_P(function_name);
00778               function_name_strlen = Z_STRLEN_P(function_name);
00779               if (function_name_strval[0] == '\\') {
00780 
00781                   function_name_strlen -= 1;
00782                      lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
00783               } else {
00784                      lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
00785               }
00786               if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
00787                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
00788               }
00789               efree(lcname);
00790 
00791        }
00792 
00793        EX(object) = NULL;
00794        ZEND_VM_NEXT_OPCODE();
00795 }
00796 
00797 
00798 static int ZEND_FASTCALL  ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00799 {
00800        zend_op *opline = EX(opline);
00801        zend_op *op_data = opline + 1;
00802 
00803        ZEND_VM_INC_OPCODE();
00804        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
00805 
00806        if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc))==FAILURE) {
00807               char *short_name = Z_STRVAL(opline->op1.u.constant)+Z_LVAL(op_data->op1.u.constant);
00808               if (zend_hash_quick_find(EG(function_table), short_name, Z_STRLEN(opline->op1.u.constant)-Z_LVAL(op_data->op1.u.constant)+1, op_data->extended_value, (void **) &EX(fbc))==FAILURE) {
00809                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
00810               }
00811        }
00812 
00813        EX(object) = NULL;
00814        ZEND_VM_NEXT_OPCODE();
00815 }
00816 
00817 static int ZEND_FASTCALL  ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00818 {
00819        zend_op *opline = EX(opline);
00820        zval *assignment_value;
00821        zend_uint arg_num = Z_LVAL(opline->op1.u.constant);
00822        zend_free_op free_res;
00823        zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
00824        zval **var_ptr;
00825 
00826        if (param == NULL) {
00827               ALLOC_ZVAL(assignment_value);
00828               *assignment_value = opline->op2.u.constant;
00829               if ((Z_TYPE(opline->op2.u.constant) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE(opline->op2.u.constant)==IS_CONSTANT_ARRAY) {
00830                      Z_SET_REFCOUNT_P(assignment_value, 1);
00831                      zval_update_constant(&assignment_value, 0 TSRMLS_CC);
00832               } else {
00833                      zval_copy_ctor(assignment_value);
00834               }
00835               INIT_PZVAL(assignment_value);
00836        } else {
00837               assignment_value = *param;
00838               Z_ADDREF_P(assignment_value);
00839        }
00840 
00841        zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
00842        var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);
00843        Z_DELREF_PP(var_ptr);
00844        *var_ptr = assignment_value;
00845 
00846        ZEND_VM_NEXT_OPCODE();
00847 }
00848 
00849 static int ZEND_FASTCALL  ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00850 {
00851        zend_op *opline = EX(opline);
00852 
00853        zend_brk_cont_element *el;
00854 
00855        el = zend_brk_cont(&opline->op2.u.constant, opline->op1.u.opline_num,
00856                           EX(op_array), EX(Ts) TSRMLS_CC);
00857 
00858        ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
00859 }
00860 
00861 static int ZEND_FASTCALL  ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00862 {
00863        zend_op *opline = EX(opline);
00864 
00865        zend_brk_cont_element *el;
00866 
00867        el = zend_brk_cont(&opline->op2.u.constant, opline->op1.u.opline_num,
00868                           EX(op_array), EX(Ts) TSRMLS_CC);
00869 
00870        ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
00871 }
00872 
00873 static int ZEND_FASTCALL  ZEND_GOTO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00874 {
00875        zend_op *brk_opline;
00876        zend_op *opline = EX(opline);
00877        zend_brk_cont_element *el;
00878 
00879        el = zend_brk_cont(&opline->op2.u.constant, opline->extended_value,
00880                           EX(op_array), EX(Ts) TSRMLS_CC);
00881 
00882        brk_opline = EX(op_array)->opcodes + el->brk;
00883 
00884        switch (brk_opline->opcode) {
00885               case ZEND_SWITCH_FREE:
00886                      if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
00887                             zend_switch_free(&EX_T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC);
00888                      }
00889                      break;
00890               case ZEND_FREE:
00891                      if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
00892                             zendi_zval_dtor(EX_T(brk_opline->op1.u.var).tmp_var);
00893                      }
00894                      break;
00895        }
00896        ZEND_VM_JMP(opline->op1.u.jmp_addr);
00897 }
00898 
00899 static int ZEND_FASTCALL  ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00900 {
00901        zend_op *opline = EX(opline);
00902        zend_class_entry *ce = EX_T(opline->op1.u.var).class_entry;
00903        zend_class_entry *iface = zend_fetch_class(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), opline->extended_value TSRMLS_CC);
00904 
00905        if (iface) {
00906               if (!(iface->ce_flags & ZEND_ACC_INTERFACE)) {
00907                      zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ce->name, iface->name);
00908               }
00909               zend_do_implement_interface(ce, iface TSRMLS_CC);
00910        }
00911 
00912        ZEND_VM_NEXT_OPCODE();
00913 }
00914 
00915 static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00916 {
00917        zend_op *opline = EX(opline);
00918 
00919 
00920        if (IS_TMP_VAR == IS_UNUSED) {
00921               EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
00922               ZEND_VM_NEXT_OPCODE();
00923        } else {
00924               zend_free_op free_op2;
00925               zval *class_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
00926 
00927               if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
00928                      EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
00929               } else if (Z_TYPE_P(class_name) == IS_STRING) {
00930                      EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
00931               } else {
00932                      zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
00933               }
00934 
00935               zval_dtor(free_op2.var);
00936               ZEND_VM_NEXT_OPCODE();
00937        }
00938 }
00939 
00940 static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00941 {
00942        zend_op *opline = EX(opline);
00943        zval *function_name;
00944        char *function_name_strval, *lcname;
00945        int function_name_strlen;
00946        zend_free_op free_op2;
00947 
00948        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
00949 
00950        if (IS_TMP_VAR == IS_CONST) {
00951               if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
00952                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
00953               }
00954        } else {
00955               function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
00956 
00957               if (IS_TMP_VAR != IS_CONST && IS_TMP_VAR != IS_TMP_VAR &&
00958                   Z_TYPE_P(function_name) == IS_OBJECT &&
00959                      Z_OBJ_HANDLER_P(function_name, get_closure) &&
00960                      Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
00961                      if (EX(object)) {
00962                             Z_ADDREF_P(EX(object));
00963                      }
00964                      if (IS_TMP_VAR == IS_VAR && 1 &&
00965                          EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
00966                             /* Delay closure destruction until its invocation */
00967                             EX(fbc)->common.prototype = (zend_function*)function_name;
00968                      } else {
00969                             zval_dtor(free_op2.var);
00970                      }
00971                      ZEND_VM_NEXT_OPCODE();
00972               }
00973 
00974               if (Z_TYPE_P(function_name) != IS_STRING) {
00975                      zend_error_noreturn(E_ERROR, "Function name must be a string");
00976               }
00977               function_name_strval = Z_STRVAL_P(function_name);
00978               function_name_strlen = Z_STRLEN_P(function_name);
00979               if (function_name_strval[0] == '\\') {
00980 
00981                   function_name_strlen -= 1;
00982                      lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
00983               } else {
00984                      lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
00985               }
00986               if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
00987                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
00988               }
00989               efree(lcname);
00990               zval_dtor(free_op2.var);
00991        }
00992 
00993        EX(object) = NULL;
00994        ZEND_VM_NEXT_OPCODE();
00995 }
00996 
00997 
00998 static int ZEND_FASTCALL  ZEND_BRK_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
00999 {
01000        zend_op *opline = EX(opline);
01001        zend_free_op free_op2;
01002        zend_brk_cont_element *el;
01003 
01004        el = zend_brk_cont(_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num,
01005                           EX(op_array), EX(Ts) TSRMLS_CC);
01006        zval_dtor(free_op2.var);
01007        ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
01008 }
01009 
01010 static int ZEND_FASTCALL  ZEND_CONT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01011 {
01012        zend_op *opline = EX(opline);
01013        zend_free_op free_op2;
01014        zend_brk_cont_element *el;
01015 
01016        el = zend_brk_cont(_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num,
01017                           EX(op_array), EX(Ts) TSRMLS_CC);
01018        zval_dtor(free_op2.var);
01019        ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
01020 }
01021 
01022 static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01023 {
01024        zend_op *opline = EX(opline);
01025 
01026 
01027        if (IS_VAR == IS_UNUSED) {
01028               EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
01029               ZEND_VM_NEXT_OPCODE();
01030        } else {
01031               zend_free_op free_op2;
01032               zval *class_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
01033 
01034               if (IS_VAR != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
01035                      EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
01036               } else if (Z_TYPE_P(class_name) == IS_STRING) {
01037                      EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
01038               } else {
01039                      zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
01040               }
01041 
01042               if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
01043               ZEND_VM_NEXT_OPCODE();
01044        }
01045 }
01046 
01047 static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01048 {
01049        zend_op *opline = EX(opline);
01050        zval *function_name;
01051        char *function_name_strval, *lcname;
01052        int function_name_strlen;
01053        zend_free_op free_op2;
01054 
01055        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
01056 
01057        if (IS_VAR == IS_CONST) {
01058               if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
01059                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
01060               }
01061        } else {
01062               function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
01063 
01064               if (IS_VAR != IS_CONST && IS_VAR != IS_TMP_VAR &&
01065                   Z_TYPE_P(function_name) == IS_OBJECT &&
01066                      Z_OBJ_HANDLER_P(function_name, get_closure) &&
01067                      Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
01068                      if (EX(object)) {
01069                             Z_ADDREF_P(EX(object));
01070                      }
01071                      if (IS_VAR == IS_VAR && (free_op2.var != NULL) &&
01072                          EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
01073                             /* Delay closure destruction until its invocation */
01074                             EX(fbc)->common.prototype = (zend_function*)function_name;
01075                      } else {
01076                             if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
01077                      }
01078                      ZEND_VM_NEXT_OPCODE();
01079               }
01080 
01081               if (Z_TYPE_P(function_name) != IS_STRING) {
01082                      zend_error_noreturn(E_ERROR, "Function name must be a string");
01083               }
01084               function_name_strval = Z_STRVAL_P(function_name);
01085               function_name_strlen = Z_STRLEN_P(function_name);
01086               if (function_name_strval[0] == '\\') {
01087 
01088                   function_name_strlen -= 1;
01089                      lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
01090               } else {
01091                      lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
01092               }
01093               if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
01094                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
01095               }
01096               efree(lcname);
01097               if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
01098        }
01099 
01100        EX(object) = NULL;
01101        ZEND_VM_NEXT_OPCODE();
01102 }
01103 
01104 
01105 static int ZEND_FASTCALL  ZEND_BRK_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01106 {
01107        zend_op *opline = EX(opline);
01108        zend_free_op free_op2;
01109        zend_brk_cont_element *el;
01110 
01111        el = zend_brk_cont(_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num,
01112                           EX(op_array), EX(Ts) TSRMLS_CC);
01113        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
01114        ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
01115 }
01116 
01117 static int ZEND_FASTCALL  ZEND_CONT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01118 {
01119        zend_op *opline = EX(opline);
01120        zend_free_op free_op2;
01121        zend_brk_cont_element *el;
01122 
01123        el = zend_brk_cont(_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num,
01124                           EX(op_array), EX(Ts) TSRMLS_CC);
01125        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
01126        ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
01127 }
01128 
01129 static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01130 {
01131        zend_op *opline = EX(opline);
01132 
01133 
01134        if (IS_UNUSED == IS_UNUSED) {
01135               EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
01136               ZEND_VM_NEXT_OPCODE();
01137        } else {
01138 
01139               zval *class_name = NULL;
01140 
01141               if (IS_UNUSED != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
01142                      EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
01143               } else if (Z_TYPE_P(class_name) == IS_STRING) {
01144                      EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
01145               } else {
01146                      zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
01147               }
01148 
01149               ZEND_VM_NEXT_OPCODE();
01150        }
01151 }
01152 
01153 static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01154 {
01155        zend_op *opline = EX(opline);
01156 
01157 
01158        if (IS_CV == IS_UNUSED) {
01159               EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
01160               ZEND_VM_NEXT_OPCODE();
01161        } else {
01162 
01163               zval *class_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
01164 
01165               if (IS_CV != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
01166                      EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
01167               } else if (Z_TYPE_P(class_name) == IS_STRING) {
01168                      EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
01169               } else {
01170                      zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
01171               }
01172 
01173               ZEND_VM_NEXT_OPCODE();
01174        }
01175 }
01176 
01177 static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01178 {
01179        zend_op *opline = EX(opline);
01180        zval *function_name;
01181        char *function_name_strval, *lcname;
01182        int function_name_strlen;
01183 
01184 
01185        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
01186 
01187        if (IS_CV == IS_CONST) {
01188               if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
01189                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
01190               }
01191        } else {
01192               function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
01193 
01194               if (IS_CV != IS_CONST && IS_CV != IS_TMP_VAR &&
01195                   Z_TYPE_P(function_name) == IS_OBJECT &&
01196                      Z_OBJ_HANDLER_P(function_name, get_closure) &&
01197                      Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
01198                      if (EX(object)) {
01199                             Z_ADDREF_P(EX(object));
01200                      }
01201                      if (IS_CV == IS_VAR && 0 &&
01202                          EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
01203                             /* Delay closure destruction until its invocation */
01204                             EX(fbc)->common.prototype = (zend_function*)function_name;
01205                      } else {
01206 
01207                      }
01208                      ZEND_VM_NEXT_OPCODE();
01209               }
01210 
01211               if (Z_TYPE_P(function_name) != IS_STRING) {
01212                      zend_error_noreturn(E_ERROR, "Function name must be a string");
01213               }
01214               function_name_strval = Z_STRVAL_P(function_name);
01215               function_name_strlen = Z_STRLEN_P(function_name);
01216               if (function_name_strval[0] == '\\') {
01217 
01218                   function_name_strlen -= 1;
01219                      lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
01220               } else {
01221                      lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
01222               }
01223               if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
01224                      zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
01225               }
01226               efree(lcname);
01227 
01228        }
01229 
01230        EX(object) = NULL;
01231        ZEND_VM_NEXT_OPCODE();
01232 }
01233 
01234 
01235 static int ZEND_FASTCALL  ZEND_CATCH_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01236 {
01237        zend_op *opline = EX(opline);
01238        zend_class_entry *ce;
01239 
01240        /* Check whether an exception has been thrown, if not, jump over code */
01241        zend_exception_restore(TSRMLS_C);
01242        if (EG(exception) == NULL) {
01243               ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
01244               ZEND_VM_CONTINUE(); /* CHECK_ME */
01245        }
01246        ce = Z_OBJCE_P(EG(exception));
01247        if (ce != EX_T(opline->op1.u.var).class_entry) {
01248               if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) {
01249                      if (opline->op1.u.EA.type) {
01250                             zend_throw_exception_internal(NULL TSRMLS_CC);
01251                             ZEND_VM_NEXT_OPCODE();
01252                      }
01253                      ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
01254                      ZEND_VM_CONTINUE(); /* CHECK_ME */
01255               }
01256        }
01257 
01258        if (!EG(active_symbol_table)) {
01259               if (EX(CVs)[opline->op2.u.var]) {
01260                      zval_ptr_dtor(EX(CVs)[opline->op2.u.var]);
01261               }
01262               EX(CVs)[opline->op2.u.var] = (zval**)EX(CVs) + (EX(op_array)->last_var + opline->op2.u.var);
01263               *EX(CVs)[opline->op2.u.var] = EG(exception);
01264        } else {
01265               zend_compiled_variable *cv = &CV_DEF_OF(opline->op2.u.var);
01266               zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value,
01267                   &EG(exception), sizeof(zval *), (void**)&EX(CVs)[opline->op2.u.var]);
01268        }
01269        EG(exception) = NULL;
01270        ZEND_VM_NEXT_OPCODE();
01271 }
01272 
01273 static int ZEND_FASTCALL  ZEND_BRK_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01274 {
01275        zend_op *opline = EX(opline);
01276 
01277        zend_brk_cont_element *el;
01278 
01279        el = zend_brk_cont(_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC), opline->op1.u.opline_num,
01280                           EX(op_array), EX(Ts) TSRMLS_CC);
01281 
01282        ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
01283 }
01284 
01285 static int ZEND_FASTCALL  ZEND_CONT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01286 {
01287        zend_op *opline = EX(opline);
01288 
01289        zend_brk_cont_element *el;
01290 
01291        el = zend_brk_cont(_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC), opline->op1.u.opline_num,
01292                           EX(op_array), EX(Ts) TSRMLS_CC);
01293 
01294        ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
01295 }
01296 
01297 static int ZEND_FASTCALL  ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01298 {
01299        zend_op *opline = EX(opline);
01300 
01301 
01302        bitwise_not_function(&EX_T(opline->result.u.var).tmp_var,
01303               &opline->op1.u.constant TSRMLS_CC);
01304 
01305        ZEND_VM_NEXT_OPCODE();
01306 }
01307 
01308 static int ZEND_FASTCALL  ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01309 {
01310        zend_op *opline = EX(opline);
01311 
01312 
01313        boolean_not_function(&EX_T(opline->result.u.var).tmp_var,
01314               &opline->op1.u.constant TSRMLS_CC);
01315 
01316        ZEND_VM_NEXT_OPCODE();
01317 }
01318 
01319 static int ZEND_FASTCALL  ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01320 {
01321        zend_op *opline = EX(opline);
01322 
01323        zval z_copy;
01324        zval *z = &opline->op1.u.constant;
01325 
01326        if (IS_CONST != IS_CONST &&
01327            Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) {
01328            if (IS_CONST == IS_TMP_VAR) {
01329               INIT_PZVAL(z);
01330            }
01331               if (zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) {
01332                      zend_print_variable(&z_copy);
01333                      zval_dtor(&z_copy);
01334               } else {
01335                      zend_print_variable(z);
01336               }
01337        } else {
01338               zend_print_variable(z);
01339        }
01340 
01341        ZEND_VM_NEXT_OPCODE();
01342 }
01343 
01344 static int ZEND_FASTCALL  ZEND_PRINT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01345 {
01346        zend_op *opline = EX(opline);
01347 
01348        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
01349        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;
01350 
01351        return ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01352 }
01353 
01354 static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
01355 {
01356        zend_op *opline = EX(opline);
01357        zend_free_op free_op1;
01358        zval *varname = &opline->op1.u.constant;
01359        zval **retval;
01360        zval tmp_varname;
01361        HashTable *target_symbol_table;
01362 
01363        if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
01364               tmp_varname = *varname;
01365               zval_copy_ctor(&tmp_varname);
01366               convert_to_string(&tmp_varname);
01367               varname = &tmp_varname;
01368        }
01369 
01370        if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
01371               retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
01372 
01373        } else {
01374               target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
01375 /*
01376               if (!target_symbol_table) {
01377                      ZEND_VM_NEXT_OPCODE();
01378               }
01379 */
01380               if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
01381                      switch (type) {
01382                             case BP_VAR_R:
01383                             case BP_VAR_UNSET:
01384                                    zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
01385                                    /* break missing intentionally */
01386                             case BP_VAR_IS:
01387                                    retval = &EG(uninitialized_zval_ptr);
01388                                    break;
01389                             case BP_VAR_RW:
01390                                    zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
01391                                    /* break missing intentionally */
01392                             case BP_VAR_W: {
01393                                           zval *new_zval = &EG(uninitialized_zval);
01394 
01395                                           Z_ADDREF_P(new_zval);
01396                                           zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
01397                                    }
01398                                    break;
01399                             EMPTY_SWITCH_DEFAULT_CASE()
01400                      }
01401               }
01402               switch (opline->op2.u.EA.type) {
01403                      case ZEND_FETCH_GLOBAL:
01404                             if (IS_CONST != IS_TMP_VAR) {
01405 
01406                             }
01407                             break;
01408                      case ZEND_FETCH_LOCAL:
01409 
01410                             break;
01411                      case ZEND_FETCH_STATIC:
01412                             zval_update_constant(retval, (void*) 1 TSRMLS_CC);
01413                             break;
01414                      case ZEND_FETCH_GLOBAL_LOCK:
01415                             if (IS_CONST == IS_VAR && !free_op1.var) {
01416                                    PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
01417                             }
01418                             break;
01419               }
01420        }
01421 
01422 
01423        if (IS_CONST != IS_CONST && varname == &tmp_varname) {
01424               zval_dtor(varname);
01425        }
01426        if (!RETURN_VALUE_UNUSED(&opline->result)) {
01427               if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
01428                      SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
01429               }
01430               PZVAL_LOCK(*retval);
01431               switch (type) {
01432                      case BP_VAR_R:
01433                      case BP_VAR_IS:
01434                             AI_SET_PTR(EX_T(opline->result.u.var).var, *retval);
01435                             break;
01436                      case BP_VAR_UNSET: {
01437                             zend_free_op free_res;
01438 
01439                             EX_T(opline->result.u.var).var.ptr_ptr = retval;
01440                             PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
01441                             if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
01442                                    SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
01443                             }
01444                             PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
01445                             FREE_OP_VAR_PTR(free_res);
01446                             break;
01447                      default:
01448                             EX_T(opline->result.u.var).var.ptr_ptr = retval;
01449                             break;
01450                      }
01451               }
01452        }
01453        ZEND_VM_NEXT_OPCODE();
01454 }
01455 
01456 static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01457 {
01458        return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01459 }
01460 
01461 static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01462 {
01463        return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01464 }
01465 
01466 static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01467 {
01468        return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01469 }
01470 
01471 static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01472 {
01473        return zend_fetch_var_address_helper_SPEC_CONST(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01474 }
01475 
01476 static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01477 {
01478        return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01479 }
01480 
01481 static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01482 {
01483        return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01484 }
01485 
01486 static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01487 {
01488        zend_op *opline = EX(opline);
01489 
01490        zval *val = &opline->op1.u.constant;
01491        int ret;
01492 
01493        if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
01494               ret = Z_LVAL_P(val);
01495        } else {
01496               ret = i_zend_is_true(val);
01497 
01498               if (UNEXPECTED(EG(exception) != NULL)) {
01499                      ZEND_VM_CONTINUE();
01500               }
01501        }
01502        if (!ret) {
01503 #if DEBUG_ZEND>=2
01504               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
01505 #endif
01506               ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
01507               ZEND_VM_CONTINUE();
01508        }
01509 
01510        ZEND_VM_NEXT_OPCODE();
01511 }
01512 
01513 static int ZEND_FASTCALL  ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01514 {
01515        zend_op *opline = EX(opline);
01516 
01517        zval *val = &opline->op1.u.constant;
01518        int ret;
01519 
01520        if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
01521               ret = Z_LVAL_P(val);
01522        } else {
01523               ret = i_zend_is_true(val);
01524 
01525               if (UNEXPECTED(EG(exception) != NULL)) {
01526                      ZEND_VM_CONTINUE();
01527               }
01528        }
01529        if (ret) {
01530 #if DEBUG_ZEND>=2
01531               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
01532 #endif
01533               ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
01534               ZEND_VM_CONTINUE();
01535        }
01536 
01537        ZEND_VM_NEXT_OPCODE();
01538 }
01539 
01540 static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01541 {
01542        zend_op *opline = EX(opline);
01543 
01544        zval *val = &opline->op1.u.constant;
01545        int retval;
01546 
01547        if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
01548               retval = Z_LVAL_P(val);
01549        } else {
01550               retval = i_zend_is_true(val);
01551 
01552               if (UNEXPECTED(EG(exception) != NULL)) {
01553                      ZEND_VM_CONTINUE();
01554               }
01555        }
01556        if (EXPECTED(retval != 0)) {
01557 #if DEBUG_ZEND>=2
01558               printf("Conditional jmp on true to %d\n", opline->extended_value);
01559 #endif
01560               ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
01561               ZEND_VM_CONTINUE(); /* CHECK_ME */
01562        } else {
01563 #if DEBUG_ZEND>=2
01564               printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
01565 #endif
01566               ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]);
01567               ZEND_VM_CONTINUE(); /* CHECK_ME */
01568        }
01569 }
01570 
01571 static int ZEND_FASTCALL  ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01572 {
01573        zend_op *opline = EX(opline);
01574 
01575        zval *val = &opline->op1.u.constant;
01576        int retval;
01577 
01578        if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
01579               retval = Z_LVAL_P(val);
01580        } else {
01581               retval = i_zend_is_true(val);
01582 
01583               if (UNEXPECTED(EG(exception) != NULL)) {
01584                      ZEND_VM_CONTINUE();
01585               }
01586        }
01587        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
01588        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
01589        if (!retval) {
01590 #if DEBUG_ZEND>=2
01591               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
01592 #endif
01593               ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
01594               ZEND_VM_CONTINUE();
01595        }
01596        ZEND_VM_NEXT_OPCODE();
01597 }
01598 
01599 static int ZEND_FASTCALL  ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01600 {
01601        zend_op *opline = EX(opline);
01602 
01603        zval *val = &opline->op1.u.constant;
01604        int retval;
01605 
01606        if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
01607               retval = Z_LVAL_P(val);
01608        } else {
01609               retval = i_zend_is_true(val);
01610 
01611               if (UNEXPECTED(EG(exception) != NULL)) {
01612                      ZEND_VM_CONTINUE();
01613               }
01614        }
01615        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
01616        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
01617        if (retval) {
01618 #if DEBUG_ZEND>=2
01619               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
01620 #endif
01621               ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
01622               ZEND_VM_CONTINUE();
01623        }
01624        ZEND_VM_NEXT_OPCODE();
01625 }
01626 
01627 static int ZEND_FASTCALL  ZEND_DO_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01628 {
01629        zend_op *opline = EX(opline);
01630 
01631        zval *fname = &opline->op1.u.constant;
01632 
01633        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
01634 
01635        if (zend_hash_quick_find(EG(function_table), fname->value.str.val, fname->value.str.len+1, Z_LVAL(opline->op2.u.constant), (void **) &EX(function_state).function)==FAILURE) {
01636               zend_error_noreturn(E_ERROR, "Call to undefined function %s()", fname->value.str.val);
01637        }
01638        EX(object) = NULL;
01639 
01640        return zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01641 }
01642 
01643 static int ZEND_FASTCALL  ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01644 {
01645        zend_op *opline = EX(opline);
01646        zval *retval_ptr;
01647        zval **retval_ptr_ptr;
01648 
01649 
01650        if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) {
01651 
01652               if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
01653                      /* Not supposed to happen, but we'll allow it */
01654                      zend_error(E_NOTICE, "Only variable references should be returned by reference");
01655                      goto return_by_value;
01656               }
01657 
01658               retval_ptr_ptr = NULL;
01659 
01660               if (IS_CONST == IS_VAR && !retval_ptr_ptr) {
01661                      zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
01662               }
01663 
01664               if (IS_CONST == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
01665                      if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
01666                          EX_T(opline->op1.u.var).var.fcall_returned_reference) {
01667                      } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
01668                             if (IS_CONST == IS_VAR && !0) {
01669                                    PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
01670                             }
01671                             zend_error(E_NOTICE, "Only variable references should be returned by reference");
01672                             goto return_by_value;
01673                      }
01674               }
01675 
01676               if (EG(return_value_ptr_ptr)) {
01677                      SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
01678                      Z_ADDREF_PP(retval_ptr_ptr);
01679 
01680                      (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
01681               }
01682        } else {
01683 return_by_value:
01684 
01685               retval_ptr = &opline->op1.u.constant;
01686 
01687               if (!EG(return_value_ptr_ptr)) {
01688                      if (IS_CONST == IS_TMP_VAR) {
01689 
01690                      }
01691               } else if (!0) { /* Not a temp var */
01692                      if (IS_CONST == IS_CONST ||
01693                          EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
01694                          (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
01695                             zval *ret;
01696 
01697                             ALLOC_ZVAL(ret);
01698                             INIT_PZVAL_COPY(ret, retval_ptr);
01699                             zval_copy_ctor(ret);
01700                             *EG(return_value_ptr_ptr) = ret;
01701                      } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
01702                                 retval_ptr == &EG(uninitialized_zval)) {
01703                             zval *ret;
01704 
01705                             ALLOC_INIT_ZVAL(ret);
01706                             *EG(return_value_ptr_ptr) = ret;
01707                      } else {
01708                             *EG(return_value_ptr_ptr) = retval_ptr;
01709                             Z_ADDREF_P(retval_ptr);
01710                      }
01711               } else {
01712                      zval *ret;
01713 
01714                      ALLOC_ZVAL(ret);
01715                      INIT_PZVAL_COPY(ret, retval_ptr);
01716                      *EG(return_value_ptr_ptr) = ret;
01717               }
01718        }
01719 
01720        return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
01721 }
01722 
01723 static int ZEND_FASTCALL  ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01724 {
01725        zend_op *opline = EX(opline);
01726        zval *value;
01727        zval *exception;
01728 
01729 
01730        value = &opline->op1.u.constant;
01731 
01732        if (IS_CONST == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) {
01733               zend_error_noreturn(E_ERROR, "Can only throw objects");
01734        }
01735        zend_exception_save(TSRMLS_C);
01736        /* Not sure if a complete copy is what we want here */
01737        ALLOC_ZVAL(exception);
01738        INIT_PZVAL_COPY(exception, value);
01739        if (!0) {
01740               zval_copy_ctor(exception);
01741        }
01742 
01743        zend_throw_exception_object(exception TSRMLS_CC);
01744        zend_exception_restore(TSRMLS_C);
01745 
01746        ZEND_VM_NEXT_OPCODE();
01747 }
01748 
01749 static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01750 {
01751        zend_op *opline = EX(opline);
01752        if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
01753               && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
01754                      zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num);
01755        }
01756        {
01757               zval *valptr;
01758               zval *value;
01759 
01760 
01761               value = &opline->op1.u.constant;
01762 
01763               ALLOC_ZVAL(valptr);
01764               INIT_PZVAL_COPY(valptr, value);
01765               if (!0) {
01766                      zval_copy_ctor(valptr);
01767               }
01768               zend_vm_stack_push(valptr TSRMLS_CC);
01769 
01770        }
01771        ZEND_VM_NEXT_OPCODE();
01772 }
01773 
01774 static int ZEND_FASTCALL  ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01775 {
01776        zend_op *opline = EX(opline);
01777 
01778 
01779        /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
01780        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(&opline->op1.u.constant);
01781        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
01782 
01783        ZEND_VM_NEXT_OPCODE();
01784 }
01785 
01786 static int ZEND_FASTCALL  ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01787 {
01788        zend_op *opline = EX(opline);
01789 
01790        zval *obj = &opline->op1.u.constant;
01791        zend_class_entry *ce;
01792        zend_function *clone;
01793        zend_object_clone_obj_t clone_call;
01794 
01795        if (IS_CONST == IS_CONST ||
01796            (IS_CONST == IS_VAR && !obj) ||
01797            Z_TYPE_P(obj) != IS_OBJECT) {
01798               zend_error_noreturn(E_ERROR, "__clone method called on non-object");
01799        }
01800 
01801        ce = Z_OBJCE_P(obj);
01802        clone = ce ? ce->clone : NULL;
01803        clone_call =  Z_OBJ_HT_P(obj)->clone_obj;
01804        if (!clone_call) {
01805               if (ce) {
01806                      zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
01807               } else {
01808                      zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object");
01809               }
01810        }
01811 
01812        if (ce && clone) {
01813               if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
01814                      /* Ensure that if we're calling a private function, we're allowed to do so.
01815                       */
01816                      if (ce != EG(scope)) {
01817                             zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
01818                      }
01819               } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
01820                      /* Ensure that if we're calling a protected function, we're allowed to do so.
01821                       */
01822                      if (!zend_check_protected(clone->common.scope, EG(scope))) {
01823                             zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
01824                      }
01825               }
01826        }
01827 
01828        EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
01829        if (!EG(exception)) {
01830               ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
01831               Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC);
01832               Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT;
01833               Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
01834               Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
01835               if (!RETURN_VALUE_USED(opline) || EG(exception)) {
01836                      zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
01837               }
01838        }
01839 
01840        ZEND_VM_NEXT_OPCODE();
01841 }
01842 
01843 static int ZEND_FASTCALL  ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01844 {
01845        zend_op *opline = EX(opline);
01846 
01847        zval *expr = &opline->op1.u.constant;
01848        zval *result = &EX_T(opline->result.u.var).tmp_var;
01849 
01850        if (opline->extended_value != IS_STRING) {
01851               *result = *expr;
01852               if (!0) {
01853                      zendi_zval_copy_ctor(*result);
01854               }
01855        }
01856        switch (opline->extended_value) {
01857               case IS_NULL:
01858                      convert_to_null(result);
01859                      break;
01860               case IS_BOOL:
01861                      convert_to_boolean(result);
01862                      break;
01863               case IS_LONG:
01864                      convert_to_long(result);
01865                      break;
01866               case IS_DOUBLE:
01867                      convert_to_double(result);
01868                      break;
01869               case IS_STRING: {
01870                      zval var_copy;
01871                      int use_copy;
01872 
01873                      zend_make_printable_zval(expr, &var_copy, &use_copy);
01874                      if (use_copy) {
01875                             *result = var_copy;
01876                             if (0) {
01877 
01878                             }
01879                      } else {
01880                             *result = *expr;
01881                             if (!0) {
01882                                    zendi_zval_copy_ctor(*result);
01883                             }
01884                      }
01885                      break;
01886               }
01887               case IS_ARRAY:
01888                      convert_to_array(result);
01889                      break;
01890               case IS_OBJECT:
01891                      convert_to_object(result);
01892                      break;
01893        }
01894 
01895        ZEND_VM_NEXT_OPCODE();
01896 }
01897 
01898 static int ZEND_FASTCALL  ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
01899 {
01900        zend_op *opline = EX(opline);
01901        zend_op_array *new_op_array=NULL;
01902        int return_value_used;
01903 
01904        zval *inc_filename = &opline->op1.u.constant;
01905        zval tmp_inc_filename;
01906        zend_bool failure_retval=0;
01907 
01908        if (inc_filename->type!=IS_STRING) {
01909               tmp_inc_filename = *inc_filename;
01910               zval_copy_ctor(&tmp_inc_filename);
01911               convert_to_string(&tmp_inc_filename);
01912               inc_filename = &tmp_inc_filename;
01913        }
01914 
01915        return_value_used = RETURN_VALUE_USED(opline);
01916 
01917        if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
01918               if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
01919                      zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
01920               } else {
01921                      zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
01922               }
01923        } else {
01924               switch (Z_LVAL(opline->op2.u.constant)) {
01925                      case ZEND_INCLUDE_ONCE:
01926                      case ZEND_REQUIRE_ONCE: {
01927                                    zend_file_handle file_handle;
01928                                    char *resolved_path;
01929 
01930                                    resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
01931                                    if (resolved_path) {
01932                                           failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
01933                                    } else {
01934                                           resolved_path = Z_STRVAL_P(inc_filename);
01935                                    }
01936 
01937                                    if (failure_retval) {
01938                                           /* do nothing, file already included */
01939                                    } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
01940 
01941                                           if (!file_handle.opened_path) {
01942                                                  file_handle.opened_path = estrdup(resolved_path);
01943                                           }
01944 
01945                                           if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
01946                                                  new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
01947                                                  zend_destroy_file_handle(&file_handle TSRMLS_CC);
01948                                           } else {
01949                                                  zend_file_handle_dtor(&file_handle TSRMLS_CC);
01950                                                  failure_retval=1;
01951                                           }
01952                                    } else {
01953                                           if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
01954                                                  zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
01955                                           } else {
01956                                                  zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
01957                                           }
01958                                    }
01959                                    if (resolved_path != Z_STRVAL_P(inc_filename)) {
01960                                           efree(resolved_path);
01961                                    }
01962                             }
01963                             break;
01964                      case ZEND_INCLUDE:
01965                      case ZEND_REQUIRE:
01966                             new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
01967                             break;
01968                      case ZEND_EVAL: {
01969                                    char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
01970 
01971                                    new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
01972                                    efree(eval_desc);
01973                             }
01974                             break;
01975                      EMPTY_SWITCH_DEFAULT_CASE()
01976               }
01977        }
01978        if (inc_filename==&tmp_inc_filename) {
01979               zval_dtor(&tmp_inc_filename);
01980        }
01981 
01982        EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
01983        if (new_op_array && !EG(exception)) {
01984               EX(original_return_value) = EG(return_value_ptr_ptr);
01985               EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL;
01986               EG(active_op_array) = new_op_array;
01987               EX_T(opline->result.u.var).var.ptr = NULL;
01988 
01989               EX(current_object) = EX(object);
01990 
01991               EX(function_state).function = (zend_function *) new_op_array;
01992               EX(object) = NULL;
01993 
01994               if (!EG(active_symbol_table)) {
01995                      zend_rebuild_symbol_table(TSRMLS_C);
01996               }
01997 
01998               if (zend_execute == execute) {
01999                      EX(call_opline) = opline;
02000                      ZEND_VM_ENTER();
02001               } else {
02002                      zend_execute(new_op_array TSRMLS_CC);
02003               }
02004 
02005               EX(function_state).function = (zend_function *) EX(op_array);
02006               EX(object) = EX(current_object);
02007 
02008               if (return_value_used) {
02009                      if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */
02010                             ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
02011                             INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
02012                             Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1;
02013                             Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
02014                      }
02015               }
02016 
02017               EG(opline_ptr) = &EX(opline);
02018               EG(active_op_array) = EX(op_array);
02019               EG(return_value_ptr_ptr) = EX(original_return_value);
02020               destroy_op_array(new_op_array TSRMLS_CC);
02021               efree(new_op_array);
02022               if (EG(exception)) {
02023                      zend_throw_exception_internal(NULL TSRMLS_CC);
02024               }
02025        } else {
02026               if (return_value_used) {
02027                      ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
02028                      INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr);
02029                      Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval;
02030                      Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
02031               }
02032        }
02033        ZEND_VM_NEXT_OPCODE();
02034 }
02035 
02036 static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02037 {
02038        zend_op *opline = EX(opline);
02039        zval tmp, *varname;
02040        HashTable *target_symbol_table;
02041 
02042 
02043        if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
02044               if (EG(active_symbol_table)) {
02045                      zend_execute_data *ex = EX(prev_execute_data);
02046                      zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
02047 
02048                      if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) {
02049                             while (ex && ex->symbol_table == EG(active_symbol_table)) {
02050                                    int i;
02051 
02052                                    if (ex->op_array) {
02053                                           for (i = 0; i < ex->op_array->last_var; i++) {
02054                                                  if (ex->op_array->vars[i].hash_value == cv->hash_value &&
02055                                                         ex->op_array->vars[i].name_len == cv->name_len &&
02056                                                         !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) {
02057                                                         ex->CVs[i] = NULL;
02058                                                         break;
02059                                                  }
02060                                           }
02061                                    }
02062                                    ex = ex->prev_execute_data;
02063                             }
02064                      }
02065                      EX(CVs)[opline->op1.u.var] = NULL;
02066               } else if (EX(CVs)[opline->op1.u.var]) {
02067                      zval_ptr_dtor(EX(CVs)[opline->op1.u.var]);
02068                      EX(CVs)[opline->op1.u.var] = NULL;
02069               }
02070               ZEND_VM_NEXT_OPCODE();
02071        }
02072 
02073        varname = &opline->op1.u.constant;
02074 
02075        if (Z_TYPE_P(varname) != IS_STRING) {
02076               tmp = *varname;
02077               zval_copy_ctor(&tmp);
02078               convert_to_string(&tmp);
02079               varname = &tmp;
02080        } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
02081               Z_ADDREF_P(varname);
02082        }
02083 
02084        if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
02085               zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC);
02086        } else {
02087               ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
02088 
02089               target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
02090               if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) {
02091                      zend_execute_data *ex = execute_data;
02092 
02093                      do {
02094                             int i;
02095 
02096                             if (ex->op_array) {
02097                                    for (i = 0; i < ex->op_array->last_var; i++) {
02098                                           if (ex->op_array->vars[i].hash_value == hash_value &&
02099                                                  ex->op_array->vars[i].name_len == varname->value.str.len &&
02100                                                  !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) {
02101                                                  ex->CVs[i] = NULL;
02102                                                  break;
02103                                           }
02104                                    }
02105                             }
02106                             ex = ex->prev_execute_data;
02107                      } while (ex && ex->symbol_table == target_symbol_table);
02108               }
02109        }
02110 
02111        if (varname == &tmp) {
02112               zval_dtor(&tmp);
02113        } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
02114               zval_ptr_dtor(&varname);
02115        }
02116 
02117        ZEND_VM_NEXT_OPCODE();
02118 }
02119 
02120 static int ZEND_FASTCALL  ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02121 {
02122        zend_op *opline = EX(opline);
02123 
02124        zval *array_ptr, **array_ptr_ptr;
02125        HashTable *fe_ht;
02126        zend_object_iterator *iter = NULL;
02127        zend_class_entry *ce = NULL;
02128        zend_bool is_empty = 0;
02129 
02130        if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
02131               array_ptr_ptr = NULL;
02132               if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
02133                      ALLOC_INIT_ZVAL(array_ptr);
02134               } else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
02135                      if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
02136                             zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
02137                             ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
02138                      }
02139 
02140                      ce = Z_OBJCE_PP(array_ptr_ptr);
02141                      if (!ce || ce->get_iterator == NULL) {
02142                             SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
02143                             Z_ADDREF_PP(array_ptr_ptr);
02144                      }
02145                      array_ptr = *array_ptr_ptr;
02146               } else {
02147                      if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
02148                             SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
02149                             if (opline->extended_value & ZEND_FE_FETCH_BYREF) {
02150                                    Z_SET_ISREF_PP(array_ptr_ptr);
02151                             }
02152                      }
02153                      array_ptr = *array_ptr_ptr;
02154                      Z_ADDREF_P(array_ptr);
02155               }
02156        } else {
02157               array_ptr = &opline->op1.u.constant;
02158               if (0) { /* IS_TMP_VAR */
02159                      zval *tmp;
02160 
02161                      ALLOC_ZVAL(tmp);
02162                      INIT_PZVAL_COPY(tmp, array_ptr);
02163                      array_ptr = tmp;
02164                      if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
02165                             ce = Z_OBJCE_P(array_ptr);
02166                             if (ce && ce->get_iterator) {
02167                                    Z_DELREF_P(array_ptr);
02168                             }
02169                      }
02170               } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
02171                      ce = Z_OBJCE_P(array_ptr);
02172                      if (!ce || !ce->get_iterator) {
02173                             Z_ADDREF_P(array_ptr);
02174                      }
02175               } else if (IS_CONST == IS_CONST ||
02176                          ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
02177                           !Z_ISREF_P(array_ptr) &&
02178                           Z_REFCOUNT_P(array_ptr) > 1)) {
02179                      zval *tmp;
02180 
02181                      ALLOC_ZVAL(tmp);
02182                      INIT_PZVAL_COPY(tmp, array_ptr);
02183                      zval_copy_ctor(tmp);
02184                      array_ptr = tmp;
02185               } else {
02186                      Z_ADDREF_P(array_ptr);
02187               }
02188        }
02189 
02190        if (ce && ce->get_iterator) {
02191               iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
02192 
02193               if (iter && !EG(exception)) {
02194                      array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
02195               } else {
02196                      if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
02197 
02198                      } else {
02199 
02200                      }
02201                      if (!EG(exception)) {
02202                             zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
02203                      }
02204                      zend_throw_exception_internal(NULL TSRMLS_CC);
02205                      ZEND_VM_NEXT_OPCODE();
02206               }
02207        }
02208 
02209        AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr);
02210        PZVAL_LOCK(array_ptr);
02211 
02212        if (iter) {
02213               iter->index = 0;
02214               if (iter->funcs->rewind) {
02215                      iter->funcs->rewind(iter TSRMLS_CC);
02216                      if (EG(exception)) {
02217                             Z_DELREF_P(array_ptr);
02218                             zval_ptr_dtor(&array_ptr);
02219                             if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
02220 
02221                             } else {
02222 
02223                             }
02224                             ZEND_VM_NEXT_OPCODE();
02225                      }
02226               }
02227               is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
02228               if (EG(exception)) {
02229                      Z_DELREF_P(array_ptr);
02230                      zval_ptr_dtor(&array_ptr);
02231                      if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
02232 
02233                      } else {
02234 
02235                      }
02236                      ZEND_VM_NEXT_OPCODE();
02237               }
02238               iter->index = -1; /* will be set to 0 before using next handler */
02239        } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
02240               zend_hash_internal_pointer_reset(fe_ht);
02241               if (ce) {
02242                      zend_object *zobj = zend_objects_get_address(array_ptr TSRMLS_CC);
02243                      while (zend_hash_has_more_elements(fe_ht) == SUCCESS) {
02244                             char *str_key;
02245                             uint str_key_len;
02246                             ulong int_key;
02247                             zend_uchar key_type;
02248 
02249                             key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
02250                             if (key_type != HASH_KEY_NON_EXISTANT &&
02251                                    (key_type == HASH_KEY_IS_LONG ||
02252                                  zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
02253                                    break;
02254                             }
02255                             zend_hash_move_forward(fe_ht);
02256                      }
02257               }
02258               is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
02259               zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos);
02260        } else {
02261               zend_error(E_WARNING, "Invalid argument supplied for foreach()");
02262               is_empty = 1;
02263        }
02264 
02265        if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
02266 
02267        } else {
02268 
02269        }
02270        if (is_empty) {
02271               ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
02272        } else {
02273               ZEND_VM_NEXT_OPCODE();
02274        }
02275 }
02276 
02277 static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02278 {
02279        zend_op *opline = EX(opline);
02280        zval **value;
02281        zend_bool isset = 1;
02282 
02283        if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
02284               if (EX(CVs)[opline->op1.u.var]) {
02285                      value = EX(CVs)[opline->op1.u.var];
02286               } else if (EG(active_symbol_table)) {
02287                      zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
02288 
02289                      if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
02290                             isset = 0;
02291                      }
02292               } else {
02293                      isset = 0;
02294               }
02295        } else {
02296               HashTable *target_symbol_table;
02297 
02298               zval tmp, *varname = &opline->op1.u.constant;
02299 
02300               if (Z_TYPE_P(varname) != IS_STRING) {
02301                      tmp = *varname;
02302                      zval_copy_ctor(&tmp);
02303                      convert_to_string(&tmp);
02304                      varname = &tmp;
02305               }
02306 
02307               if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
02308                      value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC);
02309                      if (!value) {
02310                             isset = 0;
02311                      }
02312               } else {
02313                      target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
02314                      if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
02315                             isset = 0;
02316                      }
02317               }
02318 
02319               if (varname == &tmp) {
02320                      zval_dtor(&tmp);
02321               }
02322 
02323        }
02324 
02325        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
02326 
02327        switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) {
02328               case ZEND_ISSET:
02329                      if (isset && Z_TYPE_PP(value) == IS_NULL) {
02330                             Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
02331                      } else {
02332                             Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset;
02333                      }
02334                      break;
02335               case ZEND_ISEMPTY:
02336                      if (!isset || !i_zend_is_true(*value)) {
02337                             Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
02338                      } else {
02339                             Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
02340                      }
02341                      break;
02342        }
02343 
02344        ZEND_VM_NEXT_OPCODE();
02345 }
02346 
02347 static int ZEND_FASTCALL  ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02348 {
02349 #if 0 || (IS_CONST != IS_UNUSED)
02350        zend_op *opline = EX(opline);
02351        if (IS_CONST != IS_UNUSED) {
02352 
02353               zval *ptr = &opline->op1.u.constant;
02354 
02355               if (Z_TYPE_P(ptr) == IS_LONG) {
02356                      EG(exit_status) = Z_LVAL_P(ptr);
02357               } else {
02358                      zend_print_variable(ptr);
02359               }
02360 
02361        }
02362 #endif
02363        zend_bailout();
02364        ZEND_VM_NEXT_OPCODE();
02365 }
02366 
02367 static int ZEND_FASTCALL  ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02368 {
02369        zend_op *opline = EX(opline);
02370 
02371        zval *value = &opline->op1.u.constant;
02372 
02373        if (i_zend_is_true(value)) {
02374               EX_T(opline->result.u.var).tmp_var = *value;
02375               zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
02376 
02377 #if DEBUG_ZEND>=2
02378               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
02379 #endif
02380               ZEND_VM_JMP(opline->op2.u.jmp_addr);
02381        }
02382 
02383        ZEND_VM_NEXT_OPCODE();
02384 }
02385 
02386 static int ZEND_FASTCALL  ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02387 {
02388        zend_op *opline = EX(opline);
02389 
02390        zval *value = &opline->op1.u.constant;
02391 
02392        EX_T(opline->result.u.var).tmp_var = *value;
02393        if (!0) {
02394               zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
02395        }
02396 
02397        ZEND_VM_NEXT_OPCODE();
02398 }
02399 
02400 static int ZEND_FASTCALL  ZEND_TICKS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02401 {
02402        zend_op *opline = EX(opline);
02403 
02404        if (++EG(ticks_count)>=Z_LVAL(opline->op1.u.constant)) {
02405               EG(ticks_count)=0;
02406               if (zend_ticks_function) {
02407                      zend_ticks_function(Z_LVAL(opline->op1.u.constant));
02408               }
02409        }
02410        ZEND_VM_NEXT_OPCODE();
02411 }
02412 
02413 static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02414 {
02415        zend_op *opline = EX(opline);
02416 
02417 
02418        add_function(&EX_T(opline->result.u.var).tmp_var,
02419               &opline->op1.u.constant,
02420               &opline->op2.u.constant TSRMLS_CC);
02421 
02422 
02423        ZEND_VM_NEXT_OPCODE();
02424 }
02425 
02426 static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02427 {
02428        zend_op *opline = EX(opline);
02429 
02430 
02431        sub_function(&EX_T(opline->result.u.var).tmp_var,
02432               &opline->op1.u.constant,
02433               &opline->op2.u.constant TSRMLS_CC);
02434 
02435 
02436        ZEND_VM_NEXT_OPCODE();
02437 }
02438 
02439 static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02440 {
02441        zend_op *opline = EX(opline);
02442 
02443 
02444        mul_function(&EX_T(opline->result.u.var).tmp_var,
02445               &opline->op1.u.constant,
02446               &opline->op2.u.constant TSRMLS_CC);
02447 
02448 
02449        ZEND_VM_NEXT_OPCODE();
02450 }
02451 
02452 static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02453 {
02454        zend_op *opline = EX(opline);
02455 
02456 
02457        div_function(&EX_T(opline->result.u.var).tmp_var,
02458               &opline->op1.u.constant,
02459               &opline->op2.u.constant TSRMLS_CC);
02460 
02461 
02462        ZEND_VM_NEXT_OPCODE();
02463 }
02464 
02465 static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02466 {
02467        zend_op *opline = EX(opline);
02468 
02469 
02470        mod_function(&EX_T(opline->result.u.var).tmp_var,
02471               &opline->op1.u.constant,
02472               &opline->op2.u.constant TSRMLS_CC);
02473 
02474 
02475        ZEND_VM_NEXT_OPCODE();
02476 }
02477 
02478 static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02479 {
02480        zend_op *opline = EX(opline);
02481 
02482 
02483        shift_left_function(&EX_T(opline->result.u.var).tmp_var,
02484               &opline->op1.u.constant,
02485               &opline->op2.u.constant TSRMLS_CC);
02486 
02487 
02488        ZEND_VM_NEXT_OPCODE();
02489 }
02490 
02491 static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02492 {
02493        zend_op *opline = EX(opline);
02494 
02495 
02496        shift_right_function(&EX_T(opline->result.u.var).tmp_var,
02497               &opline->op1.u.constant,
02498               &opline->op2.u.constant TSRMLS_CC);
02499 
02500 
02501        ZEND_VM_NEXT_OPCODE();
02502 }
02503 
02504 static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02505 {
02506        zend_op *opline = EX(opline);
02507 
02508 
02509        concat_function(&EX_T(opline->result.u.var).tmp_var,
02510               &opline->op1.u.constant,
02511               &opline->op2.u.constant TSRMLS_CC);
02512 
02513 
02514        ZEND_VM_NEXT_OPCODE();
02515 }
02516 
02517 static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02518 {
02519        zend_op *opline = EX(opline);
02520 
02521 
02522        is_identical_function(&EX_T(opline->result.u.var).tmp_var,
02523               &opline->op1.u.constant,
02524               &opline->op2.u.constant TSRMLS_CC);
02525 
02526 
02527        ZEND_VM_NEXT_OPCODE();
02528 }
02529 
02530 static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02531 {
02532        zend_op *opline = EX(opline);
02533 
02534        zval *result = &EX_T(opline->result.u.var).tmp_var;
02535 
02536        is_identical_function(result,
02537               &opline->op1.u.constant,
02538               &opline->op2.u.constant TSRMLS_CC);
02539        Z_LVAL_P(result) = !Z_LVAL_P(result);
02540 
02541 
02542        ZEND_VM_NEXT_OPCODE();
02543 }
02544 
02545 static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02546 {
02547        zend_op *opline = EX(opline);
02548 
02549        zval *result = &EX_T(opline->result.u.var).tmp_var;
02550 
02551        compare_function(result,
02552               &opline->op1.u.constant,
02553               &opline->op2.u.constant TSRMLS_CC);
02554        ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
02555 
02556 
02557        ZEND_VM_NEXT_OPCODE();
02558 }
02559 
02560 static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02561 {
02562        zend_op *opline = EX(opline);
02563 
02564        zval *result = &EX_T(opline->result.u.var).tmp_var;
02565 
02566        compare_function(result,
02567               &opline->op1.u.constant,
02568               &opline->op2.u.constant TSRMLS_CC);
02569        ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
02570 
02571 
02572        ZEND_VM_NEXT_OPCODE();
02573 }
02574 
02575 static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02576 {
02577        zend_op *opline = EX(opline);
02578 
02579        zval *result = &EX_T(opline->result.u.var).tmp_var;
02580 
02581        compare_function(result,
02582               &opline->op1.u.constant,
02583               &opline->op2.u.constant TSRMLS_CC);
02584        ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
02585 
02586 
02587        ZEND_VM_NEXT_OPCODE();
02588 }
02589 
02590 static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02591 {
02592        zend_op *opline = EX(opline);
02593 
02594        zval *result = &EX_T(opline->result.u.var).tmp_var;
02595 
02596        compare_function(result,
02597               &opline->op1.u.constant,
02598               &opline->op2.u.constant TSRMLS_CC);
02599        ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
02600 
02601 
02602        ZEND_VM_NEXT_OPCODE();
02603 }
02604 
02605 static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02606 {
02607        zend_op *opline = EX(opline);
02608 
02609 
02610        bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
02611               &opline->op1.u.constant,
02612               &opline->op2.u.constant TSRMLS_CC);
02613 
02614 
02615        ZEND_VM_NEXT_OPCODE();
02616 }
02617 
02618 static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02619 {
02620        zend_op *opline = EX(opline);
02621 
02622 
02623        bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
02624               &opline->op1.u.constant,
02625               &opline->op2.u.constant TSRMLS_CC);
02626 
02627 
02628        ZEND_VM_NEXT_OPCODE();
02629 }
02630 
02631 static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02632 {
02633        zend_op *opline = EX(opline);
02634 
02635 
02636        bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
02637               &opline->op1.u.constant,
02638               &opline->op2.u.constant TSRMLS_CC);
02639 
02640 
02641        ZEND_VM_NEXT_OPCODE();
02642 }
02643 
02644 static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02645 {
02646        zend_op *opline = EX(opline);
02647 
02648 
02649        boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
02650               &opline->op1.u.constant,
02651               &opline->op2.u.constant TSRMLS_CC);
02652 
02653 
02654        ZEND_VM_NEXT_OPCODE();
02655 }
02656 
02657 static int ZEND_FASTCALL  ZEND_FETCH_DIM_TMP_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02658 {
02659        zend_op *opline = EX(opline);
02660 
02661        zval *container = &opline->op1.u.constant;
02662 
02663        if (Z_TYPE_P(container) != IS_ARRAY) {
02664               if (!RETURN_VALUE_UNUSED(&opline->result)) {
02665                      AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
02666                      PZVAL_LOCK(EG(uninitialized_zval_ptr));
02667               }
02668        } else {
02669 
02670               zval *dim = &opline->op2.u.constant;
02671 
02672               AI_SET_PTR(EX_T(opline->result.u.var).var, *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, BP_VAR_R TSRMLS_CC));
02673               SELECTIVE_PZVAL_LOCK(EX_T(opline->result.u.var).var.ptr, &opline->result);
02674 
02675        }
02676        ZEND_VM_NEXT_OPCODE();
02677 }
02678 
02679 static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02680 {
02681        zend_op *opline = EX(opline);
02682        zval *function_name;
02683        zend_class_entry *ce;
02684 
02685        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
02686 
02687        if (IS_CONST == IS_CONST) {
02688               /* no function found. try a static method in class */
02689               ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
02690               if (!ce) {
02691                      zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
02692               }
02693               EX(called_scope) = ce;
02694        } else {
02695               ce = EX_T(opline->op1.u.var).class_entry;
02696 
02697               if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
02698                      EX(called_scope) = EG(called_scope);
02699               } else {
02700                      EX(called_scope) = ce;
02701               }
02702        }
02703        if(IS_CONST != IS_UNUSED) {
02704               char *function_name_strval = NULL;
02705               int function_name_strlen = 0;
02706 
02707 
02708               if (IS_CONST == IS_CONST) {
02709                      function_name_strval = Z_STRVAL(opline->op2.u.constant);
02710                      function_name_strlen = Z_STRLEN(opline->op2.u.constant);
02711               } else {
02712                      function_name = &opline->op2.u.constant;
02713 
02714                      if (Z_TYPE_P(function_name) != IS_STRING) {
02715                             zend_error_noreturn(E_ERROR, "Function name must be a string");
02716                      } else {
02717                             function_name_strval = Z_STRVAL_P(function_name);
02718                             function_name_strlen = Z_STRLEN_P(function_name);
02719                      }
02720               }
02721 
02722               if (function_name_strval) {
02723                      if (ce->get_static_method) {
02724                             EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
02725                      } else {
02726                             EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
02727                      }
02728                      if (!EX(fbc)) {
02729                             zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
02730                      }
02731               }
02732 
02733               if (IS_CONST != IS_CONST) {
02734 
02735               }
02736        } else {
02737               if(!ce->constructor) {
02738                      zend_error_noreturn(E_ERROR, "Cannot call constructor");
02739               }
02740               if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
02741                      zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
02742               }
02743               EX(fbc) = ce->constructor;
02744        }
02745 
02746        if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
02747               EX(object) = NULL;
02748        } else {
02749               if (EG(This) &&
02750                   Z_OBJ_HT_P(EG(This))->get_class_entry &&
02751                   !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
02752                   /* We are calling method of the other (incompatible) class,
02753                      but passing $this. This is done for compatibility with php-4. */
02754                      int severity;
02755                      char *verb;
02756                      if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
02757                             severity = E_STRICT;
02758                             verb = "should not";
02759                      } else {
02760                             /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
02761                             severity = E_ERROR;
02762                             verb = "cannot";
02763                      }
02764                      zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
02765 
02766               }
02767               if ((EX(object) = EG(This))) {
02768                      Z_ADDREF_P(EX(object));
02769                      EX(called_scope) = Z_OBJCE_P(EX(object));
02770               }
02771        }
02772 
02773        ZEND_VM_NEXT_OPCODE();
02774 }
02775 
02776 static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02777 {
02778        zend_op *opline = EX(opline);
02779        int switch_expr_is_overloaded=0;
02780 
02781 
02782        if (IS_CONST==IS_VAR) {
02783               if (EX_T(opline->op1.u.var).var.ptr_ptr) {
02784                      PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
02785               } else {
02786                      switch_expr_is_overloaded = 1;
02787                      Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
02788               }
02789        }
02790        is_equal_function(&EX_T(opline->result.u.var).tmp_var,
02791                              &opline->op1.u.constant,
02792                              &opline->op2.u.constant TSRMLS_CC);
02793 
02794        if (switch_expr_is_overloaded) {
02795               /* We only free op1 if this is a string offset,
02796                * Since if it is a TMP_VAR, it'll be reused by
02797                * other CASE opcodes (whereas string offsets
02798                * are allocated at each get_zval_ptr())
02799                */
02800 
02801               EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
02802               EX_T(opline->op1.u.var).var.ptr = NULL;
02803        }
02804        ZEND_VM_NEXT_OPCODE();
02805 }
02806 
02807 static int ZEND_FASTCALL  ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02808 {
02809        zend_op *opline = EX(opline);
02810 
02811        if (IS_CONST == IS_UNUSED) {
02812               /* namespaced constant */
02813               if (!zend_get_constant_ex(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), &EX_T(opline->result.u.var).tmp_var, NULL, opline->extended_value TSRMLS_CC)) {
02814                      if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
02815                             char *actual = (char *)zend_memrchr(Z_STRVAL(opline->op2.u.constant), '\\', Z_STRLEN(opline->op2.u.constant));
02816                             if(!actual) {
02817                                    actual = Z_STRVAL(opline->op2.u.constant);
02818                             } else {
02819                                    actual++;
02820                             }
02821                             /* non-qualified constant - allow text substitution */
02822                             zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", actual, actual);
02823                             ZVAL_STRINGL(&EX_T(opline->result.u.var).tmp_var, actual, Z_STRLEN(opline->op2.u.constant)-(actual - Z_STRVAL(opline->op2.u.constant)), 1);
02824                      } else {
02825                             zend_error_noreturn(E_ERROR, "Undefined constant '%s'",
02826                                                  Z_STRVAL(opline->op2.u.constant), Z_STRVAL(opline->op2.u.constant));
02827                      }
02828               }
02829               ZEND_VM_NEXT_OPCODE();
02830        } else {
02831               /* class constant */
02832               zend_class_entry *ce;
02833               zval **value;
02834 
02835               if (IS_CONST == IS_CONST) {
02836 
02837                      ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
02838                      if (!ce) {
02839                             zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
02840                      }
02841               } else {
02842                      ce = EX_T(opline->op1.u.var).class_entry;
02843               }
02844 
02845               if (zend_hash_find(&ce->constants_table, Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void **) &value) == SUCCESS) {
02846                      if (Z_TYPE_PP(value) == IS_CONSTANT_ARRAY ||
02847                          (Z_TYPE_PP(value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
02848                             zend_class_entry *old_scope = EG(scope);
02849 
02850                             EG(scope) = ce;
02851                             zval_update_constant(value, (void *) 1 TSRMLS_CC);
02852                             EG(scope) = old_scope;
02853                      }
02854                      EX_T(opline->result.u.var).tmp_var = **value;
02855                      zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
02856               } else {
02857                      zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
02858               }
02859 
02860               ZEND_VM_NEXT_OPCODE();
02861        }
02862 }
02863 
02864 static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02865 {
02866        zend_op *opline = EX(opline);
02867 
02868        zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
02869        zval *expr_ptr;
02870        zval *offset=&opline->op2.u.constant;
02871 
02872 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
02873        zval **expr_ptr_ptr = NULL;
02874 
02875        if (opline->extended_value) {
02876               expr_ptr_ptr=NULL;
02877               expr_ptr = *expr_ptr_ptr;
02878        } else {
02879               expr_ptr=&opline->op1.u.constant;
02880        }
02881 #else
02882        expr_ptr=&opline->op1.u.constant;
02883 #endif
02884 
02885        if (0) { /* temporary variable */
02886               zval *new_expr;
02887 
02888               ALLOC_ZVAL(new_expr);
02889               INIT_PZVAL_COPY(new_expr, expr_ptr);
02890               expr_ptr = new_expr;
02891        } else {
02892 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
02893               if (opline->extended_value) {
02894                      SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
02895                      expr_ptr = *expr_ptr_ptr;
02896                      Z_ADDREF_P(expr_ptr);
02897               } else
02898 #endif
02899               if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
02900                      zval *new_expr;
02901 
02902                      ALLOC_ZVAL(new_expr);
02903                      INIT_PZVAL_COPY(new_expr, expr_ptr);
02904                      expr_ptr = new_expr;
02905                      zendi_zval_copy_ctor(*expr_ptr);
02906               } else {
02907                      Z_ADDREF_P(expr_ptr);
02908               }
02909        }
02910        if (offset) {
02911               switch (Z_TYPE_P(offset)) {
02912                      case IS_DOUBLE:
02913                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
02914                             break;
02915                      case IS_LONG:
02916                      case IS_BOOL:
02917                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
02918                             break;
02919                      case IS_STRING:
02920                             zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
02921                             break;
02922                      case IS_NULL:
02923                             zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
02924                             break;
02925                      default:
02926                             zend_error(E_WARNING, "Illegal offset type");
02927                             zval_ptr_dtor(&expr_ptr);
02928                             /* do nothing */
02929                             break;
02930               }
02931 
02932        } else {
02933               zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
02934        }
02935        if (opline->extended_value) {
02936 
02937        } else {
02938 
02939        }
02940        ZEND_VM_NEXT_OPCODE();
02941 }
02942 
02943 static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02944 {
02945        zend_op *opline = EX(opline);
02946 
02947        array_init(&EX_T(opline->result.u.var).tmp_var);
02948        if (IS_CONST == IS_UNUSED) {
02949               ZEND_VM_NEXT_OPCODE();
02950 #if 0 || IS_CONST != IS_UNUSED
02951        } else {
02952               return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
02953 #endif
02954        }
02955 }
02956 
02957 static int ZEND_FASTCALL  ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02958 {
02959        zend_op *opline = EX(opline);
02960 
02961        zval *name  = &opline->op1.u.constant;
02962        zval *val   = &opline->op2.u.constant;
02963        zend_constant c;
02964 
02965        if ((Z_TYPE_P(val) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE_P(val) == IS_CONSTANT_ARRAY) {
02966               zval tmp = *val;
02967               zval *tmp_ptr = &tmp;
02968 
02969               if (Z_TYPE_P(val) == IS_CONSTANT_ARRAY) {
02970                      zval_copy_ctor(&tmp);
02971               }
02972               INIT_PZVAL(&tmp);
02973               zval_update_constant(&tmp_ptr, NULL TSRMLS_CC);
02974               c.value = *tmp_ptr;
02975        } else {
02976               c.value = *val;
02977               zval_copy_ctor(&c.value);
02978        }
02979        c.flags = CONST_CS; /* non persistent, case sensetive */
02980        c.name = zend_strndup(Z_STRVAL_P(name), Z_STRLEN_P(name));
02981        c.name_len = Z_STRLEN_P(name)+1;
02982        c.module_number = PHP_USER_CONSTANT;
02983 
02984        if (zend_register_constant(&c TSRMLS_CC) == FAILURE) {
02985        }
02986 
02987 
02988        ZEND_VM_NEXT_OPCODE();
02989 }
02990 
02991 static int ZEND_FASTCALL  ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
02992 {
02993        zend_op *opline = EX(opline);
02994        zend_function *op_array;
02995 
02996        if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), Z_LVAL(opline->op2.u.constant), (void *) &op_array) == FAILURE ||
02997            op_array->type != ZEND_USER_FUNCTION) {
02998               zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
02999        }
03000 
03001        zend_create_closure(&EX_T(opline->result.u.var).tmp_var, op_array TSRMLS_CC);
03002 
03003        ZEND_VM_NEXT_OPCODE();
03004 }
03005 
03006 static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03007 {
03008        zend_op *opline = EX(opline);
03009        zend_free_op free_op2;
03010 
03011        add_function(&EX_T(opline->result.u.var).tmp_var,
03012               &opline->op1.u.constant,
03013               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03014 
03015        zval_dtor(free_op2.var);
03016        ZEND_VM_NEXT_OPCODE();
03017 }
03018 
03019 static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03020 {
03021        zend_op *opline = EX(opline);
03022        zend_free_op free_op2;
03023 
03024        sub_function(&EX_T(opline->result.u.var).tmp_var,
03025               &opline->op1.u.constant,
03026               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03027 
03028        zval_dtor(free_op2.var);
03029        ZEND_VM_NEXT_OPCODE();
03030 }
03031 
03032 static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03033 {
03034        zend_op *opline = EX(opline);
03035        zend_free_op free_op2;
03036 
03037        mul_function(&EX_T(opline->result.u.var).tmp_var,
03038               &opline->op1.u.constant,
03039               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03040 
03041        zval_dtor(free_op2.var);
03042        ZEND_VM_NEXT_OPCODE();
03043 }
03044 
03045 static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03046 {
03047        zend_op *opline = EX(opline);
03048        zend_free_op free_op2;
03049 
03050        div_function(&EX_T(opline->result.u.var).tmp_var,
03051               &opline->op1.u.constant,
03052               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03053 
03054        zval_dtor(free_op2.var);
03055        ZEND_VM_NEXT_OPCODE();
03056 }
03057 
03058 static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03059 {
03060        zend_op *opline = EX(opline);
03061        zend_free_op free_op2;
03062 
03063        mod_function(&EX_T(opline->result.u.var).tmp_var,
03064               &opline->op1.u.constant,
03065               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03066 
03067        zval_dtor(free_op2.var);
03068        ZEND_VM_NEXT_OPCODE();
03069 }
03070 
03071 static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03072 {
03073        zend_op *opline = EX(opline);
03074        zend_free_op free_op2;
03075 
03076        shift_left_function(&EX_T(opline->result.u.var).tmp_var,
03077               &opline->op1.u.constant,
03078               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03079 
03080        zval_dtor(free_op2.var);
03081        ZEND_VM_NEXT_OPCODE();
03082 }
03083 
03084 static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03085 {
03086        zend_op *opline = EX(opline);
03087        zend_free_op free_op2;
03088 
03089        shift_right_function(&EX_T(opline->result.u.var).tmp_var,
03090               &opline->op1.u.constant,
03091               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03092 
03093        zval_dtor(free_op2.var);
03094        ZEND_VM_NEXT_OPCODE();
03095 }
03096 
03097 static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03098 {
03099        zend_op *opline = EX(opline);
03100        zend_free_op free_op2;
03101 
03102        concat_function(&EX_T(opline->result.u.var).tmp_var,
03103               &opline->op1.u.constant,
03104               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03105 
03106        zval_dtor(free_op2.var);
03107        ZEND_VM_NEXT_OPCODE();
03108 }
03109 
03110 static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03111 {
03112        zend_op *opline = EX(opline);
03113        zend_free_op free_op2;
03114 
03115        is_identical_function(&EX_T(opline->result.u.var).tmp_var,
03116               &opline->op1.u.constant,
03117               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03118 
03119        zval_dtor(free_op2.var);
03120        ZEND_VM_NEXT_OPCODE();
03121 }
03122 
03123 static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03124 {
03125        zend_op *opline = EX(opline);
03126        zend_free_op free_op2;
03127        zval *result = &EX_T(opline->result.u.var).tmp_var;
03128 
03129        is_identical_function(result,
03130               &opline->op1.u.constant,
03131               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03132        Z_LVAL_P(result) = !Z_LVAL_P(result);
03133 
03134        zval_dtor(free_op2.var);
03135        ZEND_VM_NEXT_OPCODE();
03136 }
03137 
03138 static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03139 {
03140        zend_op *opline = EX(opline);
03141        zend_free_op free_op2;
03142        zval *result = &EX_T(opline->result.u.var).tmp_var;
03143 
03144        compare_function(result,
03145               &opline->op1.u.constant,
03146               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03147        ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
03148 
03149        zval_dtor(free_op2.var);
03150        ZEND_VM_NEXT_OPCODE();
03151 }
03152 
03153 static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03154 {
03155        zend_op *opline = EX(opline);
03156        zend_free_op free_op2;
03157        zval *result = &EX_T(opline->result.u.var).tmp_var;
03158 
03159        compare_function(result,
03160               &opline->op1.u.constant,
03161               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03162        ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
03163 
03164        zval_dtor(free_op2.var);
03165        ZEND_VM_NEXT_OPCODE();
03166 }
03167 
03168 static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03169 {
03170        zend_op *opline = EX(opline);
03171        zend_free_op free_op2;
03172        zval *result = &EX_T(opline->result.u.var).tmp_var;
03173 
03174        compare_function(result,
03175               &opline->op1.u.constant,
03176               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03177        ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
03178 
03179        zval_dtor(free_op2.var);
03180        ZEND_VM_NEXT_OPCODE();
03181 }
03182 
03183 static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03184 {
03185        zend_op *opline = EX(opline);
03186        zend_free_op free_op2;
03187        zval *result = &EX_T(opline->result.u.var).tmp_var;
03188 
03189        compare_function(result,
03190               &opline->op1.u.constant,
03191               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03192        ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
03193 
03194        zval_dtor(free_op2.var);
03195        ZEND_VM_NEXT_OPCODE();
03196 }
03197 
03198 static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03199 {
03200        zend_op *opline = EX(opline);
03201        zend_free_op free_op2;
03202 
03203        bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
03204               &opline->op1.u.constant,
03205               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03206 
03207        zval_dtor(free_op2.var);
03208        ZEND_VM_NEXT_OPCODE();
03209 }
03210 
03211 static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03212 {
03213        zend_op *opline = EX(opline);
03214        zend_free_op free_op2;
03215 
03216        bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
03217               &opline->op1.u.constant,
03218               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03219 
03220        zval_dtor(free_op2.var);
03221        ZEND_VM_NEXT_OPCODE();
03222 }
03223 
03224 static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03225 {
03226        zend_op *opline = EX(opline);
03227        zend_free_op free_op2;
03228 
03229        bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
03230               &opline->op1.u.constant,
03231               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03232 
03233        zval_dtor(free_op2.var);
03234        ZEND_VM_NEXT_OPCODE();
03235 }
03236 
03237 static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03238 {
03239        zend_op *opline = EX(opline);
03240        zend_free_op free_op2;
03241 
03242        boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
03243               &opline->op1.u.constant,
03244               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03245 
03246        zval_dtor(free_op2.var);
03247        ZEND_VM_NEXT_OPCODE();
03248 }
03249 
03250 static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03251 {
03252        zend_op *opline = EX(opline);
03253        zval *function_name;
03254        zend_class_entry *ce;
03255 
03256        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
03257 
03258        if (IS_CONST == IS_CONST) {
03259               /* no function found. try a static method in class */
03260               ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
03261               if (!ce) {
03262                      zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
03263               }
03264               EX(called_scope) = ce;
03265        } else {
03266               ce = EX_T(opline->op1.u.var).class_entry;
03267 
03268               if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
03269                      EX(called_scope) = EG(called_scope);
03270               } else {
03271                      EX(called_scope) = ce;
03272               }
03273        }
03274        if(IS_TMP_VAR != IS_UNUSED) {
03275               char *function_name_strval = NULL;
03276               int function_name_strlen = 0;
03277               zend_free_op free_op2;
03278 
03279               if (IS_TMP_VAR == IS_CONST) {
03280                      function_name_strval = Z_STRVAL(opline->op2.u.constant);
03281                      function_name_strlen = Z_STRLEN(opline->op2.u.constant);
03282               } else {
03283                      function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
03284 
03285                      if (Z_TYPE_P(function_name) != IS_STRING) {
03286                             zend_error_noreturn(E_ERROR, "Function name must be a string");
03287                      } else {
03288                             function_name_strval = Z_STRVAL_P(function_name);
03289                             function_name_strlen = Z_STRLEN_P(function_name);
03290                      }
03291               }
03292 
03293               if (function_name_strval) {
03294                      if (ce->get_static_method) {
03295                             EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
03296                      } else {
03297                             EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
03298                      }
03299                      if (!EX(fbc)) {
03300                             zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
03301                      }
03302               }
03303 
03304               if (IS_TMP_VAR != IS_CONST) {
03305                      zval_dtor(free_op2.var);
03306               }
03307        } else {
03308               if(!ce->constructor) {
03309                      zend_error_noreturn(E_ERROR, "Cannot call constructor");
03310               }
03311               if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
03312                      zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
03313               }
03314               EX(fbc) = ce->constructor;
03315        }
03316 
03317        if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
03318               EX(object) = NULL;
03319        } else {
03320               if (EG(This) &&
03321                   Z_OBJ_HT_P(EG(This))->get_class_entry &&
03322                   !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
03323                   /* We are calling method of the other (incompatible) class,
03324                      but passing $this. This is done for compatibility with php-4. */
03325                      int severity;
03326                      char *verb;
03327                      if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
03328                             severity = E_STRICT;
03329                             verb = "should not";
03330                      } else {
03331                             /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
03332                             severity = E_ERROR;
03333                             verb = "cannot";
03334                      }
03335                      zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
03336 
03337               }
03338               if ((EX(object) = EG(This))) {
03339                      Z_ADDREF_P(EX(object));
03340                      EX(called_scope) = Z_OBJCE_P(EX(object));
03341               }
03342        }
03343 
03344        ZEND_VM_NEXT_OPCODE();
03345 }
03346 
03347 static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03348 {
03349        zend_op *opline = EX(opline);
03350        int switch_expr_is_overloaded=0;
03351        zend_free_op free_op2;
03352 
03353        if (IS_CONST==IS_VAR) {
03354               if (EX_T(opline->op1.u.var).var.ptr_ptr) {
03355                      PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
03356               } else {
03357                      switch_expr_is_overloaded = 1;
03358                      Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
03359               }
03360        }
03361        is_equal_function(&EX_T(opline->result.u.var).tmp_var,
03362                              &opline->op1.u.constant,
03363                              _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03364 
03365        zval_dtor(free_op2.var);
03366        if (switch_expr_is_overloaded) {
03367               /* We only free op1 if this is a string offset,
03368                * Since if it is a TMP_VAR, it'll be reused by
03369                * other CASE opcodes (whereas string offsets
03370                * are allocated at each get_zval_ptr())
03371                */
03372 
03373               EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
03374               EX_T(opline->op1.u.var).var.ptr = NULL;
03375        }
03376        ZEND_VM_NEXT_OPCODE();
03377 }
03378 
03379 static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03380 {
03381        zend_op *opline = EX(opline);
03382        zend_free_op free_op2;
03383        zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
03384        zval *expr_ptr;
03385        zval *offset=_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
03386 
03387 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
03388        zval **expr_ptr_ptr = NULL;
03389 
03390        if (opline->extended_value) {
03391               expr_ptr_ptr=NULL;
03392               expr_ptr = *expr_ptr_ptr;
03393        } else {
03394               expr_ptr=&opline->op1.u.constant;
03395        }
03396 #else
03397        expr_ptr=&opline->op1.u.constant;
03398 #endif
03399 
03400        if (0) { /* temporary variable */
03401               zval *new_expr;
03402 
03403               ALLOC_ZVAL(new_expr);
03404               INIT_PZVAL_COPY(new_expr, expr_ptr);
03405               expr_ptr = new_expr;
03406        } else {
03407 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
03408               if (opline->extended_value) {
03409                      SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
03410                      expr_ptr = *expr_ptr_ptr;
03411                      Z_ADDREF_P(expr_ptr);
03412               } else
03413 #endif
03414               if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
03415                      zval *new_expr;
03416 
03417                      ALLOC_ZVAL(new_expr);
03418                      INIT_PZVAL_COPY(new_expr, expr_ptr);
03419                      expr_ptr = new_expr;
03420                      zendi_zval_copy_ctor(*expr_ptr);
03421               } else {
03422                      Z_ADDREF_P(expr_ptr);
03423               }
03424        }
03425        if (offset) {
03426               switch (Z_TYPE_P(offset)) {
03427                      case IS_DOUBLE:
03428                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
03429                             break;
03430                      case IS_LONG:
03431                      case IS_BOOL:
03432                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
03433                             break;
03434                      case IS_STRING:
03435                             zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
03436                             break;
03437                      case IS_NULL:
03438                             zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
03439                             break;
03440                      default:
03441                             zend_error(E_WARNING, "Illegal offset type");
03442                             zval_ptr_dtor(&expr_ptr);
03443                             /* do nothing */
03444                             break;
03445               }
03446               zval_dtor(free_op2.var);
03447        } else {
03448               zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
03449        }
03450        if (opline->extended_value) {
03451 
03452        } else {
03453 
03454        }
03455        ZEND_VM_NEXT_OPCODE();
03456 }
03457 
03458 static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03459 {
03460        zend_op *opline = EX(opline);
03461 
03462        array_init(&EX_T(opline->result.u.var).tmp_var);
03463        if (IS_CONST == IS_UNUSED) {
03464               ZEND_VM_NEXT_OPCODE();
03465 #if 0 || IS_CONST != IS_UNUSED
03466        } else {
03467               return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
03468 #endif
03469        }
03470 }
03471 
03472 static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03473 {
03474        zend_op *opline = EX(opline);
03475        zend_free_op free_op2;
03476 
03477        add_function(&EX_T(opline->result.u.var).tmp_var,
03478               &opline->op1.u.constant,
03479               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03480 
03481        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03482        ZEND_VM_NEXT_OPCODE();
03483 }
03484 
03485 static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03486 {
03487        zend_op *opline = EX(opline);
03488        zend_free_op free_op2;
03489 
03490        sub_function(&EX_T(opline->result.u.var).tmp_var,
03491               &opline->op1.u.constant,
03492               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03493 
03494        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03495        ZEND_VM_NEXT_OPCODE();
03496 }
03497 
03498 static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03499 {
03500        zend_op *opline = EX(opline);
03501        zend_free_op free_op2;
03502 
03503        mul_function(&EX_T(opline->result.u.var).tmp_var,
03504               &opline->op1.u.constant,
03505               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03506 
03507        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03508        ZEND_VM_NEXT_OPCODE();
03509 }
03510 
03511 static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03512 {
03513        zend_op *opline = EX(opline);
03514        zend_free_op free_op2;
03515 
03516        div_function(&EX_T(opline->result.u.var).tmp_var,
03517               &opline->op1.u.constant,
03518               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03519 
03520        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03521        ZEND_VM_NEXT_OPCODE();
03522 }
03523 
03524 static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03525 {
03526        zend_op *opline = EX(opline);
03527        zend_free_op free_op2;
03528 
03529        mod_function(&EX_T(opline->result.u.var).tmp_var,
03530               &opline->op1.u.constant,
03531               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03532 
03533        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03534        ZEND_VM_NEXT_OPCODE();
03535 }
03536 
03537 static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03538 {
03539        zend_op *opline = EX(opline);
03540        zend_free_op free_op2;
03541 
03542        shift_left_function(&EX_T(opline->result.u.var).tmp_var,
03543               &opline->op1.u.constant,
03544               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03545 
03546        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03547        ZEND_VM_NEXT_OPCODE();
03548 }
03549 
03550 static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03551 {
03552        zend_op *opline = EX(opline);
03553        zend_free_op free_op2;
03554 
03555        shift_right_function(&EX_T(opline->result.u.var).tmp_var,
03556               &opline->op1.u.constant,
03557               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03558 
03559        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03560        ZEND_VM_NEXT_OPCODE();
03561 }
03562 
03563 static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03564 {
03565        zend_op *opline = EX(opline);
03566        zend_free_op free_op2;
03567 
03568        concat_function(&EX_T(opline->result.u.var).tmp_var,
03569               &opline->op1.u.constant,
03570               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03571 
03572        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03573        ZEND_VM_NEXT_OPCODE();
03574 }
03575 
03576 static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03577 {
03578        zend_op *opline = EX(opline);
03579        zend_free_op free_op2;
03580 
03581        is_identical_function(&EX_T(opline->result.u.var).tmp_var,
03582               &opline->op1.u.constant,
03583               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03584 
03585        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03586        ZEND_VM_NEXT_OPCODE();
03587 }
03588 
03589 static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03590 {
03591        zend_op *opline = EX(opline);
03592        zend_free_op free_op2;
03593        zval *result = &EX_T(opline->result.u.var).tmp_var;
03594 
03595        is_identical_function(result,
03596               &opline->op1.u.constant,
03597               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03598        Z_LVAL_P(result) = !Z_LVAL_P(result);
03599 
03600        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03601        ZEND_VM_NEXT_OPCODE();
03602 }
03603 
03604 static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03605 {
03606        zend_op *opline = EX(opline);
03607        zend_free_op free_op2;
03608        zval *result = &EX_T(opline->result.u.var).tmp_var;
03609 
03610        compare_function(result,
03611               &opline->op1.u.constant,
03612               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03613        ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
03614 
03615        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03616        ZEND_VM_NEXT_OPCODE();
03617 }
03618 
03619 static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03620 {
03621        zend_op *opline = EX(opline);
03622        zend_free_op free_op2;
03623        zval *result = &EX_T(opline->result.u.var).tmp_var;
03624 
03625        compare_function(result,
03626               &opline->op1.u.constant,
03627               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03628        ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
03629 
03630        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03631        ZEND_VM_NEXT_OPCODE();
03632 }
03633 
03634 static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03635 {
03636        zend_op *opline = EX(opline);
03637        zend_free_op free_op2;
03638        zval *result = &EX_T(opline->result.u.var).tmp_var;
03639 
03640        compare_function(result,
03641               &opline->op1.u.constant,
03642               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03643        ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
03644 
03645        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03646        ZEND_VM_NEXT_OPCODE();
03647 }
03648 
03649 static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03650 {
03651        zend_op *opline = EX(opline);
03652        zend_free_op free_op2;
03653        zval *result = &EX_T(opline->result.u.var).tmp_var;
03654 
03655        compare_function(result,
03656               &opline->op1.u.constant,
03657               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03658        ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
03659 
03660        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03661        ZEND_VM_NEXT_OPCODE();
03662 }
03663 
03664 static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03665 {
03666        zend_op *opline = EX(opline);
03667        zend_free_op free_op2;
03668 
03669        bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
03670               &opline->op1.u.constant,
03671               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03672 
03673        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03674        ZEND_VM_NEXT_OPCODE();
03675 }
03676 
03677 static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03678 {
03679        zend_op *opline = EX(opline);
03680        zend_free_op free_op2;
03681 
03682        bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
03683               &opline->op1.u.constant,
03684               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03685 
03686        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03687        ZEND_VM_NEXT_OPCODE();
03688 }
03689 
03690 static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03691 {
03692        zend_op *opline = EX(opline);
03693        zend_free_op free_op2;
03694 
03695        bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
03696               &opline->op1.u.constant,
03697               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03698 
03699        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03700        ZEND_VM_NEXT_OPCODE();
03701 }
03702 
03703 static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03704 {
03705        zend_op *opline = EX(opline);
03706        zend_free_op free_op2;
03707 
03708        boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
03709               &opline->op1.u.constant,
03710               _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03711 
03712        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03713        ZEND_VM_NEXT_OPCODE();
03714 }
03715 
03716 static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03717 {
03718        zend_op *opline = EX(opline);
03719        zval *function_name;
03720        zend_class_entry *ce;
03721 
03722        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
03723 
03724        if (IS_CONST == IS_CONST) {
03725               /* no function found. try a static method in class */
03726               ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
03727               if (!ce) {
03728                      zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
03729               }
03730               EX(called_scope) = ce;
03731        } else {
03732               ce = EX_T(opline->op1.u.var).class_entry;
03733 
03734               if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
03735                      EX(called_scope) = EG(called_scope);
03736               } else {
03737                      EX(called_scope) = ce;
03738               }
03739        }
03740        if(IS_VAR != IS_UNUSED) {
03741               char *function_name_strval = NULL;
03742               int function_name_strlen = 0;
03743               zend_free_op free_op2;
03744 
03745               if (IS_VAR == IS_CONST) {
03746                      function_name_strval = Z_STRVAL(opline->op2.u.constant);
03747                      function_name_strlen = Z_STRLEN(opline->op2.u.constant);
03748               } else {
03749                      function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
03750 
03751                      if (Z_TYPE_P(function_name) != IS_STRING) {
03752                             zend_error_noreturn(E_ERROR, "Function name must be a string");
03753                      } else {
03754                             function_name_strval = Z_STRVAL_P(function_name);
03755                             function_name_strlen = Z_STRLEN_P(function_name);
03756                      }
03757               }
03758 
03759               if (function_name_strval) {
03760                      if (ce->get_static_method) {
03761                             EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
03762                      } else {
03763                             EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
03764                      }
03765                      if (!EX(fbc)) {
03766                             zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
03767                      }
03768               }
03769 
03770               if (IS_VAR != IS_CONST) {
03771                      if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03772               }
03773        } else {
03774               if(!ce->constructor) {
03775                      zend_error_noreturn(E_ERROR, "Cannot call constructor");
03776               }
03777               if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
03778                      zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
03779               }
03780               EX(fbc) = ce->constructor;
03781        }
03782 
03783        if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
03784               EX(object) = NULL;
03785        } else {
03786               if (EG(This) &&
03787                   Z_OBJ_HT_P(EG(This))->get_class_entry &&
03788                   !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
03789                   /* We are calling method of the other (incompatible) class,
03790                      but passing $this. This is done for compatibility with php-4. */
03791                      int severity;
03792                      char *verb;
03793                      if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
03794                             severity = E_STRICT;
03795                             verb = "should not";
03796                      } else {
03797                             /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
03798                             severity = E_ERROR;
03799                             verb = "cannot";
03800                      }
03801                      zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
03802 
03803               }
03804               if ((EX(object) = EG(This))) {
03805                      Z_ADDREF_P(EX(object));
03806                      EX(called_scope) = Z_OBJCE_P(EX(object));
03807               }
03808        }
03809 
03810        ZEND_VM_NEXT_OPCODE();
03811 }
03812 
03813 static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03814 {
03815        zend_op *opline = EX(opline);
03816        int switch_expr_is_overloaded=0;
03817        zend_free_op free_op2;
03818 
03819        if (IS_CONST==IS_VAR) {
03820               if (EX_T(opline->op1.u.var).var.ptr_ptr) {
03821                      PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
03822               } else {
03823                      switch_expr_is_overloaded = 1;
03824                      Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
03825               }
03826        }
03827        is_equal_function(&EX_T(opline->result.u.var).tmp_var,
03828                              &opline->op1.u.constant,
03829                              _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
03830 
03831        if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03832        if (switch_expr_is_overloaded) {
03833               /* We only free op1 if this is a string offset,
03834                * Since if it is a TMP_VAR, it'll be reused by
03835                * other CASE opcodes (whereas string offsets
03836                * are allocated at each get_zval_ptr())
03837                */
03838 
03839               EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
03840               EX_T(opline->op1.u.var).var.ptr = NULL;
03841        }
03842        ZEND_VM_NEXT_OPCODE();
03843 }
03844 
03845 static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03846 {
03847        zend_op *opline = EX(opline);
03848        zend_free_op free_op2;
03849        zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
03850        zval *expr_ptr;
03851        zval *offset=_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
03852 
03853 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
03854        zval **expr_ptr_ptr = NULL;
03855 
03856        if (opline->extended_value) {
03857               expr_ptr_ptr=NULL;
03858               expr_ptr = *expr_ptr_ptr;
03859        } else {
03860               expr_ptr=&opline->op1.u.constant;
03861        }
03862 #else
03863        expr_ptr=&opline->op1.u.constant;
03864 #endif
03865 
03866        if (0) { /* temporary variable */
03867               zval *new_expr;
03868 
03869               ALLOC_ZVAL(new_expr);
03870               INIT_PZVAL_COPY(new_expr, expr_ptr);
03871               expr_ptr = new_expr;
03872        } else {
03873 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
03874               if (opline->extended_value) {
03875                      SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
03876                      expr_ptr = *expr_ptr_ptr;
03877                      Z_ADDREF_P(expr_ptr);
03878               } else
03879 #endif
03880               if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
03881                      zval *new_expr;
03882 
03883                      ALLOC_ZVAL(new_expr);
03884                      INIT_PZVAL_COPY(new_expr, expr_ptr);
03885                      expr_ptr = new_expr;
03886                      zendi_zval_copy_ctor(*expr_ptr);
03887               } else {
03888                      Z_ADDREF_P(expr_ptr);
03889               }
03890        }
03891        if (offset) {
03892               switch (Z_TYPE_P(offset)) {
03893                      case IS_DOUBLE:
03894                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
03895                             break;
03896                      case IS_LONG:
03897                      case IS_BOOL:
03898                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
03899                             break;
03900                      case IS_STRING:
03901                             zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
03902                             break;
03903                      case IS_NULL:
03904                             zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
03905                             break;
03906                      default:
03907                             zend_error(E_WARNING, "Illegal offset type");
03908                             zval_ptr_dtor(&expr_ptr);
03909                             /* do nothing */
03910                             break;
03911               }
03912               if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
03913        } else {
03914               zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
03915        }
03916        if (opline->extended_value) {
03917 
03918        } else {
03919 
03920        }
03921        ZEND_VM_NEXT_OPCODE();
03922 }
03923 
03924 static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03925 {
03926        zend_op *opline = EX(opline);
03927 
03928        array_init(&EX_T(opline->result.u.var).tmp_var);
03929        if (IS_CONST == IS_UNUSED) {
03930               ZEND_VM_NEXT_OPCODE();
03931 #if 0 || IS_CONST != IS_UNUSED
03932        } else {
03933               return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
03934 #endif
03935        }
03936 }
03937 
03938 static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
03939 {
03940        zend_op *opline = EX(opline);
03941        zval *function_name;
03942        zend_class_entry *ce;
03943 
03944        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
03945 
03946        if (IS_CONST == IS_CONST) {
03947               /* no function found. try a static method in class */
03948               ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
03949               if (!ce) {
03950                      zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
03951               }
03952               EX(called_scope) = ce;
03953        } else {
03954               ce = EX_T(opline->op1.u.var).class_entry;
03955 
03956               if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
03957                      EX(called_scope) = EG(called_scope);
03958               } else {
03959                      EX(called_scope) = ce;
03960               }
03961        }
03962        if(IS_UNUSED != IS_UNUSED) {
03963               char *function_name_strval = NULL;
03964               int function_name_strlen = 0;
03965 
03966 
03967               if (IS_UNUSED == IS_CONST) {
03968                      function_name_strval = Z_STRVAL(opline->op2.u.constant);
03969                      function_name_strlen = Z_STRLEN(opline->op2.u.constant);
03970               } else {
03971                      function_name = NULL;
03972 
03973                      if (Z_TYPE_P(function_name) != IS_STRING) {
03974                             zend_error_noreturn(E_ERROR, "Function name must be a string");
03975                      } else {
03976                             function_name_strval = Z_STRVAL_P(function_name);
03977                             function_name_strlen = Z_STRLEN_P(function_name);
03978                      }
03979               }
03980 
03981               if (function_name_strval) {
03982                      if (ce->get_static_method) {
03983                             EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
03984                      } else {
03985                             EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
03986                      }
03987                      if (!EX(fbc)) {
03988                             zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
03989                      }
03990               }
03991 
03992               if (IS_UNUSED != IS_CONST) {
03993 
03994               }
03995        } else {
03996               if(!ce->constructor) {
03997                      zend_error_noreturn(E_ERROR, "Cannot call constructor");
03998               }
03999               if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
04000                      zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
04001               }
04002               EX(fbc) = ce->constructor;
04003        }
04004 
04005        if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
04006               EX(object) = NULL;
04007        } else {
04008               if (EG(This) &&
04009                   Z_OBJ_HT_P(EG(This))->get_class_entry &&
04010                   !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
04011                   /* We are calling method of the other (incompatible) class,
04012                      but passing $this. This is done for compatibility with php-4. */
04013                      int severity;
04014                      char *verb;
04015                      if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
04016                             severity = E_STRICT;
04017                             verb = "should not";
04018                      } else {
04019                             /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
04020                             severity = E_ERROR;
04021                             verb = "cannot";
04022                      }
04023                      zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
04024 
04025               }
04026               if ((EX(object) = EG(This))) {
04027                      Z_ADDREF_P(EX(object));
04028                      EX(called_scope) = Z_OBJCE_P(EX(object));
04029               }
04030        }
04031 
04032        ZEND_VM_NEXT_OPCODE();
04033 }
04034 
04035 static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04036 {
04037        zend_op *opline = EX(opline);
04038 
04039        zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
04040        zval *expr_ptr;
04041        zval *offset=NULL;
04042 
04043 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
04044        zval **expr_ptr_ptr = NULL;
04045 
04046        if (opline->extended_value) {
04047               expr_ptr_ptr=NULL;
04048               expr_ptr = *expr_ptr_ptr;
04049        } else {
04050               expr_ptr=&opline->op1.u.constant;
04051        }
04052 #else
04053        expr_ptr=&opline->op1.u.constant;
04054 #endif
04055 
04056        if (0) { /* temporary variable */
04057               zval *new_expr;
04058 
04059               ALLOC_ZVAL(new_expr);
04060               INIT_PZVAL_COPY(new_expr, expr_ptr);
04061               expr_ptr = new_expr;
04062        } else {
04063 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
04064               if (opline->extended_value) {
04065                      SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
04066                      expr_ptr = *expr_ptr_ptr;
04067                      Z_ADDREF_P(expr_ptr);
04068               } else
04069 #endif
04070               if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
04071                      zval *new_expr;
04072 
04073                      ALLOC_ZVAL(new_expr);
04074                      INIT_PZVAL_COPY(new_expr, expr_ptr);
04075                      expr_ptr = new_expr;
04076                      zendi_zval_copy_ctor(*expr_ptr);
04077               } else {
04078                      Z_ADDREF_P(expr_ptr);
04079               }
04080        }
04081        if (offset) {
04082               switch (Z_TYPE_P(offset)) {
04083                      case IS_DOUBLE:
04084                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
04085                             break;
04086                      case IS_LONG:
04087                      case IS_BOOL:
04088                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
04089                             break;
04090                      case IS_STRING:
04091                             zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
04092                             break;
04093                      case IS_NULL:
04094                             zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
04095                             break;
04096                      default:
04097                             zend_error(E_WARNING, "Illegal offset type");
04098                             zval_ptr_dtor(&expr_ptr);
04099                             /* do nothing */
04100                             break;
04101               }
04102 
04103        } else {
04104               zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
04105        }
04106        if (opline->extended_value) {
04107 
04108        } else {
04109 
04110        }
04111        ZEND_VM_NEXT_OPCODE();
04112 }
04113 
04114 static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04115 {
04116        zend_op *opline = EX(opline);
04117 
04118        array_init(&EX_T(opline->result.u.var).tmp_var);
04119        if (IS_CONST == IS_UNUSED) {
04120               ZEND_VM_NEXT_OPCODE();
04121 #if 0 || IS_CONST != IS_UNUSED
04122        } else {
04123               return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04124 #endif
04125        }
04126 }
04127 
04128 static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04129 {
04130        zend_op *opline = EX(opline);
04131 
04132 
04133        add_function(&EX_T(opline->result.u.var).tmp_var,
04134               &opline->op1.u.constant,
04135               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04136 
04137 
04138        ZEND_VM_NEXT_OPCODE();
04139 }
04140 
04141 static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04142 {
04143        zend_op *opline = EX(opline);
04144 
04145 
04146        sub_function(&EX_T(opline->result.u.var).tmp_var,
04147               &opline->op1.u.constant,
04148               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04149 
04150 
04151        ZEND_VM_NEXT_OPCODE();
04152 }
04153 
04154 static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04155 {
04156        zend_op *opline = EX(opline);
04157 
04158 
04159        mul_function(&EX_T(opline->result.u.var).tmp_var,
04160               &opline->op1.u.constant,
04161               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04162 
04163 
04164        ZEND_VM_NEXT_OPCODE();
04165 }
04166 
04167 static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04168 {
04169        zend_op *opline = EX(opline);
04170 
04171 
04172        div_function(&EX_T(opline->result.u.var).tmp_var,
04173               &opline->op1.u.constant,
04174               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04175 
04176 
04177        ZEND_VM_NEXT_OPCODE();
04178 }
04179 
04180 static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04181 {
04182        zend_op *opline = EX(opline);
04183 
04184 
04185        mod_function(&EX_T(opline->result.u.var).tmp_var,
04186               &opline->op1.u.constant,
04187               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04188 
04189 
04190        ZEND_VM_NEXT_OPCODE();
04191 }
04192 
04193 static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04194 {
04195        zend_op *opline = EX(opline);
04196 
04197 
04198        shift_left_function(&EX_T(opline->result.u.var).tmp_var,
04199               &opline->op1.u.constant,
04200               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04201 
04202 
04203        ZEND_VM_NEXT_OPCODE();
04204 }
04205 
04206 static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04207 {
04208        zend_op *opline = EX(opline);
04209 
04210 
04211        shift_right_function(&EX_T(opline->result.u.var).tmp_var,
04212               &opline->op1.u.constant,
04213               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04214 
04215 
04216        ZEND_VM_NEXT_OPCODE();
04217 }
04218 
04219 static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04220 {
04221        zend_op *opline = EX(opline);
04222 
04223 
04224        concat_function(&EX_T(opline->result.u.var).tmp_var,
04225               &opline->op1.u.constant,
04226               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04227 
04228 
04229        ZEND_VM_NEXT_OPCODE();
04230 }
04231 
04232 static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04233 {
04234        zend_op *opline = EX(opline);
04235 
04236 
04237        is_identical_function(&EX_T(opline->result.u.var).tmp_var,
04238               &opline->op1.u.constant,
04239               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04240 
04241 
04242        ZEND_VM_NEXT_OPCODE();
04243 }
04244 
04245 static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04246 {
04247        zend_op *opline = EX(opline);
04248 
04249        zval *result = &EX_T(opline->result.u.var).tmp_var;
04250 
04251        is_identical_function(result,
04252               &opline->op1.u.constant,
04253               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04254        Z_LVAL_P(result) = !Z_LVAL_P(result);
04255 
04256 
04257        ZEND_VM_NEXT_OPCODE();
04258 }
04259 
04260 static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04261 {
04262        zend_op *opline = EX(opline);
04263 
04264        zval *result = &EX_T(opline->result.u.var).tmp_var;
04265 
04266        compare_function(result,
04267               &opline->op1.u.constant,
04268               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04269        ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
04270 
04271 
04272        ZEND_VM_NEXT_OPCODE();
04273 }
04274 
04275 static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04276 {
04277        zend_op *opline = EX(opline);
04278 
04279        zval *result = &EX_T(opline->result.u.var).tmp_var;
04280 
04281        compare_function(result,
04282               &opline->op1.u.constant,
04283               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04284        ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
04285 
04286 
04287        ZEND_VM_NEXT_OPCODE();
04288 }
04289 
04290 static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04291 {
04292        zend_op *opline = EX(opline);
04293 
04294        zval *result = &EX_T(opline->result.u.var).tmp_var;
04295 
04296        compare_function(result,
04297               &opline->op1.u.constant,
04298               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04299        ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
04300 
04301 
04302        ZEND_VM_NEXT_OPCODE();
04303 }
04304 
04305 static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04306 {
04307        zend_op *opline = EX(opline);
04308 
04309        zval *result = &EX_T(opline->result.u.var).tmp_var;
04310 
04311        compare_function(result,
04312               &opline->op1.u.constant,
04313               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04314        ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
04315 
04316 
04317        ZEND_VM_NEXT_OPCODE();
04318 }
04319 
04320 static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04321 {
04322        zend_op *opline = EX(opline);
04323 
04324 
04325        bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
04326               &opline->op1.u.constant,
04327               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04328 
04329 
04330        ZEND_VM_NEXT_OPCODE();
04331 }
04332 
04333 static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04334 {
04335        zend_op *opline = EX(opline);
04336 
04337 
04338        bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
04339               &opline->op1.u.constant,
04340               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04341 
04342 
04343        ZEND_VM_NEXT_OPCODE();
04344 }
04345 
04346 static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04347 {
04348        zend_op *opline = EX(opline);
04349 
04350 
04351        bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
04352               &opline->op1.u.constant,
04353               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04354 
04355 
04356        ZEND_VM_NEXT_OPCODE();
04357 }
04358 
04359 static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04360 {
04361        zend_op *opline = EX(opline);
04362 
04363 
04364        boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
04365               &opline->op1.u.constant,
04366               _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04367 
04368 
04369        ZEND_VM_NEXT_OPCODE();
04370 }
04371 
04372 static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04373 {
04374        zend_op *opline = EX(opline);
04375        zval *function_name;
04376        zend_class_entry *ce;
04377 
04378        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
04379 
04380        if (IS_CONST == IS_CONST) {
04381               /* no function found. try a static method in class */
04382               ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
04383               if (!ce) {
04384                      zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
04385               }
04386               EX(called_scope) = ce;
04387        } else {
04388               ce = EX_T(opline->op1.u.var).class_entry;
04389 
04390               if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
04391                      EX(called_scope) = EG(called_scope);
04392               } else {
04393                      EX(called_scope) = ce;
04394               }
04395        }
04396        if(IS_CV != IS_UNUSED) {
04397               char *function_name_strval = NULL;
04398               int function_name_strlen = 0;
04399 
04400 
04401               if (IS_CV == IS_CONST) {
04402                      function_name_strval = Z_STRVAL(opline->op2.u.constant);
04403                      function_name_strlen = Z_STRLEN(opline->op2.u.constant);
04404               } else {
04405                      function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
04406 
04407                      if (Z_TYPE_P(function_name) != IS_STRING) {
04408                             zend_error_noreturn(E_ERROR, "Function name must be a string");
04409                      } else {
04410                             function_name_strval = Z_STRVAL_P(function_name);
04411                             function_name_strlen = Z_STRLEN_P(function_name);
04412                      }
04413               }
04414 
04415               if (function_name_strval) {
04416                      if (ce->get_static_method) {
04417                             EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
04418                      } else {
04419                             EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
04420                      }
04421                      if (!EX(fbc)) {
04422                             zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
04423                      }
04424               }
04425 
04426               if (IS_CV != IS_CONST) {
04427 
04428               }
04429        } else {
04430               if(!ce->constructor) {
04431                      zend_error_noreturn(E_ERROR, "Cannot call constructor");
04432               }
04433               if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
04434                      zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
04435               }
04436               EX(fbc) = ce->constructor;
04437        }
04438 
04439        if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
04440               EX(object) = NULL;
04441        } else {
04442               if (EG(This) &&
04443                   Z_OBJ_HT_P(EG(This))->get_class_entry &&
04444                   !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
04445                   /* We are calling method of the other (incompatible) class,
04446                      but passing $this. This is done for compatibility with php-4. */
04447                      int severity;
04448                      char *verb;
04449                      if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
04450                             severity = E_STRICT;
04451                             verb = "should not";
04452                      } else {
04453                             /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
04454                             severity = E_ERROR;
04455                             verb = "cannot";
04456                      }
04457                      zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
04458 
04459               }
04460               if ((EX(object) = EG(This))) {
04461                      Z_ADDREF_P(EX(object));
04462                      EX(called_scope) = Z_OBJCE_P(EX(object));
04463               }
04464        }
04465 
04466        ZEND_VM_NEXT_OPCODE();
04467 }
04468 
04469 static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04470 {
04471        zend_op *opline = EX(opline);
04472        int switch_expr_is_overloaded=0;
04473 
04474 
04475        if (IS_CONST==IS_VAR) {
04476               if (EX_T(opline->op1.u.var).var.ptr_ptr) {
04477                      PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
04478               } else {
04479                      switch_expr_is_overloaded = 1;
04480                      Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
04481               }
04482        }
04483        is_equal_function(&EX_T(opline->result.u.var).tmp_var,
04484                              &opline->op1.u.constant,
04485                              _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
04486 
04487        if (switch_expr_is_overloaded) {
04488               /* We only free op1 if this is a string offset,
04489                * Since if it is a TMP_VAR, it'll be reused by
04490                * other CASE opcodes (whereas string offsets
04491                * are allocated at each get_zval_ptr())
04492                */
04493 
04494               EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
04495               EX_T(opline->op1.u.var).var.ptr = NULL;
04496        }
04497        ZEND_VM_NEXT_OPCODE();
04498 }
04499 
04500 static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04501 {
04502        zend_op *opline = EX(opline);
04503 
04504        zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
04505        zval *expr_ptr;
04506        zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
04507 
04508 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
04509        zval **expr_ptr_ptr = NULL;
04510 
04511        if (opline->extended_value) {
04512               expr_ptr_ptr=NULL;
04513               expr_ptr = *expr_ptr_ptr;
04514        } else {
04515               expr_ptr=&opline->op1.u.constant;
04516        }
04517 #else
04518        expr_ptr=&opline->op1.u.constant;
04519 #endif
04520 
04521        if (0) { /* temporary variable */
04522               zval *new_expr;
04523 
04524               ALLOC_ZVAL(new_expr);
04525               INIT_PZVAL_COPY(new_expr, expr_ptr);
04526               expr_ptr = new_expr;
04527        } else {
04528 #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
04529               if (opline->extended_value) {
04530                      SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
04531                      expr_ptr = *expr_ptr_ptr;
04532                      Z_ADDREF_P(expr_ptr);
04533               } else
04534 #endif
04535               if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
04536                      zval *new_expr;
04537 
04538                      ALLOC_ZVAL(new_expr);
04539                      INIT_PZVAL_COPY(new_expr, expr_ptr);
04540                      expr_ptr = new_expr;
04541                      zendi_zval_copy_ctor(*expr_ptr);
04542               } else {
04543                      Z_ADDREF_P(expr_ptr);
04544               }
04545        }
04546        if (offset) {
04547               switch (Z_TYPE_P(offset)) {
04548                      case IS_DOUBLE:
04549                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
04550                             break;
04551                      case IS_LONG:
04552                      case IS_BOOL:
04553                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
04554                             break;
04555                      case IS_STRING:
04556                             zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
04557                             break;
04558                      case IS_NULL:
04559                             zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
04560                             break;
04561                      default:
04562                             zend_error(E_WARNING, "Illegal offset type");
04563                             zval_ptr_dtor(&expr_ptr);
04564                             /* do nothing */
04565                             break;
04566               }
04567 
04568        } else {
04569               zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
04570        }
04571        if (opline->extended_value) {
04572 
04573        } else {
04574 
04575        }
04576        ZEND_VM_NEXT_OPCODE();
04577 }
04578 
04579 static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04580 {
04581        zend_op *opline = EX(opline);
04582 
04583        array_init(&EX_T(opline->result.u.var).tmp_var);
04584        if (IS_CONST == IS_UNUSED) {
04585               ZEND_VM_NEXT_OPCODE();
04586 #if 0 || IS_CONST != IS_UNUSED
04587        } else {
04588               return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04589 #endif
04590        }
04591 }
04592 
04593 static int ZEND_FASTCALL  ZEND_BW_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04594 {
04595        zend_op *opline = EX(opline);
04596        zend_free_op free_op1;
04597 
04598        bitwise_not_function(&EX_T(opline->result.u.var).tmp_var,
04599               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC);
04600        zval_dtor(free_op1.var);
04601        ZEND_VM_NEXT_OPCODE();
04602 }
04603 
04604 static int ZEND_FASTCALL  ZEND_BOOL_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04605 {
04606        zend_op *opline = EX(opline);
04607        zend_free_op free_op1;
04608 
04609        boolean_not_function(&EX_T(opline->result.u.var).tmp_var,
04610               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC);
04611        zval_dtor(free_op1.var);
04612        ZEND_VM_NEXT_OPCODE();
04613 }
04614 
04615 static int ZEND_FASTCALL  ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04616 {
04617        zend_op *opline = EX(opline);
04618        zend_free_op free_op1;
04619        zval z_copy;
04620        zval *z = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
04621 
04622        if (IS_TMP_VAR != IS_CONST &&
04623            Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) {
04624            if (IS_TMP_VAR == IS_TMP_VAR) {
04625               INIT_PZVAL(z);
04626            }
04627               if (zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) {
04628                      zend_print_variable(&z_copy);
04629                      zval_dtor(&z_copy);
04630               } else {
04631                      zend_print_variable(z);
04632               }
04633        } else {
04634               zend_print_variable(z);
04635        }
04636 
04637        zval_dtor(free_op1.var);
04638        ZEND_VM_NEXT_OPCODE();
04639 }
04640 
04641 static int ZEND_FASTCALL  ZEND_PRINT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04642 {
04643        zend_op *opline = EX(opline);
04644 
04645        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
04646        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;
04647 
04648        return ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04649 }
04650 
04651 static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP(int type, ZEND_OPCODE_HANDLER_ARGS)
04652 {
04653        zend_op *opline = EX(opline);
04654        zend_free_op free_op1;
04655        zval *varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
04656        zval **retval;
04657        zval tmp_varname;
04658        HashTable *target_symbol_table;
04659 
04660        if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
04661               tmp_varname = *varname;
04662               zval_copy_ctor(&tmp_varname);
04663               convert_to_string(&tmp_varname);
04664               varname = &tmp_varname;
04665        }
04666 
04667        if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
04668               retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
04669               zval_dtor(free_op1.var);
04670        } else {
04671               target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
04672 /*
04673               if (!target_symbol_table) {
04674                      ZEND_VM_NEXT_OPCODE();
04675               }
04676 */
04677               if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
04678                      switch (type) {
04679                             case BP_VAR_R:
04680                             case BP_VAR_UNSET:
04681                                    zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
04682                                    /* break missing intentionally */
04683                             case BP_VAR_IS:
04684                                    retval = &EG(uninitialized_zval_ptr);
04685                                    break;
04686                             case BP_VAR_RW:
04687                                    zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
04688                                    /* break missing intentionally */
04689                             case BP_VAR_W: {
04690                                           zval *new_zval = &EG(uninitialized_zval);
04691 
04692                                           Z_ADDREF_P(new_zval);
04693                                           zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
04694                                    }
04695                                    break;
04696                             EMPTY_SWITCH_DEFAULT_CASE()
04697                      }
04698               }
04699               switch (opline->op2.u.EA.type) {
04700                      case ZEND_FETCH_GLOBAL:
04701                             if (IS_TMP_VAR != IS_TMP_VAR) {
04702                                    zval_dtor(free_op1.var);
04703                             }
04704                             break;
04705                      case ZEND_FETCH_LOCAL:
04706                             zval_dtor(free_op1.var);
04707                             break;
04708                      case ZEND_FETCH_STATIC:
04709                             zval_update_constant(retval, (void*) 1 TSRMLS_CC);
04710                             break;
04711                      case ZEND_FETCH_GLOBAL_LOCK:
04712                             if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
04713                                    PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
04714                             }
04715                             break;
04716               }
04717        }
04718 
04719 
04720        if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
04721               zval_dtor(varname);
04722        }
04723        if (!RETURN_VALUE_UNUSED(&opline->result)) {
04724               if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
04725                      SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
04726               }
04727               PZVAL_LOCK(*retval);
04728               switch (type) {
04729                      case BP_VAR_R:
04730                      case BP_VAR_IS:
04731                             AI_SET_PTR(EX_T(opline->result.u.var).var, *retval);
04732                             break;
04733                      case BP_VAR_UNSET: {
04734                             zend_free_op free_res;
04735 
04736                             EX_T(opline->result.u.var).var.ptr_ptr = retval;
04737                             PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
04738                             if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
04739                                    SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
04740                             }
04741                             PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
04742                             FREE_OP_VAR_PTR(free_res);
04743                             break;
04744                      default:
04745                             EX_T(opline->result.u.var).var.ptr_ptr = retval;
04746                             break;
04747                      }
04748               }
04749        }
04750        ZEND_VM_NEXT_OPCODE();
04751 }
04752 
04753 static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04754 {
04755        return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04756 }
04757 
04758 static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04759 {
04760        return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04761 }
04762 
04763 static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04764 {
04765        return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04766 }
04767 
04768 static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04769 {
04770        return zend_fetch_var_address_helper_SPEC_TMP(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04771 }
04772 
04773 static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04774 {
04775        return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04776 }
04777 
04778 static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04779 {
04780        return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
04781 }
04782 
04783 static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04784 {
04785        zend_op *opline = EX(opline);
04786        zend_free_op free_op1;
04787        zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
04788        int ret;
04789 
04790        if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
04791               ret = Z_LVAL_P(val);
04792        } else {
04793               ret = i_zend_is_true(val);
04794               zval_dtor(free_op1.var);
04795               if (UNEXPECTED(EG(exception) != NULL)) {
04796                      ZEND_VM_CONTINUE();
04797               }
04798        }
04799        if (!ret) {
04800 #if DEBUG_ZEND>=2
04801               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
04802 #endif
04803               ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
04804               ZEND_VM_CONTINUE();
04805        }
04806 
04807        ZEND_VM_NEXT_OPCODE();
04808 }
04809 
04810 static int ZEND_FASTCALL  ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04811 {
04812        zend_op *opline = EX(opline);
04813        zend_free_op free_op1;
04814        zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
04815        int ret;
04816 
04817        if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
04818               ret = Z_LVAL_P(val);
04819        } else {
04820               ret = i_zend_is_true(val);
04821               zval_dtor(free_op1.var);
04822               if (UNEXPECTED(EG(exception) != NULL)) {
04823                      ZEND_VM_CONTINUE();
04824               }
04825        }
04826        if (ret) {
04827 #if DEBUG_ZEND>=2
04828               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
04829 #endif
04830               ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
04831               ZEND_VM_CONTINUE();
04832        }
04833 
04834        ZEND_VM_NEXT_OPCODE();
04835 }
04836 
04837 static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04838 {
04839        zend_op *opline = EX(opline);
04840        zend_free_op free_op1;
04841        zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
04842        int retval;
04843 
04844        if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
04845               retval = Z_LVAL_P(val);
04846        } else {
04847               retval = i_zend_is_true(val);
04848               zval_dtor(free_op1.var);
04849               if (UNEXPECTED(EG(exception) != NULL)) {
04850                      ZEND_VM_CONTINUE();
04851               }
04852        }
04853        if (EXPECTED(retval != 0)) {
04854 #if DEBUG_ZEND>=2
04855               printf("Conditional jmp on true to %d\n", opline->extended_value);
04856 #endif
04857               ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
04858               ZEND_VM_CONTINUE(); /* CHECK_ME */
04859        } else {
04860 #if DEBUG_ZEND>=2
04861               printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
04862 #endif
04863               ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]);
04864               ZEND_VM_CONTINUE(); /* CHECK_ME */
04865        }
04866 }
04867 
04868 static int ZEND_FASTCALL  ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04869 {
04870        zend_op *opline = EX(opline);
04871        zend_free_op free_op1;
04872        zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
04873        int retval;
04874 
04875        if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
04876               retval = Z_LVAL_P(val);
04877        } else {
04878               retval = i_zend_is_true(val);
04879               zval_dtor(free_op1.var);
04880               if (UNEXPECTED(EG(exception) != NULL)) {
04881                      ZEND_VM_CONTINUE();
04882               }
04883        }
04884        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
04885        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
04886        if (!retval) {
04887 #if DEBUG_ZEND>=2
04888               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
04889 #endif
04890               ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
04891               ZEND_VM_CONTINUE();
04892        }
04893        ZEND_VM_NEXT_OPCODE();
04894 }
04895 
04896 static int ZEND_FASTCALL  ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04897 {
04898        zend_op *opline = EX(opline);
04899        zend_free_op free_op1;
04900        zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
04901        int retval;
04902 
04903        if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
04904               retval = Z_LVAL_P(val);
04905        } else {
04906               retval = i_zend_is_true(val);
04907               zval_dtor(free_op1.var);
04908               if (UNEXPECTED(EG(exception) != NULL)) {
04909                      ZEND_VM_CONTINUE();
04910               }
04911        }
04912        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
04913        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
04914        if (retval) {
04915 #if DEBUG_ZEND>=2
04916               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
04917 #endif
04918               ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
04919               ZEND_VM_CONTINUE();
04920        }
04921        ZEND_VM_NEXT_OPCODE();
04922 }
04923 
04924 static int ZEND_FASTCALL  ZEND_FREE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04925 {
04926        zendi_zval_dtor(EX_T(EX(opline)->op1.u.var).tmp_var);
04927        ZEND_VM_NEXT_OPCODE();
04928 }
04929 
04930 static int ZEND_FASTCALL  ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
04931 {
04932        zend_op *opline = EX(opline);
04933        zval *retval_ptr;
04934        zval **retval_ptr_ptr;
04935        zend_free_op free_op1;
04936 
04937        if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) {
04938 
04939               if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
04940                      /* Not supposed to happen, but we'll allow it */
04941                      zend_error(E_NOTICE, "Only variable references should be returned by reference");
04942                      goto return_by_value;
04943               }
04944 
04945               retval_ptr_ptr = NULL;
04946 
04947               if (IS_TMP_VAR == IS_VAR && !retval_ptr_ptr) {
04948                      zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
04949               }
04950 
04951               if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
04952                      if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
04953                          EX_T(opline->op1.u.var).var.fcall_returned_reference) {
04954                      } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
04955                             if (IS_TMP_VAR == IS_VAR && !1) {
04956                                    PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
04957                             }
04958                             zend_error(E_NOTICE, "Only variable references should be returned by reference");
04959                             goto return_by_value;
04960                      }
04961               }
04962 
04963               if (EG(return_value_ptr_ptr)) {
04964                      SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
04965                      Z_ADDREF_PP(retval_ptr_ptr);
04966 
04967                      (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
04968               }
04969        } else {
04970 return_by_value:
04971 
04972               retval_ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
04973 
04974               if (!EG(return_value_ptr_ptr)) {
04975                      if (IS_TMP_VAR == IS_TMP_VAR) {
04976                             zval_dtor(free_op1.var);
04977                      }
04978               } else if (!1) { /* Not a temp var */
04979                      if (IS_TMP_VAR == IS_CONST ||
04980                          EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
04981                          (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
04982                             zval *ret;
04983 
04984                             ALLOC_ZVAL(ret);
04985                             INIT_PZVAL_COPY(ret, retval_ptr);
04986                             zval_copy_ctor(ret);
04987                             *EG(return_value_ptr_ptr) = ret;
04988                      } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
04989                                 retval_ptr == &EG(uninitialized_zval)) {
04990                             zval *ret;
04991 
04992                             ALLOC_INIT_ZVAL(ret);
04993                             *EG(return_value_ptr_ptr) = ret;
04994                      } else {
04995                             *EG(return_value_ptr_ptr) = retval_ptr;
04996                             Z_ADDREF_P(retval_ptr);
04997                      }
04998               } else {
04999                      zval *ret;
05000 
05001                      ALLOC_ZVAL(ret);
05002                      INIT_PZVAL_COPY(ret, retval_ptr);
05003                      *EG(return_value_ptr_ptr) = ret;
05004               }
05005        }
05006 
05007        return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
05008 }
05009 
05010 static int ZEND_FASTCALL  ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05011 {
05012        zend_op *opline = EX(opline);
05013        zval *value;
05014        zval *exception;
05015        zend_free_op free_op1;
05016 
05017        value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05018 
05019        if (IS_TMP_VAR == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) {
05020               zend_error_noreturn(E_ERROR, "Can only throw objects");
05021        }
05022        zend_exception_save(TSRMLS_C);
05023        /* Not sure if a complete copy is what we want here */
05024        ALLOC_ZVAL(exception);
05025        INIT_PZVAL_COPY(exception, value);
05026        if (!1) {
05027               zval_copy_ctor(exception);
05028        }
05029 
05030        zend_throw_exception_object(exception TSRMLS_CC);
05031        zend_exception_restore(TSRMLS_C);
05032 
05033        ZEND_VM_NEXT_OPCODE();
05034 }
05035 
05036 static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05037 {
05038        zend_op *opline = EX(opline);
05039        if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
05040               && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
05041                      zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num);
05042        }
05043        {
05044               zval *valptr;
05045               zval *value;
05046               zend_free_op free_op1;
05047 
05048               value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05049 
05050               ALLOC_ZVAL(valptr);
05051               INIT_PZVAL_COPY(valptr, value);
05052               if (!1) {
05053                      zval_copy_ctor(valptr);
05054               }
05055               zend_vm_stack_push(valptr TSRMLS_CC);
05056 
05057        }
05058        ZEND_VM_NEXT_OPCODE();
05059 }
05060 
05061 static int ZEND_FASTCALL  ZEND_BOOL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05062 {
05063        zend_op *opline = EX(opline);
05064        zend_free_op free_op1;
05065 
05066        /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
05067        Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC));
05068        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
05069        zval_dtor(free_op1.var);
05070 
05071        ZEND_VM_NEXT_OPCODE();
05072 }
05073 
05074 static int ZEND_FASTCALL  ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05075 {
05076        zend_op *opline = EX(opline);
05077        zend_free_op free_op1;
05078        zval *obj = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05079        zend_class_entry *ce;
05080        zend_function *clone;
05081        zend_object_clone_obj_t clone_call;
05082 
05083        if (IS_TMP_VAR == IS_CONST ||
05084            (IS_TMP_VAR == IS_VAR && !obj) ||
05085            Z_TYPE_P(obj) != IS_OBJECT) {
05086               zend_error_noreturn(E_ERROR, "__clone method called on non-object");
05087        }
05088 
05089        ce = Z_OBJCE_P(obj);
05090        clone = ce ? ce->clone : NULL;
05091        clone_call =  Z_OBJ_HT_P(obj)->clone_obj;
05092        if (!clone_call) {
05093               if (ce) {
05094                      zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
05095               } else {
05096                      zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object");
05097               }
05098        }
05099 
05100        if (ce && clone) {
05101               if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
05102                      /* Ensure that if we're calling a private function, we're allowed to do so.
05103                       */
05104                      if (ce != EG(scope)) {
05105                             zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
05106                      }
05107               } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
05108                      /* Ensure that if we're calling a protected function, we're allowed to do so.
05109                       */
05110                      if (!zend_check_protected(clone->common.scope, EG(scope))) {
05111                             zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
05112                      }
05113               }
05114        }
05115 
05116        EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
05117        if (!EG(exception)) {
05118               ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
05119               Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC);
05120               Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT;
05121               Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
05122               Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
05123               if (!RETURN_VALUE_USED(opline) || EG(exception)) {
05124                      zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
05125               }
05126        }
05127 
05128        ZEND_VM_NEXT_OPCODE();
05129 }
05130 
05131 static int ZEND_FASTCALL  ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05132 {
05133        zend_op *opline = EX(opline);
05134        zend_free_op free_op1;
05135        zval *expr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05136        zval *result = &EX_T(opline->result.u.var).tmp_var;
05137 
05138        if (opline->extended_value != IS_STRING) {
05139               *result = *expr;
05140               if (!1) {
05141                      zendi_zval_copy_ctor(*result);
05142               }
05143        }
05144        switch (opline->extended_value) {
05145               case IS_NULL:
05146                      convert_to_null(result);
05147                      break;
05148               case IS_BOOL:
05149                      convert_to_boolean(result);
05150                      break;
05151               case IS_LONG:
05152                      convert_to_long(result);
05153                      break;
05154               case IS_DOUBLE:
05155                      convert_to_double(result);
05156                      break;
05157               case IS_STRING: {
05158                      zval var_copy;
05159                      int use_copy;
05160 
05161                      zend_make_printable_zval(expr, &var_copy, &use_copy);
05162                      if (use_copy) {
05163                             *result = var_copy;
05164                             if (1) {
05165                                    zval_dtor(free_op1.var);
05166                             }
05167                      } else {
05168                             *result = *expr;
05169                             if (!1) {
05170                                    zendi_zval_copy_ctor(*result);
05171                             }
05172                      }
05173                      break;
05174               }
05175               case IS_ARRAY:
05176                      convert_to_array(result);
05177                      break;
05178               case IS_OBJECT:
05179                      convert_to_object(result);
05180                      break;
05181        }
05182 
05183        ZEND_VM_NEXT_OPCODE();
05184 }
05185 
05186 static int ZEND_FASTCALL  ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05187 {
05188        zend_op *opline = EX(opline);
05189        zend_op_array *new_op_array=NULL;
05190        int return_value_used;
05191        zend_free_op free_op1;
05192        zval *inc_filename = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05193        zval tmp_inc_filename;
05194        zend_bool failure_retval=0;
05195 
05196        if (inc_filename->type!=IS_STRING) {
05197               tmp_inc_filename = *inc_filename;
05198               zval_copy_ctor(&tmp_inc_filename);
05199               convert_to_string(&tmp_inc_filename);
05200               inc_filename = &tmp_inc_filename;
05201        }
05202 
05203        return_value_used = RETURN_VALUE_USED(opline);
05204 
05205        if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
05206               if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
05207                      zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
05208               } else {
05209                      zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
05210               }
05211        } else {
05212               switch (Z_LVAL(opline->op2.u.constant)) {
05213                      case ZEND_INCLUDE_ONCE:
05214                      case ZEND_REQUIRE_ONCE: {
05215                                    zend_file_handle file_handle;
05216                                    char *resolved_path;
05217 
05218                                    resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
05219                                    if (resolved_path) {
05220                                           failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
05221                                    } else {
05222                                           resolved_path = Z_STRVAL_P(inc_filename);
05223                                    }
05224 
05225                                    if (failure_retval) {
05226                                           /* do nothing, file already included */
05227                                    } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
05228 
05229                                           if (!file_handle.opened_path) {
05230                                                  file_handle.opened_path = estrdup(resolved_path);
05231                                           }
05232 
05233                                           if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
05234                                                  new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
05235                                                  zend_destroy_file_handle(&file_handle TSRMLS_CC);
05236                                           } else {
05237                                                  zend_file_handle_dtor(&file_handle TSRMLS_CC);
05238                                                  failure_retval=1;
05239                                           }
05240                                    } else {
05241                                           if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
05242                                                  zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
05243                                           } else {
05244                                                  zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
05245                                           }
05246                                    }
05247                                    if (resolved_path != Z_STRVAL_P(inc_filename)) {
05248                                           efree(resolved_path);
05249                                    }
05250                             }
05251                             break;
05252                      case ZEND_INCLUDE:
05253                      case ZEND_REQUIRE:
05254                             new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
05255                             break;
05256                      case ZEND_EVAL: {
05257                                    char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
05258 
05259                                    new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
05260                                    efree(eval_desc);
05261                             }
05262                             break;
05263                      EMPTY_SWITCH_DEFAULT_CASE()
05264               }
05265        }
05266        if (inc_filename==&tmp_inc_filename) {
05267               zval_dtor(&tmp_inc_filename);
05268        }
05269        zval_dtor(free_op1.var);
05270        EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
05271        if (new_op_array && !EG(exception)) {
05272               EX(original_return_value) = EG(return_value_ptr_ptr);
05273               EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL;
05274               EG(active_op_array) = new_op_array;
05275               EX_T(opline->result.u.var).var.ptr = NULL;
05276 
05277               EX(current_object) = EX(object);
05278 
05279               EX(function_state).function = (zend_function *) new_op_array;
05280               EX(object) = NULL;
05281 
05282               if (!EG(active_symbol_table)) {
05283                      zend_rebuild_symbol_table(TSRMLS_C);
05284               }
05285 
05286               if (zend_execute == execute) {
05287                      EX(call_opline) = opline;
05288                      ZEND_VM_ENTER();
05289               } else {
05290                      zend_execute(new_op_array TSRMLS_CC);
05291               }
05292 
05293               EX(function_state).function = (zend_function *) EX(op_array);
05294               EX(object) = EX(current_object);
05295 
05296               if (return_value_used) {
05297                      if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */
05298                             ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
05299                             INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
05300                             Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1;
05301                             Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
05302                      }
05303               }
05304 
05305               EG(opline_ptr) = &EX(opline);
05306               EG(active_op_array) = EX(op_array);
05307               EG(return_value_ptr_ptr) = EX(original_return_value);
05308               destroy_op_array(new_op_array TSRMLS_CC);
05309               efree(new_op_array);
05310               if (EG(exception)) {
05311                      zend_throw_exception_internal(NULL TSRMLS_CC);
05312               }
05313        } else {
05314               if (return_value_used) {
05315                      ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
05316                      INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr);
05317                      Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval;
05318                      Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
05319               }
05320        }
05321        ZEND_VM_NEXT_OPCODE();
05322 }
05323 
05324 static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05325 {
05326        zend_op *opline = EX(opline);
05327        zval tmp, *varname;
05328        HashTable *target_symbol_table;
05329        zend_free_op free_op1;
05330 
05331        if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
05332               if (EG(active_symbol_table)) {
05333                      zend_execute_data *ex = EX(prev_execute_data);
05334                      zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
05335 
05336                      if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) {
05337                             while (ex && ex->symbol_table == EG(active_symbol_table)) {
05338                                    int i;
05339 
05340                                    if (ex->op_array) {
05341                                           for (i = 0; i < ex->op_array->last_var; i++) {
05342                                                  if (ex->op_array->vars[i].hash_value == cv->hash_value &&
05343                                                         ex->op_array->vars[i].name_len == cv->name_len &&
05344                                                         !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) {
05345                                                         ex->CVs[i] = NULL;
05346                                                         break;
05347                                                  }
05348                                           }
05349                                    }
05350                                    ex = ex->prev_execute_data;
05351                             }
05352                      }
05353                      EX(CVs)[opline->op1.u.var] = NULL;
05354               } else if (EX(CVs)[opline->op1.u.var]) {
05355                      zval_ptr_dtor(EX(CVs)[opline->op1.u.var]);
05356                      EX(CVs)[opline->op1.u.var] = NULL;
05357               }
05358               ZEND_VM_NEXT_OPCODE();
05359        }
05360 
05361        varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05362 
05363        if (Z_TYPE_P(varname) != IS_STRING) {
05364               tmp = *varname;
05365               zval_copy_ctor(&tmp);
05366               convert_to_string(&tmp);
05367               varname = &tmp;
05368        } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
05369               Z_ADDREF_P(varname);
05370        }
05371 
05372        if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
05373               zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC);
05374        } else {
05375               ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
05376 
05377               target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
05378               if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) {
05379                      zend_execute_data *ex = execute_data;
05380 
05381                      do {
05382                             int i;
05383 
05384                             if (ex->op_array) {
05385                                    for (i = 0; i < ex->op_array->last_var; i++) {
05386                                           if (ex->op_array->vars[i].hash_value == hash_value &&
05387                                                  ex->op_array->vars[i].name_len == varname->value.str.len &&
05388                                                  !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) {
05389                                                  ex->CVs[i] = NULL;
05390                                                  break;
05391                                           }
05392                                    }
05393                             }
05394                             ex = ex->prev_execute_data;
05395                      } while (ex && ex->symbol_table == target_symbol_table);
05396               }
05397        }
05398 
05399        if (varname == &tmp) {
05400               zval_dtor(&tmp);
05401        } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
05402               zval_ptr_dtor(&varname);
05403        }
05404        zval_dtor(free_op1.var);
05405        ZEND_VM_NEXT_OPCODE();
05406 }
05407 
05408 static int ZEND_FASTCALL  ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05409 {
05410        zend_op *opline = EX(opline);
05411        zend_free_op free_op1;
05412        zval *array_ptr, **array_ptr_ptr;
05413        HashTable *fe_ht;
05414        zend_object_iterator *iter = NULL;
05415        zend_class_entry *ce = NULL;
05416        zend_bool is_empty = 0;
05417 
05418        if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
05419               array_ptr_ptr = NULL;
05420               if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
05421                      ALLOC_INIT_ZVAL(array_ptr);
05422               } else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
05423                      if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
05424                             zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
05425                             ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
05426                      }
05427 
05428                      ce = Z_OBJCE_PP(array_ptr_ptr);
05429                      if (!ce || ce->get_iterator == NULL) {
05430                             SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
05431                             Z_ADDREF_PP(array_ptr_ptr);
05432                      }
05433                      array_ptr = *array_ptr_ptr;
05434               } else {
05435                      if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
05436                             SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
05437                             if (opline->extended_value & ZEND_FE_FETCH_BYREF) {
05438                                    Z_SET_ISREF_PP(array_ptr_ptr);
05439                             }
05440                      }
05441                      array_ptr = *array_ptr_ptr;
05442                      Z_ADDREF_P(array_ptr);
05443               }
05444        } else {
05445               array_ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05446               if (1) { /* IS_TMP_VAR */
05447                      zval *tmp;
05448 
05449                      ALLOC_ZVAL(tmp);
05450                      INIT_PZVAL_COPY(tmp, array_ptr);
05451                      array_ptr = tmp;
05452                      if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
05453                             ce = Z_OBJCE_P(array_ptr);
05454                             if (ce && ce->get_iterator) {
05455                                    Z_DELREF_P(array_ptr);
05456                             }
05457                      }
05458               } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
05459                      ce = Z_OBJCE_P(array_ptr);
05460                      if (!ce || !ce->get_iterator) {
05461                             Z_ADDREF_P(array_ptr);
05462                      }
05463               } else if (IS_TMP_VAR == IS_CONST ||
05464                          ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
05465                           !Z_ISREF_P(array_ptr) &&
05466                           Z_REFCOUNT_P(array_ptr) > 1)) {
05467                      zval *tmp;
05468 
05469                      ALLOC_ZVAL(tmp);
05470                      INIT_PZVAL_COPY(tmp, array_ptr);
05471                      zval_copy_ctor(tmp);
05472                      array_ptr = tmp;
05473               } else {
05474                      Z_ADDREF_P(array_ptr);
05475               }
05476        }
05477 
05478        if (ce && ce->get_iterator) {
05479               iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
05480 
05481               if (iter && !EG(exception)) {
05482                      array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
05483               } else {
05484                      if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
05485 
05486                      } else {
05487 
05488                      }
05489                      if (!EG(exception)) {
05490                             zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
05491                      }
05492                      zend_throw_exception_internal(NULL TSRMLS_CC);
05493                      ZEND_VM_NEXT_OPCODE();
05494               }
05495        }
05496 
05497        AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr);
05498        PZVAL_LOCK(array_ptr);
05499 
05500        if (iter) {
05501               iter->index = 0;
05502               if (iter->funcs->rewind) {
05503                      iter->funcs->rewind(iter TSRMLS_CC);
05504                      if (EG(exception)) {
05505                             Z_DELREF_P(array_ptr);
05506                             zval_ptr_dtor(&array_ptr);
05507                             if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
05508 
05509                             } else {
05510 
05511                             }
05512                             ZEND_VM_NEXT_OPCODE();
05513                      }
05514               }
05515               is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
05516               if (EG(exception)) {
05517                      Z_DELREF_P(array_ptr);
05518                      zval_ptr_dtor(&array_ptr);
05519                      if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
05520 
05521                      } else {
05522 
05523                      }
05524                      ZEND_VM_NEXT_OPCODE();
05525               }
05526               iter->index = -1; /* will be set to 0 before using next handler */
05527        } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
05528               zend_hash_internal_pointer_reset(fe_ht);
05529               if (ce) {
05530                      zend_object *zobj = zend_objects_get_address(array_ptr TSRMLS_CC);
05531                      while (zend_hash_has_more_elements(fe_ht) == SUCCESS) {
05532                             char *str_key;
05533                             uint str_key_len;
05534                             ulong int_key;
05535                             zend_uchar key_type;
05536 
05537                             key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
05538                             if (key_type != HASH_KEY_NON_EXISTANT &&
05539                                    (key_type == HASH_KEY_IS_LONG ||
05540                                  zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
05541                                    break;
05542                             }
05543                             zend_hash_move_forward(fe_ht);
05544                      }
05545               }
05546               is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
05547               zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos);
05548        } else {
05549               zend_error(E_WARNING, "Invalid argument supplied for foreach()");
05550               is_empty = 1;
05551        }
05552 
05553        if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
05554 
05555        } else {
05556 
05557        }
05558        if (is_empty) {
05559               ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
05560        } else {
05561               ZEND_VM_NEXT_OPCODE();
05562        }
05563 }
05564 
05565 static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05566 {
05567        zend_op *opline = EX(opline);
05568        zval **value;
05569        zend_bool isset = 1;
05570 
05571        if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
05572               if (EX(CVs)[opline->op1.u.var]) {
05573                      value = EX(CVs)[opline->op1.u.var];
05574               } else if (EG(active_symbol_table)) {
05575                      zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
05576 
05577                      if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
05578                             isset = 0;
05579                      }
05580               } else {
05581                      isset = 0;
05582               }
05583        } else {
05584               HashTable *target_symbol_table;
05585               zend_free_op free_op1;
05586               zval tmp, *varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05587 
05588               if (Z_TYPE_P(varname) != IS_STRING) {
05589                      tmp = *varname;
05590                      zval_copy_ctor(&tmp);
05591                      convert_to_string(&tmp);
05592                      varname = &tmp;
05593               }
05594 
05595               if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
05596                      value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC);
05597                      if (!value) {
05598                             isset = 0;
05599                      }
05600               } else {
05601                      target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
05602                      if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
05603                             isset = 0;
05604                      }
05605               }
05606 
05607               if (varname == &tmp) {
05608                      zval_dtor(&tmp);
05609               }
05610               zval_dtor(free_op1.var);
05611        }
05612 
05613        Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
05614 
05615        switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) {
05616               case ZEND_ISSET:
05617                      if (isset && Z_TYPE_PP(value) == IS_NULL) {
05618                             Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
05619                      } else {
05620                             Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset;
05621                      }
05622                      break;
05623               case ZEND_ISEMPTY:
05624                      if (!isset || !i_zend_is_true(*value)) {
05625                             Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
05626                      } else {
05627                             Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
05628                      }
05629                      break;
05630        }
05631 
05632        ZEND_VM_NEXT_OPCODE();
05633 }
05634 
05635 static int ZEND_FASTCALL  ZEND_EXIT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05636 {
05637 #if 0 || (IS_TMP_VAR != IS_UNUSED)
05638        zend_op *opline = EX(opline);
05639        if (IS_TMP_VAR != IS_UNUSED) {
05640               zend_free_op free_op1;
05641               zval *ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05642 
05643               if (Z_TYPE_P(ptr) == IS_LONG) {
05644                      EG(exit_status) = Z_LVAL_P(ptr);
05645               } else {
05646                      zend_print_variable(ptr);
05647               }
05648               zval_dtor(free_op1.var);
05649        }
05650 #endif
05651        zend_bailout();
05652        ZEND_VM_NEXT_OPCODE();
05653 }
05654 
05655 static int ZEND_FASTCALL  ZEND_END_SILENCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05656 {
05657        zend_op *opline = EX(opline);
05658        zval restored_error_reporting;
05659 
05660        if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.u.var).tmp_var) != 0) {
05661               Z_TYPE(restored_error_reporting) = IS_LONG;
05662               Z_LVAL(restored_error_reporting) = Z_LVAL(EX_T(opline->op1.u.var).tmp_var);
05663               convert_to_string(&restored_error_reporting);
05664               zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC);
05665               zendi_zval_dtor(restored_error_reporting);
05666        }
05667        if (EX(old_error_reporting) == &EX_T(opline->op1.u.var).tmp_var) {
05668               EX(old_error_reporting) = NULL;
05669        }
05670        ZEND_VM_NEXT_OPCODE();
05671 }
05672 
05673 static int ZEND_FASTCALL  ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05674 {
05675        zend_op *opline = EX(opline);
05676        zend_free_op free_op1;
05677        zval *value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05678 
05679        if (i_zend_is_true(value)) {
05680               EX_T(opline->result.u.var).tmp_var = *value;
05681               zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
05682               zval_dtor(free_op1.var);
05683 #if DEBUG_ZEND>=2
05684               printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
05685 #endif
05686               ZEND_VM_JMP(opline->op2.u.jmp_addr);
05687        }
05688 
05689        zval_dtor(free_op1.var);
05690        ZEND_VM_NEXT_OPCODE();
05691 }
05692 
05693 static int ZEND_FASTCALL  ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05694 {
05695        zend_op *opline = EX(opline);
05696        zend_free_op free_op1;
05697        zval *value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05698 
05699        EX_T(opline->result.u.var).tmp_var = *value;
05700        if (!1) {
05701               zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
05702        }
05703 
05704        ZEND_VM_NEXT_OPCODE();
05705 }
05706 
05707 static int ZEND_FASTCALL  ZEND_INSTANCEOF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05708 {
05709        zend_op *opline = EX(opline);
05710        zend_free_op free_op1;
05711        zval *expr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05712        zend_bool result;
05713 
05714        if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) {
05715               result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.u.var).class_entry TSRMLS_CC);
05716        } else {
05717               result = 0;
05718        }
05719        ZVAL_BOOL(&EX_T(opline->result.u.var).tmp_var, result);
05720        zval_dtor(free_op1.var);
05721        ZEND_VM_NEXT_OPCODE();
05722 }
05723 
05724 static int ZEND_FASTCALL  ZEND_ADD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05725 {
05726        zend_op *opline = EX(opline);
05727        zend_free_op free_op1;
05728 
05729        add_function(&EX_T(opline->result.u.var).tmp_var,
05730               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05731               &opline->op2.u.constant TSRMLS_CC);
05732        zval_dtor(free_op1.var);
05733 
05734        ZEND_VM_NEXT_OPCODE();
05735 }
05736 
05737 static int ZEND_FASTCALL  ZEND_SUB_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05738 {
05739        zend_op *opline = EX(opline);
05740        zend_free_op free_op1;
05741 
05742        sub_function(&EX_T(opline->result.u.var).tmp_var,
05743               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05744               &opline->op2.u.constant TSRMLS_CC);
05745        zval_dtor(free_op1.var);
05746 
05747        ZEND_VM_NEXT_OPCODE();
05748 }
05749 
05750 static int ZEND_FASTCALL  ZEND_MUL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05751 {
05752        zend_op *opline = EX(opline);
05753        zend_free_op free_op1;
05754 
05755        mul_function(&EX_T(opline->result.u.var).tmp_var,
05756               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05757               &opline->op2.u.constant TSRMLS_CC);
05758        zval_dtor(free_op1.var);
05759 
05760        ZEND_VM_NEXT_OPCODE();
05761 }
05762 
05763 static int ZEND_FASTCALL  ZEND_DIV_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05764 {
05765        zend_op *opline = EX(opline);
05766        zend_free_op free_op1;
05767 
05768        div_function(&EX_T(opline->result.u.var).tmp_var,
05769               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05770               &opline->op2.u.constant TSRMLS_CC);
05771        zval_dtor(free_op1.var);
05772 
05773        ZEND_VM_NEXT_OPCODE();
05774 }
05775 
05776 static int ZEND_FASTCALL  ZEND_MOD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05777 {
05778        zend_op *opline = EX(opline);
05779        zend_free_op free_op1;
05780 
05781        mod_function(&EX_T(opline->result.u.var).tmp_var,
05782               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05783               &opline->op2.u.constant TSRMLS_CC);
05784        zval_dtor(free_op1.var);
05785 
05786        ZEND_VM_NEXT_OPCODE();
05787 }
05788 
05789 static int ZEND_FASTCALL  ZEND_SL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05790 {
05791        zend_op *opline = EX(opline);
05792        zend_free_op free_op1;
05793 
05794        shift_left_function(&EX_T(opline->result.u.var).tmp_var,
05795               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05796               &opline->op2.u.constant TSRMLS_CC);
05797        zval_dtor(free_op1.var);
05798 
05799        ZEND_VM_NEXT_OPCODE();
05800 }
05801 
05802 static int ZEND_FASTCALL  ZEND_SR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05803 {
05804        zend_op *opline = EX(opline);
05805        zend_free_op free_op1;
05806 
05807        shift_right_function(&EX_T(opline->result.u.var).tmp_var,
05808               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05809               &opline->op2.u.constant TSRMLS_CC);
05810        zval_dtor(free_op1.var);
05811 
05812        ZEND_VM_NEXT_OPCODE();
05813 }
05814 
05815 static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05816 {
05817        zend_op *opline = EX(opline);
05818        zend_free_op free_op1;
05819 
05820        concat_function(&EX_T(opline->result.u.var).tmp_var,
05821               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05822               &opline->op2.u.constant TSRMLS_CC);
05823        zval_dtor(free_op1.var);
05824 
05825        ZEND_VM_NEXT_OPCODE();
05826 }
05827 
05828 static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05829 {
05830        zend_op *opline = EX(opline);
05831        zend_free_op free_op1;
05832 
05833        is_identical_function(&EX_T(opline->result.u.var).tmp_var,
05834               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05835               &opline->op2.u.constant TSRMLS_CC);
05836        zval_dtor(free_op1.var);
05837 
05838        ZEND_VM_NEXT_OPCODE();
05839 }
05840 
05841 static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05842 {
05843        zend_op *opline = EX(opline);
05844        zend_free_op free_op1;
05845        zval *result = &EX_T(opline->result.u.var).tmp_var;
05846 
05847        is_identical_function(result,
05848               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05849               &opline->op2.u.constant TSRMLS_CC);
05850        Z_LVAL_P(result) = !Z_LVAL_P(result);
05851        zval_dtor(free_op1.var);
05852 
05853        ZEND_VM_NEXT_OPCODE();
05854 }
05855 
05856 static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05857 {
05858        zend_op *opline = EX(opline);
05859        zend_free_op free_op1;
05860        zval *result = &EX_T(opline->result.u.var).tmp_var;
05861 
05862        compare_function(result,
05863               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05864               &opline->op2.u.constant TSRMLS_CC);
05865        ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
05866        zval_dtor(free_op1.var);
05867 
05868        ZEND_VM_NEXT_OPCODE();
05869 }
05870 
05871 static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05872 {
05873        zend_op *opline = EX(opline);
05874        zend_free_op free_op1;
05875        zval *result = &EX_T(opline->result.u.var).tmp_var;
05876 
05877        compare_function(result,
05878               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05879               &opline->op2.u.constant TSRMLS_CC);
05880        ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
05881        zval_dtor(free_op1.var);
05882 
05883        ZEND_VM_NEXT_OPCODE();
05884 }
05885 
05886 static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05887 {
05888        zend_op *opline = EX(opline);
05889        zend_free_op free_op1;
05890        zval *result = &EX_T(opline->result.u.var).tmp_var;
05891 
05892        compare_function(result,
05893               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05894               &opline->op2.u.constant TSRMLS_CC);
05895        ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
05896        zval_dtor(free_op1.var);
05897 
05898        ZEND_VM_NEXT_OPCODE();
05899 }
05900 
05901 static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05902 {
05903        zend_op *opline = EX(opline);
05904        zend_free_op free_op1;
05905        zval *result = &EX_T(opline->result.u.var).tmp_var;
05906 
05907        compare_function(result,
05908               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05909               &opline->op2.u.constant TSRMLS_CC);
05910        ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
05911        zval_dtor(free_op1.var);
05912 
05913        ZEND_VM_NEXT_OPCODE();
05914 }
05915 
05916 static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05917 {
05918        zend_op *opline = EX(opline);
05919        zend_free_op free_op1;
05920 
05921        bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
05922               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05923               &opline->op2.u.constant TSRMLS_CC);
05924        zval_dtor(free_op1.var);
05925 
05926        ZEND_VM_NEXT_OPCODE();
05927 }
05928 
05929 static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05930 {
05931        zend_op *opline = EX(opline);
05932        zend_free_op free_op1;
05933 
05934        bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
05935               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05936               &opline->op2.u.constant TSRMLS_CC);
05937        zval_dtor(free_op1.var);
05938 
05939        ZEND_VM_NEXT_OPCODE();
05940 }
05941 
05942 static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05943 {
05944        zend_op *opline = EX(opline);
05945        zend_free_op free_op1;
05946 
05947        bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
05948               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05949               &opline->op2.u.constant TSRMLS_CC);
05950        zval_dtor(free_op1.var);
05951 
05952        ZEND_VM_NEXT_OPCODE();
05953 }
05954 
05955 static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05956 {
05957        zend_op *opline = EX(opline);
05958        zend_free_op free_op1;
05959 
05960        boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
05961               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
05962               &opline->op2.u.constant TSRMLS_CC);
05963        zval_dtor(free_op1.var);
05964 
05965        ZEND_VM_NEXT_OPCODE();
05966 }
05967 
05968 static int ZEND_FASTCALL  ZEND_FETCH_DIM_TMP_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05969 {
05970        zend_op *opline = EX(opline);
05971        zend_free_op free_op1;
05972        zval *container = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
05973 
05974        if (Z_TYPE_P(container) != IS_ARRAY) {
05975               if (!RETURN_VALUE_UNUSED(&opline->result)) {
05976                      AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
05977                      PZVAL_LOCK(EG(uninitialized_zval_ptr));
05978               }
05979        } else {
05980 
05981               zval *dim = &opline->op2.u.constant;
05982 
05983               AI_SET_PTR(EX_T(opline->result.u.var).var, *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, BP_VAR_R TSRMLS_CC));
05984               SELECTIVE_PZVAL_LOCK(EX_T(opline->result.u.var).var.ptr, &opline->result);
05985 
05986        }
05987        ZEND_VM_NEXT_OPCODE();
05988 }
05989 
05990 static int ZEND_FASTCALL  ZEND_ADD_CHAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
05991 {
05992        zend_op *opline = EX(opline);
05993        zval *str = &EX_T(opline->result.u.var).tmp_var;
05994 
05995        if (IS_TMP_VAR == IS_UNUSED) {
05996               /* Initialize for erealloc in add_char_to_string */
05997               Z_STRVAL_P(str) = NULL;
05998               Z_STRLEN_P(str) = 0;
05999               Z_TYPE_P(str) = IS_STRING;
06000 
06001               INIT_PZVAL(str);
06002        }
06003 
06004        add_char_to_string(str, str, &opline->op2.u.constant);
06005 
06006        /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
06007        ZEND_VM_NEXT_OPCODE();
06008 }
06009 
06010 static int ZEND_FASTCALL  ZEND_ADD_STRING_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06011 {
06012        zend_op *opline = EX(opline);
06013        zval *str = &EX_T(opline->result.u.var).tmp_var;
06014 
06015        if (IS_TMP_VAR == IS_UNUSED) {
06016               /* Initialize for erealloc in add_string_to_string */
06017               Z_STRVAL_P(str) = NULL;
06018               Z_STRLEN_P(str) = 0;
06019               Z_TYPE_P(str) = IS_STRING;
06020 
06021               INIT_PZVAL(str);
06022        }
06023 
06024        add_string_to_string(str, str, &opline->op2.u.constant);
06025 
06026        /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
06027        ZEND_VM_NEXT_OPCODE();
06028 }
06029 
06030 static int ZEND_FASTCALL  ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06031 {
06032        zend_op *opline = EX(opline);
06033        zval *function_name;
06034        char *function_name_strval;
06035        int function_name_strlen;
06036        zend_free_op free_op1;
06037 
06038        zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
06039 
06040        function_name = &opline->op2.u.constant;
06041 
06042        if (Z_TYPE_P(function_name)!=IS_STRING) {
06043               zend_error_noreturn(E_ERROR, "Method name must be a string");
06044        }
06045 
06046        function_name_strval = Z_STRVAL_P(function_name);
06047        function_name_strlen = Z_STRLEN_P(function_name);
06048 
06049        EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
06050 
06051        if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
06052               if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
06053                      zend_error_noreturn(E_ERROR, "Object does not support method calls");
06054               }
06055 
06056               /* First, locate the function. */
06057               EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
06058               if (!EX(fbc)) {
06059                      zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
06060               }
06061 
06062               EX(called_scope) = Z_OBJCE_P(EX(object));
06063        } else {
06064               zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
06065        }
06066 
06067        if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
06068               EX(object) = NULL;
06069        } else {
06070               if (!PZVAL_IS_REF(EX(object))) {
06071                      Z_ADDREF_P(EX(object)); /* For $this pointer */
06072               } else {
06073                      zval *this_ptr;
06074                      ALLOC_ZVAL(this_ptr);
06075                      INIT_PZVAL_COPY(this_ptr, EX(object));
06076                      zval_copy_ctor(this_ptr);
06077                      EX(object) = this_ptr;
06078               }
06079        }
06080 
06081 
06082        ZEND_VM_NEXT_OPCODE();
06083 }
06084 
06085 static int ZEND_FASTCALL  ZEND_CASE_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06086 {
06087        zend_op *opline = EX(opline);
06088        int switch_expr_is_overloaded=0;
06089        zend_free_op free_op1;
06090 
06091        if (IS_TMP_VAR==IS_VAR) {
06092               if (EX_T(opline->op1.u.var).var.ptr_ptr) {
06093                      PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
06094               } else {
06095                      switch_expr_is_overloaded = 1;
06096                      Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
06097               }
06098        }
06099        is_equal_function(&EX_T(opline->result.u.var).tmp_var,
06100                              _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
06101                              &opline->op2.u.constant TSRMLS_CC);
06102 
06103        if (switch_expr_is_overloaded) {
06104               /* We only free op1 if this is a string offset,
06105                * Since if it is a TMP_VAR, it'll be reused by
06106                * other CASE opcodes (whereas string offsets
06107                * are allocated at each get_zval_ptr())
06108                */
06109               zval_dtor(free_op1.var);
06110               EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
06111               EX_T(opline->op1.u.var).var.ptr = NULL;
06112        }
06113        ZEND_VM_NEXT_OPCODE();
06114 }
06115 
06116 static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06117 {
06118        zend_op *opline = EX(opline);
06119        zend_free_op free_op1;
06120        zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
06121        zval *expr_ptr;
06122        zval *offset=&opline->op2.u.constant;
06123 
06124 #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
06125        zval **expr_ptr_ptr = NULL;
06126 
06127        if (opline->extended_value) {
06128               expr_ptr_ptr=NULL;
06129               expr_ptr = *expr_ptr_ptr;
06130        } else {
06131               expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
06132        }
06133 #else
06134        expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
06135 #endif
06136 
06137        if (1) { /* temporary variable */
06138               zval *new_expr;
06139 
06140               ALLOC_ZVAL(new_expr);
06141               INIT_PZVAL_COPY(new_expr, expr_ptr);
06142               expr_ptr = new_expr;
06143        } else {
06144 #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
06145               if (opline->extended_value) {
06146                      SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
06147                      expr_ptr = *expr_ptr_ptr;
06148                      Z_ADDREF_P(expr_ptr);
06149               } else
06150 #endif
06151               if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
06152                      zval *new_expr;
06153 
06154                      ALLOC_ZVAL(new_expr);
06155                      INIT_PZVAL_COPY(new_expr, expr_ptr);
06156                      expr_ptr = new_expr;
06157                      zendi_zval_copy_ctor(*expr_ptr);
06158               } else {
06159                      Z_ADDREF_P(expr_ptr);
06160               }
06161        }
06162        if (offset) {
06163               switch (Z_TYPE_P(offset)) {
06164                      case IS_DOUBLE:
06165                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
06166                             break;
06167                      case IS_LONG:
06168                      case IS_BOOL:
06169                             zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
06170                             break;
06171                      case IS_STRING:
06172                             zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
06173                             break;
06174                      case IS_NULL:
06175                             zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
06176                             break;
06177                      default:
06178                             zend_error(E_WARNING, "Illegal offset type");
06179                             zval_ptr_dtor(&expr_ptr);
06180                             /* do nothing */
06181                             break;
06182               }
06183 
06184        } else {
06185               zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
06186        }
06187        if (opline->extended_value) {
06188 
06189        } else {
06190 
06191        }
06192        ZEND_VM_NEXT_OPCODE();
06193 }
06194 
06195 static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06196 {
06197        zend_op *opline = EX(opline);
06198 
06199        array_init(&EX_T(opline->result.u.var).tmp_var);
06200        if (IS_TMP_VAR == IS_UNUSED) {
06201               ZEND_VM_NEXT_OPCODE();
06202 #if 0 || IS_TMP_VAR != IS_UNUSED
06203        } else {
06204               return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
06205 #endif
06206        }
06207 }
06208 
06209 static int ZEND_FASTCALL  ZEND_ADD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06210 {
06211        zend_op *opline = EX(opline);
06212        zend_free_op free_op1, free_op2;
06213 
06214        add_function(&EX_T(opline->result.u.var).tmp_var,
06215               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
06216               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
06217        zval_dtor(free_op1.var);
06218        zval_dtor(free_op2.var);
06219        ZEND_VM_NEXT_OPCODE();
06220 }
06221 
06222 static int ZEND_FASTCALL  ZEND_SUB_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06223 {
06224        zend_op *opline = EX(opline);
06225        zend_free_op free_op1, free_op2;
06226 
06227        sub_function(&EX_T(opline->result.u.var).tmp_var,
06228               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
06229               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
06230        zval_dtor(free_op1.var);
06231        zval_dtor(free_op2.var);
06232        ZEND_VM_NEXT_OPCODE();
06233 }
06234 
06235 static int ZEND_FASTCALL  ZEND_MUL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06236 {
06237        zend_op *opline = EX(opline);
06238        zend_free_op free_op1, free_op2;
06239 
06240        mul_function(&EX_T(opline->result.u.var).tmp_var,
06241               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
06242               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
06243        zval_dtor(free_op1.var);
06244        zval_dtor(free_op2.var);
06245        ZEND_VM_NEXT_OPCODE();
06246 }
06247 
06248 static int ZEND_FASTCALL  ZEND_DIV_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06249 {
06250        zend_op *opline = EX(opline);
06251        zend_free_op free_op1, free_op2;
06252 
06253        div_function(&EX_T(opline->result.u.var).tmp_var,
06254               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
06255               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
06256        zval_dtor(free_op1.var);
06257        zval_dtor(free_op2.var);
06258        ZEND_VM_NEXT_OPCODE();
06259 }
06260 
06261 static int ZEND_FASTCALL  ZEND_MOD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06262 {
06263        zend_op *opline = EX(opline);
06264        zend_free_op free_op1, free_op2;
06265 
06266        mod_function(&EX_T(opline->result.u.var).tmp_var,
06267               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
06268               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
06269        zval_dtor(free_op1.var);
06270        zval_dtor(free_op2.var);
06271        ZEND_VM_NEXT_OPCODE();
06272 }
06273 
06274 static int ZEND_FASTCALL  ZEND_SL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06275 {
06276        zend_op *opline = EX(opline);
06277        zend_free_op free_op1, free_op2;
06278 
06279        shift_left_function(&EX_T(opline->result.u.var).tmp_var,
06280               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
06281               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
06282        zval_dtor(free_op1.var);
06283        zval_dtor(free_op2.var);
06284        ZEND_VM_NEXT_OPCODE();
06285 }
06286 
06287 static int ZEND_FASTCALL  ZEND_SR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
06288 {
06289        zend_op *opline = EX(opline);
06290        zend_free_op free_op1, free_op2;
06291 
06292        shift_right_function(&EX_T(opline->result.u.var).tmp_var,
06293               _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
06294               _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
06295        zval_dtor(free_op1.var);
06296