diff options
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r-- | Zend/zend_compile.c | 1645 |
1 files changed, 820 insertions, 825 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 95892cbe67..c196e39887 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -35,7 +35,7 @@ #define SET_NODE(target, src) do { \ target ## _type = (src)->op_type; \ if ((src)->op_type == IS_CONST) { \ - target.constant = zend_add_literal(CG(active_op_array), &(src)->u.constant TSRMLS_CC); \ + target.constant = zend_add_literal(CG(active_op_array), &(src)->u.constant); \ } else { \ target = (src)->u.op; \ } \ @@ -50,21 +50,21 @@ } \ } while (0) -static inline void zend_alloc_cache_slot(uint32_t literal TSRMLS_DC) { +static inline void zend_alloc_cache_slot(uint32_t literal) { zend_op_array *op_array = CG(active_op_array); Z_CACHE_SLOT(op_array->literals[literal]) = op_array->last_cache_slot++; } #define POLYMORPHIC_CACHE_SLOT_SIZE 2 -static inline void zend_alloc_polymorphic_cache_slot(uint32_t literal TSRMLS_DC) { +static inline void zend_alloc_polymorphic_cache_slot(uint32_t literal) { zend_op_array *op_array = CG(active_op_array); Z_CACHE_SLOT(op_array->literals[literal]) = op_array->last_cache_slot; op_array->last_cache_slot += POLYMORPHIC_CACHE_SLOT_SIZE; } -ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC); -ZEND_API zend_op_array *(*zend_compile_string)(zval *source_string, char *filename TSRMLS_DC); +ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type); +ZEND_API zend_op_array *(*zend_compile_string)(zval *source_string, char *filename); #ifndef ZTS ZEND_API zend_compiler_globals compiler_globals; @@ -91,11 +91,11 @@ static void zend_destroy_property_info_internal(zval *zv) /* {{{ */ } /* }}} */ -static zend_string *zend_new_interned_string_safe(zend_string *str TSRMLS_DC) /* {{{ */ { +static zend_string *zend_new_interned_string_safe(zend_string *str) /* {{{ */ { zend_string *interned_str; zend_string_addref(str); - interned_str = zend_new_interned_string(str TSRMLS_CC); + interned_str = zend_new_interned_string(str); if (str != interned_str) { return interned_str; } else { @@ -105,7 +105,7 @@ static zend_string *zend_new_interned_string_safe(zend_string *str TSRMLS_DC) /* } /* }}} */ -static zend_string *zend_build_runtime_definition_key(zend_string *name, unsigned char *lex_pos TSRMLS_DC) /* {{{ */ +static zend_string *zend_build_runtime_definition_key(zend_string *name, unsigned char *lex_pos) /* {{{ */ { zend_string *result; char char_pos_buf[32]; @@ -122,7 +122,7 @@ static zend_string *zend_build_runtime_definition_key(zend_string *name, unsigne /* NULL, name length, filename length, last accepting char position length */ result = zend_string_alloc(1 + name->len + filename_len + char_pos_len, 0); sprintf(result->val, "%c%s%s%s", '\0', name->val, filename, char_pos_buf); - return zend_new_interned_string(result TSRMLS_CC); + return zend_new_interned_string(result); } /* }}} */ @@ -139,13 +139,13 @@ static zend_bool zend_get_unqualified_name(const zend_string *name, const char * } /* }}} */ -static void init_compiler_declarables(TSRMLS_D) /* {{{ */ +static void init_compiler_declarables(void) /* {{{ */ { ZVAL_LONG(&CG(declarables).ticks, 0); } /* }}} */ -void zend_init_compiler_context(TSRMLS_D) /* {{{ */ +void zend_init_compiler_context(void) /* {{{ */ { CG(context).opcodes_size = INITIAL_OP_ARRAY_SIZE; CG(context).vars_size = 0; @@ -158,7 +158,7 @@ void zend_init_compiler_context(TSRMLS_D) /* {{{ */ } /* }}} */ -void zend_init_compiler_data_structures(TSRMLS_D) /* {{{ */ +void zend_init_compiler_data_structures(void) /* {{{ */ { zend_stack_init(&CG(loop_var_stack), sizeof(znode)); zend_stack_init(&CG(delayed_oplines_stack), sizeof(zend_op)); @@ -172,7 +172,7 @@ void zend_init_compiler_data_structures(TSRMLS_D) /* {{{ */ CG(current_import_function) = NULL; CG(current_import_const) = NULL; zend_hash_init(&CG(const_filenames), 8, NULL, NULL, 0); - init_compiler_declarables(TSRMLS_C); + init_compiler_declarables(); zend_stack_init(&CG(context_stack), sizeof(CG(context))); CG(encoding_declared) = 0; @@ -181,26 +181,25 @@ void zend_init_compiler_data_structures(TSRMLS_D) /* {{{ */ ZEND_API void file_handle_dtor(zend_file_handle *fh) /* {{{ */ { - TSRMLS_FETCH(); - zend_file_handle_dtor(fh TSRMLS_CC); + zend_file_handle_dtor(fh); } /* }}} */ -void init_compiler(TSRMLS_D) /* {{{ */ +void init_compiler(void) /* {{{ */ { CG(arena) = zend_arena_create(64 * 1024); CG(active_op_array) = NULL; memset(&CG(context), 0, sizeof(CG(context))); - zend_init_compiler_data_structures(TSRMLS_C); - zend_init_rsrc_list(TSRMLS_C); + zend_init_compiler_data_structures(); + zend_init_rsrc_list(); zend_hash_init(&CG(filenames_table), 8, NULL, free_string_zval, 0); zend_llist_init(&CG(open_files), sizeof(zend_file_handle), (void (*)(void *)) file_handle_dtor, 0); CG(unclean_shutdown) = 0; } /* }}} */ -void shutdown_compiler(TSRMLS_D) /* {{{ */ +void shutdown_compiler(void) /* {{{ */ { zend_stack_destroy(&CG(loop_var_stack)); zend_stack_destroy(&CG(delayed_oplines_stack)); @@ -211,7 +210,7 @@ void shutdown_compiler(TSRMLS_D) /* {{{ */ } /* }}} */ -ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filename TSRMLS_DC) /* {{{ */ +ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filename) /* {{{ */ { zend_string *p; @@ -227,25 +226,25 @@ ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filen } /* }}} */ -ZEND_API void zend_restore_compiled_filename(zend_string *original_compiled_filename TSRMLS_DC) /* {{{ */ +ZEND_API void zend_restore_compiled_filename(zend_string *original_compiled_filename) /* {{{ */ { CG(compiled_filename) = original_compiled_filename; } /* }}} */ -ZEND_API zend_string *zend_get_compiled_filename(TSRMLS_D) /* {{{ */ +ZEND_API zend_string *zend_get_compiled_filename(void) /* {{{ */ { return CG(compiled_filename); } /* }}} */ -ZEND_API int zend_get_compiled_lineno(TSRMLS_D) /* {{{ */ +ZEND_API int zend_get_compiled_lineno(void) /* {{{ */ { return CG(zend_lineno); } /* }}} */ -ZEND_API zend_bool zend_is_compiling(TSRMLS_D) /* {{{ */ +ZEND_API zend_bool zend_is_compiling(void) /* {{{ */ { return CG(in_compilation); } @@ -257,7 +256,7 @@ static uint32_t get_temporary_variable(zend_op_array *op_array) /* {{{ */ } /* }}} */ -static int lookup_cv(zend_op_array *op_array, zend_string* name TSRMLS_DC) /* {{{ */{ +static int lookup_cv(zend_op_array *op_array, zend_string* name) /* {{{ */{ int i = 0; zend_ulong hash_value = zend_string_hash_val(name); @@ -278,7 +277,7 @@ static int lookup_cv(zend_op_array *op_array, zend_string* name TSRMLS_DC) /* {{ op_array->vars = erealloc(op_array->vars, CG(context).vars_size * sizeof(zend_string*)); } - op_array->vars[i] = zend_new_interned_string(name TSRMLS_CC); + op_array->vars[i] = zend_new_interned_string(name); return (int)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, i); } /* }}} */ @@ -295,11 +294,11 @@ void zend_del_literal(zend_op_array *op_array, int n) /* {{{ */ /* }}} */ /* Common part of zend_add_literal and zend_append_individual_literal */ -static inline void zend_insert_literal(zend_op_array *op_array, zval *zv, int literal_position TSRMLS_DC) /* {{{ */ +static inline void zend_insert_literal(zend_op_array *op_array, zval *zv, int literal_position) /* {{{ */ { if (Z_TYPE_P(zv) == IS_STRING || Z_TYPE_P(zv) == IS_CONSTANT) { zend_string_hash_val(Z_STR_P(zv)); - Z_STR_P(zv) = zend_new_interned_string(Z_STR_P(zv) TSRMLS_CC); + Z_STR_P(zv) = zend_new_interned_string(Z_STR_P(zv)); if (IS_INTERNED(Z_STR_P(zv))) { Z_TYPE_FLAGS_P(zv) &= ~ (IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE); } @@ -312,7 +311,7 @@ static inline void zend_insert_literal(zend_op_array *op_array, zval *zv, int li /* Is used while compiling a function, using the context to keep track of an approximate size to avoid to relocate to often. Literals are truncated to actual size in the second compiler pass (pass_two()). */ -int zend_add_literal(zend_op_array *op_array, zval *zv TSRMLS_DC) /* {{{ */ +int zend_add_literal(zend_op_array *op_array, zval *zv) /* {{{ */ { int i = op_array->last_literal; op_array->last_literal++; @@ -322,81 +321,81 @@ int zend_add_literal(zend_op_array *op_array, zval *zv TSRMLS_DC) /* {{{ */ } op_array->literals = (zval*)erealloc(op_array->literals, CG(context).literals_size * sizeof(zval)); } - zend_insert_literal(op_array, zv, i TSRMLS_CC); + zend_insert_literal(op_array, zv, i); return i; } /* }}} */ -static inline int zend_add_literal_string(zend_op_array *op_array, zend_string **str TSRMLS_DC) /* {{{ */ +static inline int zend_add_literal_string(zend_op_array *op_array, zend_string **str) /* {{{ */ { int ret; zval zv; ZVAL_STR(&zv, *str); - ret = zend_add_literal(op_array, &zv TSRMLS_CC); + ret = zend_add_literal(op_array, &zv); *str = Z_STR(zv); return ret; } /* }}} */ -static int zend_add_func_name_literal(zend_op_array *op_array, zend_string *name TSRMLS_DC) /* {{{ */ +static int zend_add_func_name_literal(zend_op_array *op_array, zend_string *name) /* {{{ */ { /* Original name */ - int ret = zend_add_literal_string(op_array, &name TSRMLS_CC); + int ret = zend_add_literal_string(op_array, &name); /* Lowercased name */ zend_string *lc_name = zend_string_alloc(name->len, 0); zend_str_tolower_copy(lc_name->val, name->val, name->len); - zend_add_literal_string(op_array, &lc_name TSRMLS_CC); + zend_add_literal_string(op_array, &lc_name); return ret; } /* }}} */ -static int zend_add_ns_func_name_literal(zend_op_array *op_array, zend_string *name TSRMLS_DC) /* {{{ */ +static int zend_add_ns_func_name_literal(zend_op_array *op_array, zend_string *name) /* {{{ */ { const char *unqualified_name; size_t unqualified_name_len; /* Original name */ - int ret = zend_add_literal_string(op_array, &name TSRMLS_CC); + int ret = zend_add_literal_string(op_array, &name); /* Lowercased name */ zend_string *lc_name = zend_string_alloc(name->len, 0); zend_str_tolower_copy(lc_name->val, name->val, name->len); - zend_add_literal_string(op_array, &lc_name TSRMLS_CC); + zend_add_literal_string(op_array, &lc_name); /* Lowercased unqualfied name */ if (zend_get_unqualified_name(name, &unqualified_name, &unqualified_name_len)) { lc_name = zend_string_alloc(unqualified_name_len, 0); zend_str_tolower_copy(lc_name->val, unqualified_name, unqualified_name_len); - zend_add_literal_string(op_array, &lc_name TSRMLS_CC); + zend_add_literal_string(op_array, &lc_name); } return ret; } /* }}} */ -static int zend_add_class_name_literal(zend_op_array *op_array, zend_string *name TSRMLS_DC) /* {{{ */ +static int zend_add_class_name_literal(zend_op_array *op_array, zend_string *name) /* {{{ */ { /* Original name */ - int ret = zend_add_literal_string(op_array, &name TSRMLS_CC); + int ret = zend_add_literal_string(op_array, &name); /* Lowercased name */ zend_string *lc_name = zend_string_alloc(name->len, 0); zend_str_tolower_copy(lc_name->val, name->val, name->len); - zend_add_literal_string(op_array, &lc_name TSRMLS_CC); + zend_add_literal_string(op_array, &lc_name); - zend_alloc_cache_slot(ret TSRMLS_CC); + zend_alloc_cache_slot(ret); return ret; } /* }}} */ -static int zend_add_const_name_literal(zend_op_array *op_array, zend_string *name, zend_bool unqualified TSRMLS_DC) /* {{{ */ +static int zend_add_const_name_literal(zend_op_array *op_array, zend_string *name, zend_bool unqualified) /* {{{ */ { zend_string *tmp_name; - int ret = zend_add_literal_string(op_array, &name TSRMLS_CC); + int ret = zend_add_literal_string(op_array, &name); size_t ns_len = 0, after_ns_len = name->len; const char *after_ns = zend_memrchr(name->val, '\\', name->len); @@ -408,12 +407,12 @@ static int zend_add_const_name_literal(zend_op_array *op_array, zend_string *nam /* lowercased namespace name & original constant name */ tmp_name = zend_string_init(name->val, name->len, 0); zend_str_tolower(tmp_name->val, ns_len); - zend_add_literal_string(op_array, &tmp_name TSRMLS_CC); + zend_add_literal_string(op_array, &tmp_name); /* lowercased namespace name & lowercased constant name */ tmp_name = zend_string_alloc(name->len, 0); zend_str_tolower_copy(tmp_name->val, name->val, name->len); - zend_add_literal_string(op_array, &tmp_name TSRMLS_CC); + zend_add_literal_string(op_array, &tmp_name); if (!unqualified) { return ret; @@ -424,12 +423,12 @@ static int zend_add_const_name_literal(zend_op_array *op_array, zend_string *nam /* original unqualified constant name */ tmp_name = zend_string_init(after_ns, after_ns_len, 0); - zend_add_literal_string(op_array, &tmp_name TSRMLS_CC); + zend_add_literal_string(op_array, &tmp_name); /* lowercased unqualified constant name */ tmp_name = zend_string_alloc(after_ns_len, 0); zend_str_tolower_copy(tmp_name->val, after_ns, after_ns_len); - zend_add_literal_string(op_array, &tmp_name TSRMLS_CC); + zend_add_literal_string(op_array, &tmp_name); return ret; } @@ -438,7 +437,7 @@ static int zend_add_const_name_literal(zend_op_array *op_array, zend_string *nam #define LITERAL_STR(op, str) do { \ zval _c; \ ZVAL_STR(&_c, str); \ - op.constant = zend_add_literal(CG(active_op_array), &_c TSRMLS_CC); \ + op.constant = zend_add_literal(CG(active_op_array), &_c); \ } while (0) #define MAKE_NOP(opline) do { \ @@ -449,11 +448,11 @@ static int zend_add_const_name_literal(zend_op_array *op_array, zend_string *nam opline->result_type = opline->op1_type = opline->op2_type = IS_UNUSED; \ } while (0) -void zend_stop_lexing(TSRMLS_D) { +void zend_stop_lexing(void) { LANG_SCNG(yy_cursor) = LANG_SCNG(yy_limit); } -static inline void zend_begin_loop(TSRMLS_D) /* {{{ */ +static inline void zend_begin_loop(void) /* {{{ */ { zend_brk_cont_element *brk_cont_element; int parent; @@ -466,7 +465,7 @@ static inline void zend_begin_loop(TSRMLS_D) /* {{{ */ } /* }}} */ -static inline void zend_end_loop(int cont_addr, int has_loop_var TSRMLS_DC) /* {{{ */ +static inline void zend_end_loop(int cont_addr, int has_loop_var) /* {{{ */ { if (!has_loop_var) { /* The start fileld is used to free temporary variables in case of exceptions. @@ -480,10 +479,10 @@ static inline void zend_end_loop(int cont_addr, int has_loop_var TSRMLS_DC) /* { } /* }}} */ -void zend_do_free(znode *op1 TSRMLS_DC) /* {{{ */ +void zend_do_free(znode *op1) /* {{{ */ { if (op1->op_type==IS_TMP_VAR) { - zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); + zend_op *opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_FREE; SET_NODE(opline->op1, op1); @@ -502,7 +501,7 @@ void zend_do_free(znode *op1 TSRMLS_DC) /* {{{ */ /* It's very rare and useless case. It's better to use additional FREE opcode and simplify the FETCH handlers their selves */ - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_FREE; SET_NODE(opline->op1, op1); SET_UNUSED(opline->op2); @@ -514,7 +513,7 @@ void zend_do_free(znode *op1 TSRMLS_DC) /* {{{ */ if (opline->opcode == ZEND_FETCH_LIST && opline->op1_type == IS_VAR && opline->op1.var == op1->u.op.var) { - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_FREE; SET_NODE(opline->op1, op1); @@ -584,7 +583,7 @@ zend_string *zend_concat_names(char *name1, size_t name1_len, char *name2, size_ return zend_concat3(name1, name1_len, "\\", 1, name2, name2_len); } -zend_string *zend_prefix_with_ns(zend_string *name TSRMLS_DC) { +zend_string *zend_prefix_with_ns(zend_string *name) { if (CG(current_namespace)) { zend_string *ns = CG(current_namespace); return zend_concat_names(ns->val, ns->len, name->val, name->len); @@ -608,7 +607,7 @@ void *zend_hash_find_ptr_lc(HashTable *ht, const char *str, size_t len) { zend_string *zend_resolve_non_class_name( zend_string *name, uint32_t type, zend_bool *is_fully_qualified, - zend_bool case_sensitive, HashTable *current_import_sub TSRMLS_DC + zend_bool case_sensitive, HashTable *current_import_sub ) { char *compound; *is_fully_qualified = 0; @@ -625,7 +624,7 @@ zend_string *zend_resolve_non_class_name( if (type == ZEND_NAME_RELATIVE) { *is_fully_qualified = 1; - return zend_prefix_with_ns(name TSRMLS_CC); + return zend_prefix_with_ns(name); } if (current_import_sub) { @@ -659,29 +658,29 @@ zend_string *zend_resolve_non_class_name( } } - return zend_prefix_with_ns(name TSRMLS_CC); + return zend_prefix_with_ns(name); } /* }}} */ -zend_string *zend_resolve_function_name(zend_string *name, uint32_t type, zend_bool *is_fully_qualified TSRMLS_DC) /* {{{ */ +zend_string *zend_resolve_function_name(zend_string *name, uint32_t type, zend_bool *is_fully_qualified) /* {{{ */ { return zend_resolve_non_class_name( - name, type, is_fully_qualified, 0, CG(current_import_function) TSRMLS_CC); + name, type, is_fully_qualified, 0, CG(current_import_function)); } /* }}} */ -zend_string *zend_resolve_const_name(zend_string *name, uint32_t type, zend_bool *is_fully_qualified TSRMLS_DC) /* {{{ */ { +zend_string *zend_resolve_const_name(zend_string *name, uint32_t type, zend_bool *is_fully_qualified) /* {{{ */ { return zend_resolve_non_class_name( - name, type, is_fully_qualified, 1, CG(current_import_const) TSRMLS_CC); + name, type, is_fully_qualified, 1, CG(current_import_const)); } /* }}} */ -zend_string *zend_resolve_class_name(zend_string *name, uint32_t type TSRMLS_DC) /* {{{ */ +zend_string *zend_resolve_class_name(zend_string *name, uint32_t type) /* {{{ */ { char *compound; if (type == ZEND_NAME_RELATIVE) { - return zend_prefix_with_ns(name TSRMLS_CC); + return zend_prefix_with_ns(name); } if (type == ZEND_NAME_FQ || name->val[0] == '\\') { @@ -721,14 +720,14 @@ zend_string *zend_resolve_class_name(zend_string *name, uint32_t type TSRMLS_DC) } /* If not fully qualified and not an alias, prepend the current namespace */ - return zend_prefix_with_ns(name TSRMLS_CC); + return zend_prefix_with_ns(name); } /* }}} */ -zend_string *zend_resolve_class_name_ast(zend_ast *ast TSRMLS_DC) /* {{{ */ +zend_string *zend_resolve_class_name_ast(zend_ast *ast) /* {{{ */ { zend_string *name = zend_ast_get_str(ast); - return zend_resolve_class_name(name, ast->attr TSRMLS_CC); + return zend_resolve_class_name(name, ast->attr); } /* }}} */ @@ -743,7 +742,7 @@ static void str_dtor(zval *zv) /* {{{ */ { } /* }}} */ -void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 TSRMLS_DC) /* {{{ */ +void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2) /* {{{ */ { zend_label *dest; int current, distance; @@ -798,7 +797,7 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 } /* }}} */ -void zend_release_labels(int temporary TSRMLS_DC) /* {{{ */ +void zend_release_labels(int temporary) /* {{{ */ { if (CG(context).labels) { zend_hash_destroy(CG(context).labels); @@ -815,7 +814,7 @@ void zend_release_labels(int temporary TSRMLS_DC) /* {{{ */ static zend_bool zend_is_call(zend_ast *ast); -static int generate_free_loop_var(znode *var TSRMLS_DC) /* {{{ */ +static int generate_free_loop_var(znode *var) /* {{{ */ { switch (var->op_type) { case IS_UNUSED: @@ -824,7 +823,7 @@ static int generate_free_loop_var(znode *var TSRMLS_DC) /* {{{ */ case IS_VAR: case IS_TMP_VAR: { - zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); + zend_op *opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_FREE; SET_NODE(opline->op1, var); @@ -836,7 +835,7 @@ static int generate_free_loop_var(znode *var TSRMLS_DC) /* {{{ */ } /* }}} */ -static uint32_t zend_add_try_element(uint32_t try_op TSRMLS_DC) /* {{{ */ +static uint32_t zend_add_try_element(uint32_t try_op) /* {{{ */ { zend_op_array *op_array = CG(active_op_array); uint32_t try_catch_offset = op_array->last_try_catch++; @@ -876,7 +875,7 @@ ZEND_API void function_add_ref(zend_function *function) /* {{{ */ } /* }}} */ -ZEND_API int do_bind_function(const zend_op_array *op_array, const zend_op *opline, HashTable *function_table, zend_bool compile_time TSRMLS_DC) /* {{{ */ +ZEND_API int do_bind_function(const zend_op_array *op_array, const zend_op *opline, HashTable *function_table, zend_bool compile_time) /* {{{ */ { zend_function *function, *new_function; zval *op1, *op2; @@ -916,7 +915,7 @@ ZEND_API int do_bind_function(const zend_op_array *op_array, const zend_op *opli } /* }}} */ -ZEND_API zend_class_entry *do_bind_class(const zend_op_array* op_array, const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC) /* {{{ */ +ZEND_API zend_class_entry *do_bind_class(const zend_op_array* op_array, const zend_op *opline, HashTable *class_table, zend_bool compile_time) /* {{{ */ { zend_class_entry *ce; zval *op1, *op2; @@ -946,14 +945,14 @@ ZEND_API zend_class_entry *do_bind_class(const zend_op_array* op_array, const ze return NULL; } else { if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLEMENT_INTERFACES|ZEND_ACC_IMPLEMENT_TRAITS))) { - zend_verify_abstract_class(ce TSRMLS_CC); + zend_verify_abstract_class(ce); } return ce; } } /* }}} */ -ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array, const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC) /* {{{ */ +ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array, const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time) /* {{{ */ { zend_class_entry *ce; zval *op1, *op2; @@ -986,7 +985,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot extend from trait %s", ce->name->val, parent_ce->name->val); } - zend_do_inheritance(ce, parent_ce TSRMLS_CC); + zend_do_inheritance(ce, parent_ce); ce->refcount++; @@ -998,7 +997,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array } /* }}} */ -void zend_do_early_binding(TSRMLS_D) /* {{{ */ +void zend_do_early_binding(void) /* {{{ */ { zend_op *opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1]; HashTable *table; @@ -1009,13 +1008,13 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */ switch (opline->opcode) { case ZEND_DECLARE_FUNCTION: - if (do_bind_function(CG(active_op_array), opline, CG(function_table), 1 TSRMLS_CC) == FAILURE) { + if (do_bind_function(CG(active_op_array), opline, CG(function_table), 1) == FAILURE) { return; } table = CG(function_table); break; case ZEND_DECLARE_CLASS: - if (do_bind_class(CG(active_op_array), opline, CG(class_table), 1 TSRMLS_CC) == NULL) { + if (do_bind_class(CG(active_op_array), opline, CG(class_table), 1) == NULL) { return; } table = CG(class_table); @@ -1027,7 +1026,7 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */ zend_class_entry *ce; parent_name = CT_CONSTANT(fetch_class_opline->op2); - if (((ce = zend_lookup_class(Z_STR_P(parent_name) TSRMLS_CC)) == NULL) || + if (((ce = zend_lookup_class(Z_STR_P(parent_name))) == NULL) || ((CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_CLASSES) && (ce->type == ZEND_INTERNAL_CLASS))) { if (CG(compiler_options) & ZEND_COMPILE_DELAYED_BINDING) { @@ -1043,7 +1042,7 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */ } return; } - if (do_bind_inherited_class(CG(active_op_array), opline, CG(class_table), ce, 1 TSRMLS_CC) == NULL) { + if (do_bind_inherited_class(CG(active_op_array), opline, CG(class_table), ce, 1) == NULL) { return; } /* clear unnecessary ZEND_FETCH_CLASS opcode */ @@ -1072,7 +1071,7 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */ } /* }}} */ -ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC) /* {{{ */ +ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array) /* {{{ */ { if (op_array->early_binding != (uint32_t)-1) { zend_bool orig_in_compilation = CG(in_compilation); @@ -1081,8 +1080,8 @@ ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS CG(in_compilation) = 1; while (opline_num != (uint32_t)-1) { - if ((ce = zend_lookup_class(Z_STR_P(RT_CONSTANT(op_array, op_array->opcodes[opline_num-1].op2)) TSRMLS_CC)) != NULL) { - do_bind_inherited_class(op_array, &op_array->opcodes[opline_num], EG(class_table), ce, 0 TSRMLS_CC); + if ((ce = zend_lookup_class(Z_STR_P(RT_CONSTANT(op_array, op_array->opcodes[opline_num-1].op2)))) != NULL) { + do_bind_inherited_class(op_array, &op_array->opcodes[opline_num], EG(class_table), ce, 0); } opline_num = op_array->opcodes[opline_num].result.opline_num; } @@ -1152,7 +1151,7 @@ ZEND_API int zend_unmangle_property_name_ex(const zend_string *name, const char } /* }}} */ -static zend_constant *zend_lookup_reserved_const(const char *name, size_t len TSRMLS_DC) /* {{{ */ +static zend_constant *zend_lookup_reserved_const(const char *name, size_t len) /* {{{ */ { zend_constant *c = zend_hash_find_ptr_lc(EG(zend_constants), name, len); if (c && !(c->flags & CONST_CS) && (c->flags & CONST_CT_SUBST)) { @@ -1162,7 +1161,7 @@ static zend_constant *zend_lookup_reserved_const(const char *name, size_t len TS } /* }}} */ -static zend_bool zend_try_ct_eval_const(zval *zv, zend_string *name, zend_bool is_fully_qualified TSRMLS_DC) /* {{{ */ +static zend_bool zend_try_ct_eval_const(zval *zv, zend_string *name, zend_bool is_fully_qualified) /* {{{ */ { zend_constant *c; @@ -1184,7 +1183,7 @@ static zend_bool zend_try_ct_eval_const(zval *zv, zend_string *name, zend_bool i zend_get_unqualified_name(name, &lookup_name, &lookup_len); } - c = zend_lookup_reserved_const(lookup_name, lookup_len TSRMLS_CC); + c = zend_lookup_reserved_const(lookup_name, lookup_len); if (c) { ZVAL_DUP(zv, &c->value); return 1; @@ -1195,7 +1194,7 @@ static zend_bool zend_try_ct_eval_const(zval *zv, zend_string *name, zend_bool i } /* }}} */ -void zend_init_list(void *result, void *item TSRMLS_DC) /* {{{ */ +void zend_init_list(void *result, void *item) /* {{{ */ { void** list = emalloc(sizeof(void*) * 2); @@ -1206,7 +1205,7 @@ void zend_init_list(void *result, void *item TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_add_to_list(void *result, void *item TSRMLS_DC) /* {{{ */ +void zend_add_to_list(void *result, void *item) /* {{{ */ { void** list = *(void**)result; size_t n = 0; @@ -1226,7 +1225,7 @@ void zend_add_to_list(void *result, void *item TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_do_extended_info(TSRMLS_D) /* {{{ */ +void zend_do_extended_info(void) /* {{{ */ { zend_op *opline; @@ -1234,7 +1233,7 @@ void zend_do_extended_info(TSRMLS_D) /* {{{ */ return; } - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_EXT_STMT; SET_UNUSED(opline->op1); @@ -1242,7 +1241,7 @@ void zend_do_extended_info(TSRMLS_D) /* {{{ */ } /* }}} */ -void zend_do_extended_fcall_begin(TSRMLS_D) /* {{{ */ +void zend_do_extended_fcall_begin(void) /* {{{ */ { zend_op *opline; @@ -1250,7 +1249,7 @@ void zend_do_extended_fcall_begin(TSRMLS_D) /* {{{ */ return; } - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_EXT_FCALL_BEGIN; SET_UNUSED(opline->op1); @@ -1258,7 +1257,7 @@ void zend_do_extended_fcall_begin(TSRMLS_D) /* {{{ */ } /* }}} */ -void zend_do_extended_fcall_end(TSRMLS_D) /* {{{ */ +void zend_do_extended_fcall_end(void) /* {{{ */ { zend_op *opline; @@ -1266,7 +1265,7 @@ void zend_do_extended_fcall_end(TSRMLS_D) /* {{{ */ return; } - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_EXT_FCALL_END; SET_UNUSED(opline->op1); @@ -1274,13 +1273,13 @@ void zend_do_extended_fcall_end(TSRMLS_D) /* {{{ */ } /* }}} */ -zend_bool zend_is_auto_global(zend_string *name TSRMLS_DC) /* {{{ */ +zend_bool zend_is_auto_global(zend_string *name) /* {{{ */ { zend_auto_global *auto_global; if ((auto_global = zend_hash_find_ptr(CG(auto_globals), name)) != NULL) { if (auto_global->armed) { - auto_global->armed = auto_global->auto_global_callback(auto_global->name TSRMLS_CC); + auto_global->armed = auto_global->auto_global_callback(auto_global->name); } return 1; } @@ -1288,12 +1287,12 @@ zend_bool zend_is_auto_global(zend_string *name TSRMLS_DC) /* {{{ */ } /* }}} */ -int zend_register_auto_global(zend_string *name, zend_bool jit, zend_auto_global_callback auto_global_callback TSRMLS_DC) /* {{{ */ +int zend_register_auto_global(zend_string *name, zend_bool jit, zend_auto_global_callback auto_global_callback) /* {{{ */ { zend_auto_global auto_global; int retval; - auto_global.name = zend_new_interned_string(name TSRMLS_CC); + auto_global.name = zend_new_interned_string(name); auto_global.auto_global_callback = auto_global_callback; auto_global.jit = jit; @@ -1304,7 +1303,7 @@ int zend_register_auto_global(zend_string *name, zend_bool jit, zend_auto_global } /* }}} */ -ZEND_API void zend_activate_auto_globals(TSRMLS_D) /* {{{ */ +ZEND_API void zend_activate_auto_globals(void) /* {{{ */ { zend_auto_global *auto_global; @@ -1312,7 +1311,7 @@ ZEND_API void zend_activate_auto_globals(TSRMLS_D) /* {{{ */ if (auto_global->jit) { auto_global->armed = 1; } else if (auto_global->auto_global_callback) { - auto_global->armed = auto_global->auto_global_callback(auto_global->name TSRMLS_CC); + auto_global->armed = auto_global->auto_global_callback(auto_global->name); } else { auto_global->armed = 0; } @@ -1320,7 +1319,7 @@ ZEND_API void zend_activate_auto_globals(TSRMLS_D) /* {{{ */ } /* }}} */ -int zendlex(zend_parser_stack_elem *elem TSRMLS_DC) /* {{{ */ +int zendlex(zend_parser_stack_elem *elem) /* {{{ */ { zval zv; int retval; @@ -1332,7 +1331,7 @@ int zendlex(zend_parser_stack_elem *elem TSRMLS_DC) /* {{{ */ again: ZVAL_UNDEF(&zv); - retval = lex_scan(&zv TSRMLS_CC); + retval = lex_scan(&zv); switch (retval) { case T_COMMENT: case T_DOC_COMMENT: @@ -1358,7 +1357,7 @@ again: } /* }}} */ -ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers TSRMLS_DC) /* {{{ */ +ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers) /* {{{ */ { zend_bool persistent_hashes = (ce->type == ZEND_INTERNAL_CLASS) ? 1 : 0; dtor_func_t zval_ptr_dtor_func = ((persistent_hashes) ? ZVAL_INTERNAL_PTR_DTOR : ZVAL_PTR_DTOR); @@ -1472,7 +1471,7 @@ zend_ast *zend_ast_append_str(zend_ast *left_ast, zend_ast *right_ast) /* {{{ */ /* }}} */ /* A hacky way that is used to store the doc comment for properties */ -zend_ast *zend_ast_append_doc_comment(zend_ast *list TSRMLS_DC) /* {{{ */ +zend_ast *zend_ast_append_doc_comment(zend_ast *list) /* {{{ */ { if (CG(doc_comment)) { list = zend_ast_list_add(list, zend_ast_create_zval_from_str(CG(doc_comment))); @@ -1483,7 +1482,7 @@ zend_ast *zend_ast_append_doc_comment(zend_ast *list TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_verify_namespace(TSRMLS_D) /* {{{ */ +void zend_verify_namespace(void) /* {{{ */ { if (CG(has_bracketed_namespaces) && !CG(in_namespace)) { zend_error_noreturn(E_COMPILE_ERROR, "No code may exist outside of namespace {}"); @@ -1491,7 +1490,7 @@ void zend_verify_namespace(TSRMLS_D) /* {{{ */ } /* }}} */ -static void zend_reset_import_tables(TSRMLS_D) /* {{{ */ +static void zend_reset_import_tables(void) /* {{{ */ { if (CG(current_import)) { zend_hash_destroy(CG(current_import)); @@ -1513,9 +1512,9 @@ static void zend_reset_import_tables(TSRMLS_D) /* {{{ */ } /* }}} */ -static void zend_end_namespace(TSRMLS_D) /* {{{ */ { +static void zend_end_namespace(void) /* {{{ */ { CG(in_namespace) = 0; - zend_reset_import_tables(TSRMLS_C); + zend_reset_import_tables(); if (CG(current_namespace)) { zend_string_release(CG(current_namespace)); CG(current_namespace) = NULL; @@ -1523,10 +1522,10 @@ static void zend_end_namespace(TSRMLS_D) /* {{{ */ { } /* }}} */ -void zend_do_end_compilation(TSRMLS_D) /* {{{ */ +void zend_do_end_compilation(void) /* {{{ */ { CG(has_bracketed_namespaces) = 0; - zend_end_namespace(TSRMLS_C); + zend_end_namespace(); } /* }}} */ @@ -1658,7 +1657,7 @@ static void zend_adjust_for_fetch_type(zend_op *opline, uint32_t type) /* {{{ */ } /* }}} */ -static inline void zend_make_var_result(znode *result, zend_op *opline TSRMLS_DC) /* {{{ */ +static inline void zend_make_var_result(znode *result, zend_op *opline) /* {{{ */ { opline->result_type = IS_VAR; opline->result.var = get_temporary_variable(CG(active_op_array)); @@ -1666,7 +1665,7 @@ static inline void zend_make_var_result(znode *result, zend_op *opline TSRMLS_DC } /* }}} */ -static inline void zend_make_tmp_result(znode *result, zend_op *opline TSRMLS_DC) /* {{{ */ +static inline void zend_make_tmp_result(znode *result, zend_op *opline) /* {{{ */ { opline->result_type = IS_TMP_VAR; opline->result.var = get_temporary_variable(CG(active_op_array)); @@ -1674,9 +1673,9 @@ static inline void zend_make_tmp_result(znode *result, zend_op *opline TSRMLS_DC } /* }}} */ -static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ +static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2) /* {{{ */ { - zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); + zend_op *opline = get_next_op(CG(active_op_array)); opline->opcode = opcode; if (op1 == NULL) { @@ -1692,15 +1691,15 @@ static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode } if (result) { - zend_make_var_result(result, opline TSRMLS_CC); + zend_make_var_result(result, opline); } return opline; } /* }}} */ -static zend_op *zend_emit_op_tmp(znode *result, zend_uchar opcode, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ +static zend_op *zend_emit_op_tmp(znode *result, zend_uchar opcode, znode *op1, znode *op2) /* {{{ */ { - zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); + zend_op *opline = get_next_op(CG(active_op_array)); opline->opcode = opcode; if (op1 == NULL) { @@ -1716,16 +1715,16 @@ static zend_op *zend_emit_op_tmp(znode *result, zend_uchar opcode, znode *op1, z } if (result) { - zend_make_tmp_result(result, opline TSRMLS_CC); + zend_make_tmp_result(result, opline); } return opline; } /* }}} */ -static void zend_emit_tick(TSRMLS_D) /* {{{ */ +static void zend_emit_tick(void) /* {{{ */ { - zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); + zend_op *opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_TICKS; SET_UNUSED(opline->op1); @@ -1734,31 +1733,31 @@ static void zend_emit_tick(TSRMLS_D) /* {{{ */ } /* }}} */ -static inline zend_op *zend_emit_op_data(znode *value TSRMLS_DC) /* {{{ */ +static inline zend_op *zend_emit_op_data(znode *value) /* {{{ */ { - return zend_emit_op(NULL, ZEND_OP_DATA, value, NULL TSRMLS_CC); + return zend_emit_op(NULL, ZEND_OP_DATA, value, NULL); } /* }}} */ -static inline uint32_t zend_emit_jump(uint32_t opnum_target TSRMLS_DC) /* {{{ */ +static inline uint32_t zend_emit_jump(uint32_t opnum_target) /* {{{ */ { uint32_t opnum = get_next_op_number(CG(active_op_array)); - zend_op *opline = zend_emit_op(NULL, ZEND_JMP, NULL, NULL TSRMLS_CC); + zend_op *opline = zend_emit_op(NULL, ZEND_JMP, NULL, NULL); opline->op1.opline_num = opnum_target; return opnum; } /* }}} */ -static inline uint32_t zend_emit_cond_jump(zend_uchar opcode, znode *cond, uint32_t opnum_target TSRMLS_DC) /* {{{ */ +static inline uint32_t zend_emit_cond_jump(zend_uchar opcode, znode *cond, uint32_t opnum_target) /* {{{ */ { uint32_t opnum = get_next_op_number(CG(active_op_array)); - zend_op *opline = zend_emit_op(NULL, opcode, cond, NULL TSRMLS_CC); + zend_op *opline = zend_emit_op(NULL, opcode, cond, NULL); opline->op2.opline_num = opnum_target; return opnum; } /* }}} */ -static inline void zend_update_jump_target(uint32_t opnum_jump, uint32_t opnum_target TSRMLS_DC) /* {{{ */ +static inline void zend_update_jump_target(uint32_t opnum_jump, uint32_t opnum_target) /* {{{ */ { zend_op *opline = &CG(active_op_array)->opcodes[opnum_jump]; switch (opline->opcode) { @@ -1776,21 +1775,21 @@ static inline void zend_update_jump_target(uint32_t opnum_jump, uint32_t opnum_t } /* }}} */ -static inline void zend_update_jump_target_to_next(uint32_t opnum_jump TSRMLS_DC) /* {{{ */ +static inline void zend_update_jump_target_to_next(uint32_t opnum_jump) /* {{{ */ { - zend_update_jump_target(opnum_jump, get_next_op_number(CG(active_op_array)) TSRMLS_CC); + zend_update_jump_target(opnum_jump, get_next_op_number(CG(active_op_array))); } /* }}} */ -static inline zend_op *zend_delayed_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ +static inline zend_op *zend_delayed_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2) /* {{{ */ { zend_op tmp_opline; - init_op(&tmp_opline TSRMLS_CC); + init_op(&tmp_opline); tmp_opline.opcode = opcode; SET_NODE(tmp_opline.op1, op1); SET_NODE(tmp_opline.op2, op2); if (result) { - zend_make_var_result(result, &tmp_opline TSRMLS_CC); + zend_make_var_result(result, &tmp_opline); } zend_stack_push(&CG(delayed_oplines_stack), &tmp_opline); @@ -1798,20 +1797,20 @@ static inline zend_op *zend_delayed_emit_op(znode *result, zend_uchar opcode, zn } /* }}} */ -static inline uint32_t zend_delayed_compile_begin(TSRMLS_D) /* {{{ */ +static inline uint32_t zend_delayed_compile_begin(void) /* {{{ */ { return zend_stack_count(&CG(delayed_oplines_stack)); } /* }}} */ -static zend_op *zend_delayed_compile_end(uint32_t offset TSRMLS_DC) /* {{{ */ +static zend_op *zend_delayed_compile_end(uint32_t offset) /* {{{ */ { zend_op *opline = NULL, *oplines = zend_stack_base(&CG(delayed_oplines_stack)); uint32_t i, count = zend_stack_count(&CG(delayed_oplines_stack)); ZEND_ASSERT(count > offset); for (i = offset; i < count; ++i) { - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); memcpy(opline, &oplines[i], sizeof(zend_op)); } CG(delayed_oplines_stack).top = offset; @@ -1819,7 +1818,7 @@ static zend_op *zend_delayed_compile_end(uint32_t offset TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_emit_final_return(zval *zv TSRMLS_DC) /* {{{ */ +void zend_emit_final_return(zval *zv) /* {{{ */ { znode zn; zend_bool returns_reference = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; @@ -1831,7 +1830,7 @@ void zend_emit_final_return(zval *zv TSRMLS_DC) /* {{{ */ ZVAL_NULL(&zn.u.constant); } - zend_emit_op(NULL, returns_reference ? ZEND_RETURN_BY_REF : ZEND_RETURN, &zn, NULL TSRMLS_CC); + zend_emit_op(NULL, returns_reference ? ZEND_RETURN_BY_REF : ZEND_RETURN, &zn, NULL); } /* }}} */ @@ -1886,7 +1885,7 @@ static inline zend_bool zend_is_const_default_class_ref(zend_ast *name_ast) /* { } /* }}} */ -static inline void zend_handle_numeric_op(znode *node TSRMLS_DC) /* {{{ */ +static inline void zend_handle_numeric_op(znode *node) /* {{{ */ { if (node->op_type == IS_CONST && Z_TYPE(node->u.constant) == IS_STRING) { zend_ulong index; @@ -1899,41 +1898,41 @@ static inline void zend_handle_numeric_op(znode *node TSRMLS_DC) /* {{{ */ } /* }}} */ -static inline void zend_set_class_name_op1(zend_op *opline, znode *class_node TSRMLS_DC) /* {{{ */ +static inline void zend_set_class_name_op1(zend_op *opline, znode *class_node) /* {{{ */ { if (class_node->op_type == IS_CONST) { opline->op1_type = IS_CONST; opline->op1.constant = zend_add_class_name_literal( - CG(active_op_array), Z_STR(class_node->u.constant) TSRMLS_CC); + CG(active_op_array), Z_STR(class_node->u.constant)); } else { SET_NODE(opline->op1, class_node); } } /* }}} */ -static zend_op *zend_compile_class_ref(znode *result, zend_ast *name_ast TSRMLS_DC) /* {{{ */ +static zend_op *zend_compile_class_ref(znode *result, zend_ast *name_ast) /* {{{ */ { zend_op *opline; znode name_node; - zend_compile_expr(&name_node, name_ast TSRMLS_CC); + zend_compile_expr(&name_node, name_ast); if (name_node.op_type == IS_CONST) { zend_string *name = Z_STR(name_node.u.constant); uint32_t fetch_type = zend_get_class_fetch_type(name); - opline = zend_emit_op(result, ZEND_FETCH_CLASS, NULL, NULL TSRMLS_CC); + opline = zend_emit_op(result, ZEND_FETCH_CLASS, NULL, NULL); opline->extended_value = fetch_type; if (fetch_type == ZEND_FETCH_CLASS_DEFAULT) { uint32_t type = name_ast->kind == ZEND_AST_ZVAL ? name_ast->attr : ZEND_NAME_FQ; opline->op2_type = IS_CONST; opline->op2.constant = zend_add_class_name_literal(CG(active_op_array), - zend_resolve_class_name(name, type TSRMLS_CC) TSRMLS_CC); + zend_resolve_class_name(name, type)); } zend_string_release(name); } else { - opline = zend_emit_op(result, ZEND_FETCH_CLASS, NULL, &name_node TSRMLS_CC); + opline = zend_emit_op(result, ZEND_FETCH_CLASS, NULL, &name_node); opline->extended_value = ZEND_FETCH_CLASS_DEFAULT; } @@ -1941,19 +1940,19 @@ static zend_op *zend_compile_class_ref(znode *result, zend_ast *name_ast TSRMLS_ } /* }}} */ -static int zend_try_compile_cv(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +static int zend_try_compile_cv(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *name_ast = ast->child[0]; if (name_ast->kind == ZEND_AST_ZVAL) { zend_string *name = zval_get_string(zend_ast_get_zval(name_ast)); - if (zend_is_auto_global(name TSRMLS_CC)) { + if (zend_is_auto_global(name)) { zend_string_release(name); return FAILURE; } result->op_type = IS_CV; - result->u.op.var = lookup_cv(CG(active_op_array), name TSRMLS_CC); + result->u.op.var = lookup_cv(CG(active_op_array), name); if (zend_string_equals_literal(name, "this")) { CG(active_op_array)->this_var = result->u.op.var; @@ -1965,7 +1964,7 @@ static int zend_try_compile_cv(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { zend_ast *name_ast = ast->child[0]; znode name_node; @@ -1976,16 +1975,16 @@ static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint && CG(active_op_array)->scope && CG(active_op_array)->this_var == (uint32_t)-1 ) { zend_string *key = zend_string_init("this", sizeof("this") - 1, 0); - CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), key TSRMLS_CC); + CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), key); } - zend_compile_expr(&name_node, name_ast TSRMLS_CC); + zend_compile_expr(&name_node, name_ast); - opline = zend_emit_op(result, ZEND_FETCH_R, &name_node, NULL TSRMLS_CC); + opline = zend_emit_op(result, ZEND_FETCH_R, &name_node, NULL); opline->extended_value = ZEND_FETCH_LOCAL; if (name_node.op_type == IS_CONST) { - if (zend_is_auto_global(Z_STR(name_node.u.constant) TSRMLS_CC)) { + if (zend_is_auto_global(Z_STR(name_node.u.constant))) { opline->extended_value = ZEND_FETCH_GLOBAL; } } @@ -1994,20 +1993,20 @@ static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint } /* }}} */ -static void zend_compile_simple_var(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +static void zend_compile_simple_var(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { - if (zend_try_compile_cv(result, ast TSRMLS_CC) == FAILURE) { - zend_op *opline = zend_compile_simple_var_no_cv(result, ast, type TSRMLS_CC); + if (zend_try_compile_cv(result, ast) == FAILURE) { + zend_op *opline = zend_compile_simple_var_no_cv(result, ast, type); zend_adjust_for_fetch_type(opline, type); } } /* }}} */ -static void zend_separate_if_call_and_write(znode *node, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +static void zend_separate_if_call_and_write(znode *node, zend_ast *ast, uint32_t type) /* {{{ */ { if (type != BP_VAR_R && type != BP_VAR_IS && zend_is_call(ast)) { if (node->op_type == IS_VAR) { - zend_op *opline = zend_emit_op(NULL, ZEND_SEPARATE, node, NULL TSRMLS_CC); + zend_op *opline = zend_emit_op(NULL, ZEND_SEPARATE, node, NULL); opline->result_type = IS_VAR; opline->result.var = opline->op1.var; } else { @@ -2017,33 +2016,33 @@ static void zend_separate_if_call_and_write(znode *node, zend_ast *ast, uint32_t } /* }}} */ -void zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC); -void zend_compile_assign(znode *result, zend_ast *ast TSRMLS_DC); -static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_node TSRMLS_DC); +void zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type); +void zend_compile_assign(znode *result, zend_ast *ast); +static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_node); -static inline void zend_emit_assign_znode(zend_ast *var_ast, znode *value_node TSRMLS_DC) /* {{{ */ +static inline void zend_emit_assign_znode(zend_ast *var_ast, znode *value_node) /* {{{ */ { znode dummy_node; if (var_ast->kind == ZEND_AST_LIST) { - zend_compile_list_assign(&dummy_node, var_ast, value_node TSRMLS_CC); + zend_compile_list_assign(&dummy_node, var_ast, value_node); } else { zend_ast *assign_ast = zend_ast_create(ZEND_AST_ASSIGN, var_ast, zend_ast_create_znode(value_node)); - zend_compile_assign(&dummy_node, assign_ast TSRMLS_CC); + zend_compile_assign(&dummy_node, assign_ast); } - zend_do_free(&dummy_node TSRMLS_CC); + zend_do_free(&dummy_node); } /* }}} */ -static zend_op *zend_delayed_compile_dim(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +static zend_op *zend_delayed_compile_dim(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { zend_ast *var_ast = ast->child[0]; zend_ast *dim_ast = ast->child[1]; znode var_node, dim_node; - zend_delayed_compile_var(&var_node, var_ast, type TSRMLS_CC); - zend_separate_if_call_and_write(&var_node, var_ast, type TSRMLS_CC); + zend_delayed_compile_var(&var_node, var_ast, type); + zend_separate_if_call_and_write(&var_node, var_ast, type); if (dim_ast == NULL) { if (type == BP_VAR_R || type == BP_VAR_IS) { @@ -2054,25 +2053,25 @@ static zend_op *zend_delayed_compile_dim(znode *result, zend_ast *ast, uint32_t } dim_node.op_type = IS_UNUSED; } else { - zend_compile_expr(&dim_node, dim_ast TSRMLS_CC); - zend_handle_numeric_op(&dim_node TSRMLS_CC); + zend_compile_expr(&dim_node, dim_ast); + zend_handle_numeric_op(&dim_node); } - return zend_delayed_emit_op(result, ZEND_FETCH_DIM_R, &var_node, &dim_node TSRMLS_CC); + return zend_delayed_emit_op(result, ZEND_FETCH_DIM_R, &var_node, &dim_node); } /* }}} */ -static inline zend_op *zend_compile_dim_common(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +static inline zend_op *zend_compile_dim_common(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { - uint32_t offset = zend_delayed_compile_begin(TSRMLS_C); - zend_delayed_compile_dim(result, ast, type TSRMLS_CC); - return zend_delayed_compile_end(offset TSRMLS_CC); + uint32_t offset = zend_delayed_compile_begin(); + zend_delayed_compile_dim(result, ast, type); + return zend_delayed_compile_end(offset); } /* }}} */ -void zend_compile_dim(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +void zend_compile_dim(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { - zend_op *opline = zend_compile_dim_common(result, ast, type TSRMLS_CC); + zend_op *opline = zend_compile_dim_common(result, ast, type); zend_adjust_for_fetch_type(opline, type); } /* }}} */ @@ -2088,7 +2087,7 @@ static zend_bool is_this_fetch(zend_ast *ast) /* {{{ */ } /* }}} */ -static zend_op *zend_delayed_compile_prop(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +static zend_op *zend_delayed_compile_prop(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { zend_ast *obj_ast = ast->child[0]; zend_ast *prop_ast = ast->child[1]; @@ -2099,37 +2098,37 @@ static zend_op *zend_delayed_compile_prop(znode *result, zend_ast *ast, uint32_t if (is_this_fetch(obj_ast)) { obj_node.op_type = IS_UNUSED; } else { - zend_delayed_compile_var(&obj_node, obj_ast, type TSRMLS_CC); - zend_separate_if_call_and_write(&obj_node, obj_ast, type TSRMLS_CC); + zend_delayed_compile_var(&obj_node, obj_ast, type); + zend_separate_if_call_and_write(&obj_node, obj_ast, type); } - zend_compile_expr(&prop_node, prop_ast TSRMLS_CC); + zend_compile_expr(&prop_node, prop_ast); - opline = zend_delayed_emit_op(result, ZEND_FETCH_OBJ_R, &obj_node, &prop_node TSRMLS_CC); + opline = zend_delayed_emit_op(result, ZEND_FETCH_OBJ_R, &obj_node, &prop_node); if (opline->op2_type == IS_CONST) { convert_to_string(CT_CONSTANT(opline->op2)); - zend_alloc_polymorphic_cache_slot(opline->op2.constant TSRMLS_CC); + zend_alloc_polymorphic_cache_slot(opline->op2.constant); } return opline; } /* }}} */ -static zend_op *zend_compile_prop_common(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +static zend_op *zend_compile_prop_common(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { - uint32_t offset = zend_delayed_compile_begin(TSRMLS_C); - zend_delayed_compile_prop(result, ast, type TSRMLS_CC); - return zend_delayed_compile_end(offset TSRMLS_CC); + uint32_t offset = zend_delayed_compile_begin(); + zend_delayed_compile_prop(result, ast, type); + return zend_delayed_compile_end(offset); } /* }}} */ -void zend_compile_prop(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +void zend_compile_prop(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { - zend_op *opline = zend_compile_prop_common(result, ast, type TSRMLS_CC); + zend_op *opline = zend_compile_prop_common(result, ast, type); zend_adjust_for_fetch_type(opline, type); } /* }}} */ -zend_op *zend_compile_static_prop_common(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +zend_op *zend_compile_static_prop_common(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { zend_ast *class_ast = ast->child[0]; zend_ast *prop_ast = ast->child[1]; @@ -2139,21 +2138,21 @@ zend_op *zend_compile_static_prop_common(znode *result, zend_ast *ast, uint32_t if (zend_is_const_default_class_ref(class_ast)) { class_node.op_type = IS_CONST; - ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast TSRMLS_CC)); + ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast)); } else { - zend_compile_class_ref(&class_node, class_ast TSRMLS_CC); + zend_compile_class_ref(&class_node, class_ast); } - zend_compile_expr(&prop_node, prop_ast TSRMLS_CC); + zend_compile_expr(&prop_node, prop_ast); - opline = zend_emit_op(result, ZEND_FETCH_R, &prop_node, NULL TSRMLS_CC); + opline = zend_emit_op(result, ZEND_FETCH_R, &prop_node, NULL); if (opline->op1_type == IS_CONST) { - zend_alloc_polymorphic_cache_slot(opline->op1.constant TSRMLS_CC); + zend_alloc_polymorphic_cache_slot(opline->op1.constant); } if (class_node.op_type == IS_CONST) { opline->op2_type = IS_CONST; opline->op2.constant = zend_add_class_name_literal( - CG(active_op_array), Z_STR(class_node.u.constant) TSRMLS_CC); + CG(active_op_array), Z_STR(class_node.u.constant)); } else { SET_NODE(opline->op2, &class_node); } @@ -2163,14 +2162,14 @@ zend_op *zend_compile_static_prop_common(znode *result, zend_ast *ast, uint32_t } /* }}} */ -void zend_compile_static_prop(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +void zend_compile_static_prop(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { - zend_op *opline = zend_compile_static_prop_common(result, ast, type TSRMLS_CC); + zend_op *opline = zend_compile_static_prop_common(result, ast, type); zend_adjust_for_fetch_type(opline, type); } /* }}} */ -static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_node TSRMLS_DC) /* {{{ */ +static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_node) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -2194,8 +2193,8 @@ static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_n Z_TRY_ADDREF(expr_node->u.constant); } - zend_emit_op(&fetch_result, ZEND_FETCH_LIST, expr_node, &dim_node TSRMLS_CC); - zend_emit_assign_znode(var_ast, &fetch_result TSRMLS_CC); + zend_emit_op(&fetch_result, ZEND_FETCH_LIST, expr_node, &dim_node); + zend_emit_assign_znode(var_ast, &fetch_result); } *result = *expr_node; } @@ -2213,7 +2212,7 @@ void zend_ensure_writable_variable(const zend_ast *ast) /* {{{ */ /* }}} */ /* Detects $a... = $a pattern */ -zend_bool zend_is_assign_to_self(zend_ast *var_ast, zend_ast *expr_ast TSRMLS_DC) /* {{{ */ +zend_bool zend_is_assign_to_self(zend_ast *var_ast, zend_ast *expr_ast) /* {{{ */ { if (expr_ast->kind != ZEND_AST_VAR || expr_ast->child[0]->kind != ZEND_AST_ZVAL) { return 0; @@ -2238,7 +2237,7 @@ zend_bool zend_is_assign_to_self(zend_ast *var_ast, zend_ast *expr_ast TSRMLS_DC } /* }}} */ -void zend_compile_assign(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_assign(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; zend_ast *expr_ast = ast->child[1]; @@ -2256,46 +2255,46 @@ void zend_compile_assign(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ switch (var_ast->kind) { case ZEND_AST_VAR: case ZEND_AST_STATIC_PROP: - zend_compile_var(&var_node, var_ast, BP_VAR_W TSRMLS_CC); - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); - zend_emit_op(result, ZEND_ASSIGN, &var_node, &expr_node TSRMLS_CC); + zend_compile_var(&var_node, var_ast, BP_VAR_W); + zend_compile_expr(&expr_node, expr_ast); + zend_emit_op(result, ZEND_ASSIGN, &var_node, &expr_node); return; case ZEND_AST_DIM: - offset = zend_delayed_compile_begin(TSRMLS_C); - zend_delayed_compile_dim(result, var_ast, BP_VAR_W TSRMLS_CC); + offset = zend_delayed_compile_begin(); + zend_delayed_compile_dim(result, var_ast, BP_VAR_W); - if (zend_is_assign_to_self(var_ast, expr_ast TSRMLS_CC)) { + if (zend_is_assign_to_self(var_ast, expr_ast)) { /* $a[0] = $a should evaluate the right $a first */ - zend_compile_simple_var_no_cv(&expr_node, expr_ast, BP_VAR_R TSRMLS_CC); + zend_compile_simple_var_no_cv(&expr_node, expr_ast, BP_VAR_R); } else { - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); } - opline = zend_delayed_compile_end(offset TSRMLS_CC); + opline = zend_delayed_compile_end(offset); opline->opcode = ZEND_ASSIGN_DIM; - opline = zend_emit_op_data(&expr_node TSRMLS_CC); + opline = zend_emit_op_data(&expr_node); return; case ZEND_AST_PROP: - offset = zend_delayed_compile_begin(TSRMLS_C); - zend_delayed_compile_prop(result, var_ast, BP_VAR_W TSRMLS_CC); - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + offset = zend_delayed_compile_begin(); + zend_delayed_compile_prop(result, var_ast, BP_VAR_W); + zend_compile_expr(&expr_node, expr_ast); - opline = zend_delayed_compile_end(offset TSRMLS_CC); + opline = zend_delayed_compile_end(offset); opline->opcode = ZEND_ASSIGN_OBJ; - zend_emit_op_data(&expr_node TSRMLS_CC); + zend_emit_op_data(&expr_node); return; case ZEND_AST_LIST: - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); - zend_compile_list_assign(result, var_ast, &expr_node TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); + zend_compile_list_assign(result, var_ast, &expr_node); return; EMPTY_SWITCH_DEFAULT_CASE(); } } /* }}} */ -void zend_compile_assign_ref(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_assign_ref(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *target_ast = ast->child[0]; zend_ast *source_ast = ast->child[1]; @@ -2308,14 +2307,14 @@ void zend_compile_assign_ref(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } zend_ensure_writable_variable(target_ast); - zend_compile_var(&target_node, target_ast, BP_VAR_W TSRMLS_CC); - zend_compile_var(&source_node, source_ast, BP_VAR_REF TSRMLS_CC); + zend_compile_var(&target_node, target_ast, BP_VAR_W); + zend_compile_var(&source_node, source_ast, BP_VAR_REF); if (source_node.op_type != IS_VAR && zend_is_call(source_ast)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot use result of built-in function in write context"); } - opline = zend_emit_op(result, ZEND_ASSIGN_REF, &target_node, &source_node TSRMLS_CC); + opline = zend_emit_op(result, ZEND_ASSIGN_REF, &target_node, &source_node); if (!result) { opline->result_type |= EXT_TYPE_UNUSED; } @@ -2329,15 +2328,15 @@ void zend_compile_assign_ref(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -static inline void zend_emit_assign_ref_znode(zend_ast *var_ast, znode *value_node TSRMLS_DC) /* {{{ */ +static inline void zend_emit_assign_ref_znode(zend_ast *var_ast, znode *value_node) /* {{{ */ { zend_ast *assign_ast = zend_ast_create(ZEND_AST_ASSIGN_REF, var_ast, zend_ast_create_znode(value_node)); - zend_compile_assign_ref(NULL, assign_ast TSRMLS_CC); + zend_compile_assign_ref(NULL, assign_ast); } /* }}} */ -void zend_compile_compound_assign(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_compound_assign(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; zend_ast *expr_ast = ast->child[1]; @@ -2352,38 +2351,38 @@ void zend_compile_compound_assign(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ switch (var_ast->kind) { case ZEND_AST_VAR: case ZEND_AST_STATIC_PROP: - zend_compile_var(&var_node, var_ast, BP_VAR_RW TSRMLS_CC); - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); - zend_emit_op(result, opcode, &var_node, &expr_node TSRMLS_CC); + zend_compile_var(&var_node, var_ast, BP_VAR_RW); + zend_compile_expr(&expr_node, expr_ast); + zend_emit_op(result, opcode, &var_node, &expr_node); return; case ZEND_AST_DIM: - offset = zend_delayed_compile_begin(TSRMLS_C); - zend_delayed_compile_dim(result, var_ast, BP_VAR_RW TSRMLS_CC); - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + offset = zend_delayed_compile_begin(); + zend_delayed_compile_dim(result, var_ast, BP_VAR_RW); + zend_compile_expr(&expr_node, expr_ast); - opline = zend_delayed_compile_end(offset TSRMLS_CC); + opline = zend_delayed_compile_end(offset); opline->opcode = opcode; opline->extended_value = ZEND_ASSIGN_DIM; - opline = zend_emit_op_data(&expr_node TSRMLS_CC); + opline = zend_emit_op_data(&expr_node); return; case ZEND_AST_PROP: - offset = zend_delayed_compile_begin(TSRMLS_C); - zend_delayed_compile_prop(result, var_ast, BP_VAR_RW TSRMLS_CC); - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + offset = zend_delayed_compile_begin(); + zend_delayed_compile_prop(result, var_ast, BP_VAR_RW); + zend_compile_expr(&expr_node, expr_ast); - opline = zend_delayed_compile_end(offset TSRMLS_CC); + opline = zend_delayed_compile_end(offset); opline->opcode = opcode; opline->extended_value = ZEND_ASSIGN_OBJ; - zend_emit_op_data(&expr_node TSRMLS_CC); + zend_emit_op_data(&expr_node); return; EMPTY_SWITCH_DEFAULT_CASE() } } /* }}} */ -uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc TSRMLS_DC) /* {{{ */ +uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */ { /* TODO.AST &var error */ zend_ast_list *args = zend_ast_get_list(ast); @@ -2404,8 +2403,8 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc TSRMLS_DC) /* {{{ * uses_arg_unpack = 1; fbc = NULL; - zend_compile_expr(&arg_node, arg->child[0] TSRMLS_CC); - opline = zend_emit_op(NULL, ZEND_SEND_UNPACK, &arg_node, NULL TSRMLS_CC); + zend_compile_expr(&arg_node, arg->child[0]); + opline = zend_emit_op(NULL, ZEND_SEND_UNPACK, &arg_node, NULL); opline->op2.num = arg_count; opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_ARG(NULL, arg_count); continue; @@ -2419,7 +2418,7 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc TSRMLS_DC) /* {{{ * arg_count++; if (zend_is_variable(arg)) { if (zend_is_call(arg)) { - zend_compile_var(&arg_node, arg, BP_VAR_R TSRMLS_CC); + zend_compile_var(&arg_node, arg, BP_VAR_R); if (arg_node.op_type & (IS_CONST|IS_TMP_VAR)) { /* Function call was converted into builtin instruction */ opcode = ZEND_SEND_VAL; @@ -2435,19 +2434,19 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc TSRMLS_DC) /* {{{ * } } else if (fbc) { if (ARG_SHOULD_BE_SENT_BY_REF(fbc, arg_num)) { - zend_compile_var(&arg_node, arg, BP_VAR_W TSRMLS_CC); + zend_compile_var(&arg_node, arg, BP_VAR_W); opcode = ZEND_SEND_REF; } else { - zend_compile_var(&arg_node, arg, BP_VAR_R TSRMLS_CC); + zend_compile_var(&arg_node, arg, BP_VAR_R); opcode = ZEND_SEND_VAR; } } else { zend_compile_var(&arg_node, arg, - BP_VAR_FUNC_ARG | (arg_num << BP_VAR_SHIFT) TSRMLS_CC); + BP_VAR_FUNC_ARG | (arg_num << BP_VAR_SHIFT)); opcode = ZEND_SEND_VAR_EX; } } else { - zend_compile_expr(&arg_node, arg TSRMLS_CC); + zend_compile_expr(&arg_node, arg); if (arg_node.op_type & (IS_VAR|IS_CV)) { opcode = ZEND_SEND_VAR_NO_REF; if (fbc && ARG_MUST_BE_SENT_BY_REF(fbc, arg_num)) { @@ -2465,7 +2464,7 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc TSRMLS_DC) /* {{{ * } } - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = opcode; SET_NODE(opline->op1, &arg_node); SET_UNUSED(opline->op2); @@ -2491,16 +2490,16 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc TSRMLS_DC) /* {{{ * } /* }}} */ -void zend_compile_call_common(znode *result, zend_ast *args_ast, zend_function *fbc TSRMLS_DC) /* {{{ */ +void zend_compile_call_common(znode *result, zend_ast *args_ast, zend_function *fbc) /* {{{ */ { zend_op *opline; uint32_t opnum_init = get_next_op_number(CG(active_op_array)) - 1; uint32_t arg_count; uint32_t call_flags; - zend_do_extended_fcall_begin(TSRMLS_C); + zend_do_extended_fcall_begin(); - arg_count = zend_compile_args(args_ast, fbc TSRMLS_CC); + arg_count = zend_compile_args(args_ast, fbc); opline = &CG(active_op_array)->opcodes[opnum_init]; opline->extended_value = arg_count; @@ -2510,55 +2509,55 @@ void zend_compile_call_common(znode *result, zend_ast *args_ast, zend_function * } call_flags = (opline->opcode == ZEND_NEW ? ZEND_CALL_CTOR : 0); - opline = zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL TSRMLS_CC); + opline = zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL); opline->op1.num = call_flags; - zend_do_extended_fcall_end(TSRMLS_C); + zend_do_extended_fcall_end(); } /* }}} */ -zend_bool zend_compile_function_name(znode *name_node, zend_ast *name_ast TSRMLS_DC) /* {{{ */ +zend_bool zend_compile_function_name(znode *name_node, zend_ast *name_ast) /* {{{ */ { zend_string *orig_name = zend_ast_get_str(name_ast); zend_bool is_fully_qualified; name_node->op_type = IS_CONST; ZVAL_STR(&name_node->u.constant, zend_resolve_function_name( - orig_name, name_ast->attr, &is_fully_qualified TSRMLS_CC)); + orig_name, name_ast->attr, &is_fully_qualified)); return !is_fully_qualified && CG(current_namespace); } /* }}} */ -void zend_compile_ns_call(znode *result, znode *name_node, zend_ast *args_ast TSRMLS_DC) /* {{{ */ +void zend_compile_ns_call(znode *result, znode *name_node, zend_ast *args_ast) /* {{{ */ { - zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); + zend_op *opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_INIT_NS_FCALL_BY_NAME; SET_UNUSED(opline->op1); opline->op2_type = IS_CONST; opline->op2.constant = zend_add_ns_func_name_literal( - CG(active_op_array), Z_STR(name_node->u.constant) TSRMLS_CC); - zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC); + CG(active_op_array), Z_STR(name_node->u.constant)); + zend_alloc_cache_slot(opline->op2.constant); - zend_compile_call_common(result, args_ast, NULL TSRMLS_CC); + zend_compile_call_common(result, args_ast, NULL); } /* }}} */ -void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast *args_ast TSRMLS_DC) /* {{{ */ +void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast *args_ast) /* {{{ */ { - zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); + zend_op *opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_INIT_FCALL_BY_NAME; SET_UNUSED(opline->op1); if (name_node->op_type == IS_CONST && Z_TYPE(name_node->u.constant) == IS_STRING) { opline->op2_type = IS_CONST; opline->op2.constant = zend_add_func_name_literal(CG(active_op_array), - Z_STR(name_node->u.constant) TSRMLS_CC); - zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC); + Z_STR(name_node->u.constant)); + zend_alloc_cache_slot(opline->op2.constant); } else { SET_NODE(opline->op2, name_node); } - zend_compile_call_common(result, args_ast, NULL TSRMLS_CC); + zend_compile_call_common(result, args_ast, NULL); } /* }}} */ @@ -2574,7 +2573,7 @@ static zend_bool zend_args_contain_unpack(zend_ast_list *args) /* {{{ */ } /* }}} */ -int zend_compile_func_strlen(znode *result, zend_ast_list *args TSRMLS_DC) /* {{{ */ +int zend_compile_func_strlen(znode *result, zend_ast_list *args) /* {{{ */ { znode arg_node; @@ -2584,13 +2583,13 @@ int zend_compile_func_strlen(znode *result, zend_ast_list *args TSRMLS_DC) /* {{ return FAILURE; } - zend_compile_expr(&arg_node, args->child[0] TSRMLS_CC); - zend_emit_op_tmp(result, ZEND_STRLEN, &arg_node, NULL TSRMLS_CC); + zend_compile_expr(&arg_node, args->child[0]); + zend_emit_op_tmp(result, ZEND_STRLEN, &arg_node, NULL); return SUCCESS; } /* }}} */ -int zend_compile_func_typecheck(znode *result, zend_ast_list *args, uint32_t type TSRMLS_DC) /* {{{ */ +int zend_compile_func_typecheck(znode *result, zend_ast_list *args, uint32_t type) /* {{{ */ { znode arg_node; zend_op *opline; @@ -2599,14 +2598,14 @@ int zend_compile_func_typecheck(znode *result, zend_ast_list *args, uint32_t typ return FAILURE; } - zend_compile_expr(&arg_node, args->child[0] TSRMLS_CC); - opline = zend_emit_op_tmp(result, ZEND_TYPE_CHECK, &arg_node, NULL TSRMLS_CC); + zend_compile_expr(&arg_node, args->child[0]); + opline = zend_emit_op_tmp(result, ZEND_TYPE_CHECK, &arg_node, NULL); opline->extended_value = type; return SUCCESS; } /* }}} */ -int zend_compile_func_defined(znode *result, zend_ast_list *args TSRMLS_DC) /* {{{ */ +int zend_compile_func_defined(znode *result, zend_ast_list *args) /* {{{ */ { zend_string *name; zend_op *opline; @@ -2621,10 +2620,10 @@ int zend_compile_func_defined(znode *result, zend_ast_list *args TSRMLS_DC) /* { return FAILURE; } - opline = zend_emit_op_tmp(result, ZEND_DEFINED, NULL, NULL TSRMLS_CC); + opline = zend_emit_op_tmp(result, ZEND_DEFINED, NULL, NULL); opline->op1_type = IS_CONST; LITERAL_STR(opline->op1, name); - zend_alloc_cache_slot(opline->op1.constant TSRMLS_CC); + zend_alloc_cache_slot(opline->op1.constant); /* Lowercase constant name in a separate literal */ { @@ -2632,13 +2631,13 @@ int zend_compile_func_defined(znode *result, zend_ast_list *args TSRMLS_DC) /* { zend_string *lcname = zend_string_alloc(name->len, 0); zend_str_tolower_copy(lcname->val, name->val, name->len); ZVAL_NEW_STR(&c, lcname); - zend_add_literal(CG(active_op_array), &c TSRMLS_CC); + zend_add_literal(CG(active_op_array), &c); } return SUCCESS; } /* }}} */ -static int zend_try_compile_ct_bound_init_user_func(zend_ast *name_ast, uint32_t num_args TSRMLS_DC) /* {{{ */ +static int zend_try_compile_ct_bound_init_user_func(zend_ast *name_ast, uint32_t num_args) /* {{{ */ { zend_string *name, *lcname; zend_function *fbc; @@ -2660,29 +2659,29 @@ static int zend_try_compile_ct_bound_init_user_func(zend_ast *name_ast, uint32_t return FAILURE; } - opline = zend_emit_op(NULL, ZEND_INIT_FCALL, NULL, NULL TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_INIT_FCALL, NULL, NULL); opline->extended_value = num_args; opline->op1.num = zend_vm_calc_used_stack(num_args, fbc); opline->op2_type = IS_CONST; LITERAL_STR(opline->op2, lcname); - zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC); + zend_alloc_cache_slot(opline->op2.constant); return SUCCESS; } /* }}} */ -static void zend_compile_init_user_func(zend_ast *name_ast, uint32_t num_args, zend_string *orig_func_name TSRMLS_DC) /* {{{ */ +static void zend_compile_init_user_func(zend_ast *name_ast, uint32_t num_args, zend_string *orig_func_name) /* {{{ */ { zend_op *opline; znode name_node; - if (zend_try_compile_ct_bound_init_user_func(name_ast, num_args TSRMLS_CC) == SUCCESS) { + if (zend_try_compile_ct_bound_init_user_func(name_ast, num_args) == SUCCESS) { return; } - zend_compile_expr(&name_node, name_ast TSRMLS_CC); + zend_compile_expr(&name_node, name_ast); - opline = zend_emit_op(NULL, ZEND_INIT_USER_CALL, NULL, &name_node TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_INIT_USER_CALL, NULL, &name_node); opline->op1_type = IS_CONST; LITERAL_STR(opline->op1, zend_string_copy(orig_func_name)); opline->extended_value = num_args; @@ -2690,7 +2689,7 @@ static void zend_compile_init_user_func(zend_ast *name_ast, uint32_t num_args, z /* }}} */ /* cufa = call_user_func_array */ -int zend_compile_func_cufa(znode *result, zend_ast_list *args, zend_string *lcname TSRMLS_DC) /* {{{ */ +int zend_compile_func_cufa(znode *result, zend_ast_list *args, zend_string *lcname) /* {{{ */ { znode arg_node; @@ -2698,17 +2697,17 @@ int zend_compile_func_cufa(znode *result, zend_ast_list *args, zend_string *lcna return FAILURE; } - zend_compile_init_user_func(args->child[0], 0, lcname TSRMLS_CC); - zend_compile_expr(&arg_node, args->child[1] TSRMLS_CC); - zend_emit_op(NULL, ZEND_SEND_ARRAY, &arg_node, NULL TSRMLS_CC); - zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL TSRMLS_CC); + zend_compile_init_user_func(args->child[0], 0, lcname); + zend_compile_expr(&arg_node, args->child[1]); + zend_emit_op(NULL, ZEND_SEND_ARRAY, &arg_node, NULL); + zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL); return SUCCESS; } /* }}} */ /* cuf = call_user_func */ -int zend_compile_func_cuf(znode *result, zend_ast_list *args, zend_string *lcname TSRMLS_DC) /* {{{ */ +int zend_compile_func_cuf(znode *result, zend_ast_list *args, zend_string *lcname) /* {{{ */ { uint32_t i; @@ -2716,7 +2715,7 @@ int zend_compile_func_cuf(znode *result, zend_ast_list *args, zend_string *lcnam return FAILURE; } - zend_compile_init_user_func(args->child[0], args->children - 1, lcname TSRMLS_CC); + zend_compile_init_user_func(args->child[0], args->children - 1, lcname); for (i = 1; i < args->children; ++i) { zend_ast *arg_ast = args->child[i]; znode arg_node; @@ -2724,69 +2723,69 @@ int zend_compile_func_cuf(znode *result, zend_ast_list *args, zend_string *lcnam zend_bool send_user = 0; if (zend_is_variable(arg_ast) && !zend_is_call(arg_ast)) { - zend_compile_var(&arg_node, arg_ast, BP_VAR_FUNC_ARG | (i << BP_VAR_SHIFT) TSRMLS_CC); + zend_compile_var(&arg_node, arg_ast, BP_VAR_FUNC_ARG | (i << BP_VAR_SHIFT)); send_user = 1; } else { - zend_compile_expr(&arg_node, arg_ast TSRMLS_CC); + zend_compile_expr(&arg_node, arg_ast); if (arg_node.op_type & (IS_VAR|IS_CV)) { send_user = 1; } } if (send_user) { - opline = zend_emit_op(NULL, ZEND_SEND_USER, &arg_node, NULL TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_SEND_USER, &arg_node, NULL); } else { - opline = zend_emit_op(NULL, ZEND_SEND_VAL, &arg_node, NULL TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_SEND_VAL, &arg_node, NULL); } opline->op2.num = i; opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_ARG(NULL, i); } - zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL TSRMLS_CC); + zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL); return SUCCESS; } /* }}} */ -int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_list *args TSRMLS_DC) /* {{{ */ +int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_list *args) /* {{{ */ { if (zend_string_equals_literal(lcname, "strlen")) { - return zend_compile_func_strlen(result, args TSRMLS_CC); + return zend_compile_func_strlen(result, args); } else if (zend_string_equals_literal(lcname, "is_null")) { - return zend_compile_func_typecheck(result, args, IS_NULL TSRMLS_CC); + return zend_compile_func_typecheck(result, args, IS_NULL); } else if (zend_string_equals_literal(lcname, "is_bool")) { - return zend_compile_func_typecheck(result, args, _IS_BOOL TSRMLS_CC); + return zend_compile_func_typecheck(result, args, _IS_BOOL); } else if (zend_string_equals_literal(lcname, "is_long") || zend_string_equals_literal(lcname, "is_int") || zend_string_equals_literal(lcname, "is_integer") ) { - return zend_compile_func_typecheck(result, args, IS_LONG TSRMLS_CC); + return zend_compile_func_typecheck(result, args, IS_LONG); } else if (zend_string_equals_literal(lcname, "is_float") || zend_string_equals_literal(lcname, "is_double") || zend_string_equals_literal(lcname, "is_real") ) { - return zend_compile_func_typecheck(result, args, IS_DOUBLE TSRMLS_CC); + return zend_compile_func_typecheck(result, args, IS_DOUBLE); } else if (zend_string_equals_literal(lcname, "is_string")) { - return zend_compile_func_typecheck(result, args, IS_STRING TSRMLS_CC); + return zend_compile_func_typecheck(result, args, IS_STRING); } else if (zend_string_equals_literal(lcname, "is_array")) { - return zend_compile_func_typecheck(result, args, IS_ARRAY TSRMLS_CC); + return zend_compile_func_typecheck(result, args, IS_ARRAY); } else if (zend_string_equals_literal(lcname, "is_object")) { - return zend_compile_func_typecheck(result, args, IS_OBJECT TSRMLS_CC); + return zend_compile_func_typecheck(result, args, IS_OBJECT); } else if (zend_string_equals_literal(lcname, "is_resource")) { - return zend_compile_func_typecheck(result, args, IS_RESOURCE TSRMLS_CC); + return zend_compile_func_typecheck(result, args, IS_RESOURCE); } else if (zend_string_equals_literal(lcname, "defined")) { - return zend_compile_func_defined(result, args TSRMLS_CC); + return zend_compile_func_defined(result, args); } else if (zend_string_equals_literal(lcname, "call_user_func_array")) { - return zend_compile_func_cufa(result, args, lcname TSRMLS_CC); + return zend_compile_func_cufa(result, args, lcname); } else if (zend_string_equals_literal(lcname, "call_user_func")) { - return zend_compile_func_cuf(result, args, lcname TSRMLS_CC); + return zend_compile_func_cuf(result, args, lcname); } else { return FAILURE; } } /* }}} */ -void zend_compile_call(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { zend_ast *name_ast = ast->child[0]; zend_ast *args_ast = ast->child[1]; @@ -2794,15 +2793,15 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* znode name_node; if (name_ast->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) { - zend_compile_expr(&name_node, name_ast TSRMLS_CC); - zend_compile_dynamic_call(result, &name_node, args_ast TSRMLS_CC); + zend_compile_expr(&name_node, name_ast); + zend_compile_dynamic_call(result, &name_node, args_ast); return; } { - zend_bool runtime_resolution = zend_compile_function_name(&name_node, name_ast TSRMLS_CC); + zend_bool runtime_resolution = zend_compile_function_name(&name_node, name_ast); if (runtime_resolution) { - zend_compile_ns_call(result, &name_node, args_ast TSRMLS_CC); + zend_compile_ns_call(result, &name_node, args_ast); return; } } @@ -2820,12 +2819,12 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)) ) { zend_string_release(lcname); - zend_compile_dynamic_call(result, &name_node, args_ast TSRMLS_CC); + zend_compile_dynamic_call(result, &name_node, args_ast); return; } if (zend_try_compile_special_func(result, lcname, - zend_ast_get_list(args_ast) TSRMLS_CC) == SUCCESS + zend_ast_get_list(args_ast)) == SUCCESS ) { zend_string_release(lcname); zval_ptr_dtor(&name_node.u.constant); @@ -2835,15 +2834,15 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* zval_ptr_dtor(&name_node.u.constant); ZVAL_NEW_STR(&name_node.u.constant, lcname); - opline = zend_emit_op(NULL, ZEND_INIT_FCALL, NULL, &name_node TSRMLS_CC); - zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_INIT_FCALL, NULL, &name_node); + zend_alloc_cache_slot(opline->op2.constant); - zend_compile_call_common(result, args_ast, fbc TSRMLS_CC); + zend_compile_call_common(result, args_ast, fbc); } } /* }}} */ -void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { zend_ast *obj_ast = ast->child[0]; zend_ast *method_ast = ast->child[1]; @@ -2855,11 +2854,11 @@ void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type TSRMLS if (is_this_fetch(obj_ast)) { obj_node.op_type = IS_UNUSED; } else { - zend_compile_expr(&obj_node, obj_ast TSRMLS_CC); + zend_compile_expr(&obj_node, obj_ast); } - zend_compile_expr(&method_node, method_ast TSRMLS_CC); - opline = zend_emit_op(NULL, ZEND_INIT_METHOD_CALL, &obj_node, NULL TSRMLS_CC); + zend_compile_expr(&method_node, method_ast); + opline = zend_emit_op(NULL, ZEND_INIT_METHOD_CALL, &obj_node, NULL); if (method_node.op_type == IS_CONST) { if (Z_TYPE(method_node.u.constant) != IS_STRING) { @@ -2868,13 +2867,13 @@ void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type TSRMLS opline->op2_type = IS_CONST; opline->op2.constant = zend_add_func_name_literal(CG(active_op_array), - Z_STR(method_node.u.constant) TSRMLS_CC); - zend_alloc_polymorphic_cache_slot(opline->op2.constant TSRMLS_CC); + Z_STR(method_node.u.constant)); + zend_alloc_polymorphic_cache_slot(opline->op2.constant); } else { SET_NODE(opline->op2, &method_node); } - zend_compile_call_common(result, args_ast, NULL TSRMLS_CC); + zend_compile_call_common(result, args_ast, NULL); } /* }}} */ @@ -2884,7 +2883,7 @@ zend_bool zend_is_constructor(zend_string *name) /* {{{ */ } /* }}} */ -void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { zend_ast *class_ast = ast->child[0]; zend_ast *method_ast = ast->child[1]; @@ -2896,13 +2895,13 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type TSRMLS if (zend_is_const_default_class_ref(class_ast)) { class_node.op_type = IS_CONST; - ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast TSRMLS_CC)); + ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast)); } else { - opline = zend_compile_class_ref(&class_node, class_ast TSRMLS_CC); + opline = zend_compile_class_ref(&class_node, class_ast); extended_value = opline->extended_value; } - zend_compile_expr(&method_node, method_ast TSRMLS_CC); + zend_compile_expr(&method_node, method_ast); if (method_node.op_type == IS_CONST) { zval *name = &method_node.u.constant; if (Z_TYPE_P(name) != IS_STRING) { @@ -2914,30 +2913,30 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type TSRMLS } } - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_INIT_STATIC_METHOD_CALL; opline->extended_value = extended_value; - zend_set_class_name_op1(opline, &class_node TSRMLS_CC); + zend_set_class_name_op1(opline, &class_node); if (method_node.op_type == IS_CONST) { opline->op2_type = IS_CONST; opline->op2.constant = zend_add_func_name_literal(CG(active_op_array), - Z_STR(method_node.u.constant) TSRMLS_CC); + Z_STR(method_node.u.constant)); if (opline->op1_type == IS_CONST) { - zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC); + zend_alloc_cache_slot(opline->op2.constant); } else { - zend_alloc_polymorphic_cache_slot(opline->op2.constant TSRMLS_CC); + zend_alloc_polymorphic_cache_slot(opline->op2.constant); } } else { SET_NODE(opline->op2, &method_node); } - zend_compile_call_common(result, args_ast, NULL TSRMLS_CC); + zend_compile_call_common(result, args_ast, NULL); } /* }}} */ -void zend_compile_new(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *class_ast = ast->child[0]; zend_ast *args_ast = ast->child[1]; @@ -2948,24 +2947,24 @@ void zend_compile_new(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ if (zend_is_const_default_class_ref(class_ast)) { class_node.op_type = IS_CONST; - ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast TSRMLS_CC)); + ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast)); } else { - zend_compile_class_ref(&class_node, class_ast TSRMLS_CC); + zend_compile_class_ref(&class_node, class_ast); } opnum = get_next_op_number(CG(active_op_array)); - opline = zend_emit_op(result, ZEND_NEW, NULL, NULL TSRMLS_CC); + opline = zend_emit_op(result, ZEND_NEW, NULL, NULL); if (class_node.op_type == IS_CONST) { opline->op1_type = IS_CONST; opline->op1.constant = zend_add_class_name_literal( - CG(active_op_array), Z_STR(class_node.u.constant) TSRMLS_CC); + CG(active_op_array), Z_STR(class_node.u.constant)); } else { SET_NODE(opline->op1, &class_node); } - zend_compile_call_common(&ctor_result, args_ast, NULL TSRMLS_CC); - zend_do_free(&ctor_result TSRMLS_CC); + zend_compile_call_common(&ctor_result, args_ast, NULL); + zend_do_free(&ctor_result); /* New jumps over ctor call if ctor does not exist */ opline = &CG(active_op_array)->opcodes[opnum]; @@ -2973,49 +2972,49 @@ void zend_compile_new(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_clone(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_clone(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *obj_ast = ast->child[0]; znode obj_node; - zend_compile_expr(&obj_node, obj_ast TSRMLS_CC); + zend_compile_expr(&obj_node, obj_ast); - zend_emit_op(result, ZEND_CLONE, &obj_node, NULL TSRMLS_CC); + zend_emit_op(result, ZEND_CLONE, &obj_node, NULL); } /* }}} */ -void zend_compile_global_var(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_global_var(zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; zend_ast *name_ast = var_ast->child[0]; znode name_node, result; - zend_compile_expr(&name_node, name_ast TSRMLS_CC); + zend_compile_expr(&name_node, name_ast); if (name_node.op_type == IS_CONST) { convert_to_string(&name_node.u.constant); } - if (zend_try_compile_cv(&result, var_ast TSRMLS_CC) == SUCCESS) { - zend_op *opline = zend_emit_op(NULL, ZEND_BIND_GLOBAL, &result, &name_node TSRMLS_CC); - zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC); + if (zend_try_compile_cv(&result, var_ast) == SUCCESS) { + zend_op *opline = zend_emit_op(NULL, ZEND_BIND_GLOBAL, &result, &name_node); + zend_alloc_cache_slot(opline->op2.constant); } else { - zend_emit_op(&result, ZEND_FETCH_W, &name_node, NULL TSRMLS_CC); + zend_emit_op(&result, ZEND_FETCH_W, &name_node, NULL); // TODO.AST Avoid double fetch //opline->extended_value = ZEND_FETCH_GLOBAL_LOCK; - zend_emit_assign_ref_znode(var_ast, &result TSRMLS_CC); + zend_emit_assign_ref_znode(var_ast, &result); } } /* }}} */ -static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, zend_bool by_ref TSRMLS_DC) /* {{{ */ +static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, zend_bool by_ref) /* {{{ */ { znode var_node, result; zend_op *opline; - zend_compile_expr(&var_node, var_ast TSRMLS_CC); + zend_compile_expr(&var_node, var_ast); if (!CG(active_op_array)->static_variables) { if (CG(active_op_array)->scope) { @@ -3027,36 +3026,36 @@ static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, zend_ zend_hash_update(CG(active_op_array)->static_variables, Z_STR(var_node.u.constant), value); - opline = zend_emit_op(&result, by_ref ? ZEND_FETCH_W : ZEND_FETCH_R, &var_node, NULL TSRMLS_CC); + opline = zend_emit_op(&result, by_ref ? ZEND_FETCH_W : ZEND_FETCH_R, &var_node, NULL); opline->extended_value = ZEND_FETCH_STATIC; if (by_ref) { zend_ast *fetch_ast = zend_ast_create(ZEND_AST_VAR, var_ast); - zend_emit_assign_ref_znode(fetch_ast, &result TSRMLS_CC); + zend_emit_assign_ref_znode(fetch_ast, &result); } else { zend_ast *fetch_ast = zend_ast_create(ZEND_AST_VAR, var_ast); - zend_emit_assign_znode(fetch_ast, &result TSRMLS_CC); + zend_emit_assign_znode(fetch_ast, &result); } } /* }}} */ -void zend_compile_static_var(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_static_var(zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; zend_ast *value_ast = ast->child[1]; zval value_zv; if (value_ast) { - zend_const_expr_to_zval(&value_zv, value_ast TSRMLS_CC); + zend_const_expr_to_zval(&value_zv, value_ast); } else { ZVAL_NULL(&value_zv); } - zend_compile_static_var_common(var_ast, &value_zv, 1 TSRMLS_CC); + zend_compile_static_var_common(var_ast, &value_zv, 1); } /* }}} */ -void zend_compile_unset(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_unset(zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; @@ -3064,24 +3063,24 @@ void zend_compile_unset(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_op *opline; switch (var_ast->kind) { case ZEND_AST_VAR: - if (zend_try_compile_cv(&var_node, var_ast TSRMLS_CC) == SUCCESS) { - opline = zend_emit_op(NULL, ZEND_UNSET_VAR, &var_node, NULL TSRMLS_CC); + if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) { + opline = zend_emit_op(NULL, ZEND_UNSET_VAR, &var_node, NULL); opline->extended_value = ZEND_FETCH_LOCAL | ZEND_QUICK_SET; } else { - opline = zend_compile_simple_var_no_cv(NULL, var_ast, BP_VAR_UNSET TSRMLS_CC); + opline = zend_compile_simple_var_no_cv(NULL, var_ast, BP_VAR_UNSET); opline->opcode = ZEND_UNSET_VAR; } return; case ZEND_AST_DIM: - opline = zend_compile_dim_common(NULL, var_ast, BP_VAR_UNSET TSRMLS_CC); + opline = zend_compile_dim_common(NULL, var_ast, BP_VAR_UNSET); opline->opcode = ZEND_UNSET_DIM; return; case ZEND_AST_PROP: - opline = zend_compile_prop_common(NULL, var_ast, BP_VAR_UNSET TSRMLS_CC); + opline = zend_compile_prop_common(NULL, var_ast, BP_VAR_UNSET); opline->opcode = ZEND_UNSET_OBJ; return; case ZEND_AST_STATIC_PROP: - opline = zend_compile_static_prop_common(NULL, var_ast, BP_VAR_UNSET TSRMLS_CC); + opline = zend_compile_static_prop_common(NULL, var_ast, BP_VAR_UNSET); opline->opcode = ZEND_UNSET_VAR; return; EMPTY_SWITCH_DEFAULT_CASE() @@ -3089,17 +3088,13 @@ void zend_compile_unset(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -static void zend_free_foreach_and_switch_variables(TSRMLS_D) /* {{{ */ +static void zend_free_foreach_and_switch_variables(void) /* {{{ */ { uint32_t opnum_start, opnum_end, i; opnum_start = get_next_op_number(CG(active_op_array)); -#ifdef ZTS - zend_stack_apply_with_argument(&CG(loop_var_stack), ZEND_STACK_APPLY_TOPDOWN, (int (*)(void *element, void *)) generate_free_loop_var TSRMLS_CC); -#else zend_stack_apply(&CG(loop_var_stack), ZEND_STACK_APPLY_TOPDOWN, (int (*)(void *element)) generate_free_loop_var); -#endif opnum_end = get_next_op_number(CG(active_op_array)); @@ -3109,7 +3104,7 @@ static void zend_free_foreach_and_switch_variables(TSRMLS_D) /* {{{ */ } /* }}} */ -void zend_compile_return(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_return(zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; zend_bool by_ref = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; @@ -3121,21 +3116,21 @@ void zend_compile_return(zend_ast *ast TSRMLS_DC) /* {{{ */ expr_node.op_type = IS_CONST; ZVAL_NULL(&expr_node.u.constant); } else if (by_ref && zend_is_variable(expr_ast) && !zend_is_call(expr_ast)) { - zend_compile_var(&expr_node, expr_ast, BP_VAR_REF TSRMLS_CC); + zend_compile_var(&expr_node, expr_ast, BP_VAR_REF); } else { - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); } - zend_free_foreach_and_switch_variables(TSRMLS_C); + zend_free_foreach_and_switch_variables(); if (CG(context).in_finally) { - opline = zend_emit_op(NULL, ZEND_DISCARD_EXCEPTION, NULL, NULL TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_DISCARD_EXCEPTION, NULL, NULL); opline->op1_type = IS_TMP_VAR; opline->op1.var = CG(context).fast_call_var; } opline = zend_emit_op(NULL, by_ref ? ZEND_RETURN_BY_REF : ZEND_RETURN, - &expr_node, NULL TSRMLS_CC); + &expr_node, NULL); if (expr_ast) { if (zend_is_call(expr_ast)) { @@ -3147,29 +3142,29 @@ void zend_compile_return(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_echo(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_echo(zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; znode expr_node; - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); - zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL TSRMLS_CC); + zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL); } /* }}} */ -void zend_compile_throw(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_throw(zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; znode expr_node; - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); - zend_emit_op(NULL, ZEND_THROW, &expr_node, NULL TSRMLS_CC); + zend_emit_op(NULL, ZEND_THROW, &expr_node, NULL); } /* }}} */ -void zend_compile_break_continue(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_break_continue(zend_ast *ast) /* {{{ */ { zend_ast *depth_ast = ast->child[0]; @@ -3184,7 +3179,7 @@ void zend_compile_break_continue(zend_ast *ast TSRMLS_DC) /* {{{ */ "is no longer supported", ast->kind == ZEND_AST_BREAK ? "break" : "continue"); } - zend_compile_expr(&depth_node, depth_ast TSRMLS_CC); + zend_compile_expr(&depth_node, depth_ast); if (Z_TYPE(depth_node.u.constant) != IS_LONG || Z_LVAL(depth_node.u.constant) < 1) { zend_error_noreturn(E_COMPILE_ERROR, "'%s' operator accepts only positive numbers", @@ -3196,25 +3191,25 @@ void zend_compile_break_continue(zend_ast *ast TSRMLS_DC) /* {{{ */ } opline = zend_emit_op(NULL, ast->kind == ZEND_AST_BREAK ? ZEND_BRK : ZEND_CONT, - NULL, &depth_node TSRMLS_CC); + NULL, &depth_node); opline->op1.opline_num = CG(context).current_brk_cont; } /* }}} */ -void zend_compile_goto(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_goto(zend_ast *ast) /* {{{ */ { zend_ast *label_ast = ast->child[0]; znode label_node; zend_op *opline; - zend_compile_expr(&label_node, label_ast TSRMLS_CC); - opline = zend_emit_op(NULL, ZEND_GOTO, NULL, &label_node TSRMLS_CC); + zend_compile_expr(&label_node, label_ast); + opline = zend_emit_op(NULL, ZEND_GOTO, NULL, &label_node); opline->extended_value = CG(context).current_brk_cont; - zend_resolve_goto_label(CG(active_op_array), opline, 0 TSRMLS_CC); + zend_resolve_goto_label(CG(active_op_array), opline, 0); } /* }}} */ -void zend_compile_label(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_label(zend_ast *ast) /* {{{ */ { zend_string *label = zend_ast_get_str(ast->child[0]); zend_label dest; @@ -3233,7 +3228,7 @@ void zend_compile_label(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_while(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_while(zend_ast *ast) /* {{{ */ { zend_ast *cond_ast = ast->child[0]; zend_ast *stmt_ast = ast->child[1]; @@ -3242,22 +3237,22 @@ void zend_compile_while(zend_ast *ast TSRMLS_DC) /* {{{ */ uint32_t opnum_start, opnum_jmpz; opnum_start = get_next_op_number(CG(active_op_array)); - zend_compile_expr(&cond_node, cond_ast TSRMLS_CC); + zend_compile_expr(&cond_node, cond_ast); - opnum_jmpz = zend_emit_cond_jump(ZEND_JMPZ, &cond_node, 0 TSRMLS_CC); - zend_begin_loop(TSRMLS_C); + opnum_jmpz = zend_emit_cond_jump(ZEND_JMPZ, &cond_node, 0); + zend_begin_loop(); - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); - zend_emit_jump(opnum_start TSRMLS_CC); + zend_emit_jump(opnum_start); - zend_update_jump_target_to_next(opnum_jmpz TSRMLS_CC); + zend_update_jump_target_to_next(opnum_jmpz); - zend_end_loop(opnum_start, 0 TSRMLS_CC); + zend_end_loop(opnum_start, 0); } /* }}} */ -void zend_compile_do_while(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_do_while(zend_ast *ast) /* {{{ */ { zend_ast *stmt_ast = ast->child[0]; zend_ast *cond_ast = ast->child[1]; @@ -3265,21 +3260,21 @@ void zend_compile_do_while(zend_ast *ast TSRMLS_DC) /* {{{ */ znode cond_node; uint32_t opnum_start, opnum_cond; - zend_begin_loop(TSRMLS_C); + zend_begin_loop(); opnum_start = get_next_op_number(CG(active_op_array)); - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); opnum_cond = get_next_op_number(CG(active_op_array)); - zend_compile_expr(&cond_node, cond_ast TSRMLS_CC); + zend_compile_expr(&cond_node, cond_ast); - zend_emit_cond_jump(ZEND_JMPNZ, &cond_node, opnum_start TSRMLS_CC); + zend_emit_cond_jump(ZEND_JMPNZ, &cond_node, opnum_start); - zend_end_loop(opnum_cond, 0 TSRMLS_CC); + zend_end_loop(opnum_cond, 0); } /* }}} */ -void zend_compile_expr_list(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_expr_list(znode *result, zend_ast *ast) /* {{{ */ { zend_ast_list *list; uint32_t i; @@ -3295,13 +3290,13 @@ void zend_compile_expr_list(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ for (i = 0; i < list->children; ++i) { zend_ast *expr_ast = list->child[i]; - zend_do_free(result TSRMLS_CC); - zend_compile_expr(result, expr_ast TSRMLS_CC); + zend_do_free(result); + zend_compile_expr(result, expr_ast); } } /* }}} */ -void zend_compile_for(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_for(zend_ast *ast) /* {{{ */ { zend_ast *init_ast = ast->child[0]; zend_ast *cond_ast = ast->child[1]; @@ -3311,31 +3306,31 @@ void zend_compile_for(zend_ast *ast TSRMLS_DC) /* {{{ */ znode result; uint32_t opnum_cond, opnum_jmpz, opnum_loop; - zend_compile_expr_list(&result, init_ast TSRMLS_CC); - zend_do_free(&result TSRMLS_CC); + zend_compile_expr_list(&result, init_ast); + zend_do_free(&result); opnum_cond = get_next_op_number(CG(active_op_array)); - zend_compile_expr_list(&result, cond_ast TSRMLS_CC); - zend_do_extended_info(TSRMLS_C); + zend_compile_expr_list(&result, cond_ast); + zend_do_extended_info(); - opnum_jmpz = zend_emit_cond_jump(ZEND_JMPZ, &result, 0 TSRMLS_CC); - zend_begin_loop(TSRMLS_C); + opnum_jmpz = zend_emit_cond_jump(ZEND_JMPZ, &result, 0); + zend_begin_loop(); - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); opnum_loop = get_next_op_number(CG(active_op_array)); - zend_compile_expr_list(&result, loop_ast TSRMLS_CC); - zend_do_free(&result TSRMLS_CC); + zend_compile_expr_list(&result, loop_ast); + zend_do_free(&result); - zend_emit_jump(opnum_cond TSRMLS_CC); + zend_emit_jump(opnum_cond); - zend_update_jump_target_to_next(opnum_jmpz TSRMLS_CC); + zend_update_jump_target_to_next(opnum_jmpz); - zend_end_loop(opnum_loop, 0 TSRMLS_CC); + zend_end_loop(opnum_loop, 0); } /* }}} */ -void zend_compile_foreach(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_foreach(zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; zend_ast *value_ast = ast->child[1]; @@ -3363,17 +3358,17 @@ void zend_compile_foreach(zend_ast *ast TSRMLS_DC) /* {{{ */ } if (by_ref && is_variable) { - zend_compile_var(&expr_node, expr_ast, BP_VAR_W TSRMLS_CC); + zend_compile_var(&expr_node, expr_ast, BP_VAR_W); } else { - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); } if (by_ref) { - zend_separate_if_call_and_write(&expr_node, expr_ast, BP_VAR_W TSRMLS_CC); + zend_separate_if_call_and_write(&expr_node, expr_ast, BP_VAR_W); } opnum_reset = get_next_op_number(CG(active_op_array)); - opline = zend_emit_op(&reset_node, ZEND_FE_RESET, &expr_node, NULL TSRMLS_CC); + opline = zend_emit_op(&reset_node, ZEND_FE_RESET, &expr_node, NULL); if (by_ref && is_variable) { opline->extended_value = ZEND_FE_FETCH_BYREF; } @@ -3381,7 +3376,7 @@ void zend_compile_foreach(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_stack_push(&CG(loop_var_stack), &reset_node); opnum_fetch = get_next_op_number(CG(active_op_array)); - opline = zend_emit_op(&value_node, ZEND_FE_FETCH, &reset_node, NULL TSRMLS_CC); + opline = zend_emit_op(&value_node, ZEND_FE_FETCH, &reset_node, NULL); if (by_ref) { opline->extended_value |= ZEND_FE_FETCH_BYREF; } @@ -3389,7 +3384,7 @@ void zend_compile_foreach(zend_ast *ast TSRMLS_DC) /* {{{ */ opline->extended_value |= ZEND_FE_FETCH_WITH_KEY; } - opline = zend_emit_op(NULL, ZEND_OP_DATA, NULL, NULL TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_OP_DATA, NULL, NULL); /* Allocate enough space to keep HashPointer on VM stack */ opline->op1_type = IS_TMP_VAR; @@ -3400,24 +3395,24 @@ void zend_compile_foreach(zend_ast *ast TSRMLS_DC) /* {{{ */ } if (key_ast) { - zend_make_tmp_result(&key_node, opline TSRMLS_CC); + zend_make_tmp_result(&key_node, opline); } if (by_ref) { - zend_emit_assign_ref_znode(value_ast, &value_node TSRMLS_CC); + zend_emit_assign_ref_znode(value_ast, &value_node); } else { - zend_emit_assign_znode(value_ast, &value_node TSRMLS_CC); + zend_emit_assign_znode(value_ast, &value_node); } if (key_ast) { - zend_emit_assign_znode(key_ast, &key_node TSRMLS_CC); + zend_emit_assign_znode(key_ast, &key_node); } - zend_begin_loop(TSRMLS_C); + zend_begin_loop(); - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); - zend_emit_jump(opnum_fetch TSRMLS_CC); + zend_emit_jump(opnum_fetch); opline = &CG(active_op_array)->opcodes[opnum_reset]; opline->op2.opline_num = get_next_op_number(CG(active_op_array)); @@ -3425,14 +3420,14 @@ void zend_compile_foreach(zend_ast *ast TSRMLS_DC) /* {{{ */ opline = &CG(active_op_array)->opcodes[opnum_fetch]; opline->op2.opline_num = get_next_op_number(CG(active_op_array)); - zend_end_loop(opnum_fetch, 1 TSRMLS_CC); + zend_end_loop(opnum_fetch, 1); - generate_free_loop_var(&reset_node TSRMLS_CC); + generate_free_loop_var(&reset_node); zend_stack_del_top(&CG(loop_var_stack)); } /* }}} */ -void zend_compile_if(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_if(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -3450,31 +3445,31 @@ void zend_compile_if(zend_ast *ast TSRMLS_DC) /* {{{ */ znode cond_node; uint32_t opnum_jmpz; if (cond_ast) { - zend_compile_expr(&cond_node, cond_ast TSRMLS_CC); - opnum_jmpz = zend_emit_cond_jump(ZEND_JMPZ, &cond_node, 0 TSRMLS_CC); + zend_compile_expr(&cond_node, cond_ast); + opnum_jmpz = zend_emit_cond_jump(ZEND_JMPZ, &cond_node, 0); } - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); if (i != list->children - 1) { - jmp_opnums[i] = zend_emit_jump(0 TSRMLS_CC); + jmp_opnums[i] = zend_emit_jump(0); } if (cond_ast) { - zend_update_jump_target_to_next(opnum_jmpz TSRMLS_CC); + zend_update_jump_target_to_next(opnum_jmpz); } } if (list->children > 1) { for (i = 0; i < list->children - 1; ++i) { - zend_update_jump_target_to_next(jmp_opnums[i] TSRMLS_CC); + zend_update_jump_target_to_next(jmp_opnums[i]); } efree(jmp_opnums); } } /* }}} */ -void zend_compile_switch(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_switch(zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; zend_ast_list *cases = zend_ast_get_list(ast->child[1]); @@ -3487,11 +3482,11 @@ void zend_compile_switch(zend_ast *ast TSRMLS_DC) /* {{{ */ uint32_t *jmpnz_opnums = safe_emalloc(sizeof(uint32_t), cases->children, 0); uint32_t opnum_default_jmp; - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); zend_stack_push(&CG(loop_var_stack), &expr_node); - zend_begin_loop(TSRMLS_C); + zend_begin_loop(); case_node.op_type = IS_TMP_VAR; case_node.u.op.var = get_temporary_variable(CG(active_op_array)); @@ -3511,18 +3506,18 @@ void zend_compile_switch(zend_ast *ast TSRMLS_DC) /* {{{ */ continue; } - zend_compile_expr(&cond_node, cond_ast TSRMLS_CC); + zend_compile_expr(&cond_node, cond_ast); - opline = zend_emit_op(NULL, ZEND_CASE, &expr_node, &cond_node TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_CASE, &expr_node, &cond_node); SET_NODE(opline->result, &case_node); if (opline->op1_type == IS_CONST) { zval_copy_ctor(CT_CONSTANT(opline->op1)); } - jmpnz_opnums[i] = zend_emit_cond_jump(ZEND_JMPNZ, &case_node, 0 TSRMLS_CC); + jmpnz_opnums[i] = zend_emit_cond_jump(ZEND_JMPNZ, &case_node, 0); } - opnum_default_jmp = zend_emit_jump(0 TSRMLS_CC); + opnum_default_jmp = zend_emit_jump(0); for (i = 0; i < cases->children; ++i) { zend_ast *case_ast = cases->child[i]; @@ -3530,23 +3525,23 @@ void zend_compile_switch(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_ast *stmt_ast = case_ast->child[1]; if (cond_ast) { - zend_update_jump_target_to_next(jmpnz_opnums[i] TSRMLS_CC); + zend_update_jump_target_to_next(jmpnz_opnums[i]); } else { - zend_update_jump_target_to_next(opnum_default_jmp TSRMLS_CC); + zend_update_jump_target_to_next(opnum_default_jmp); } - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); } if (!has_default_case) { - zend_update_jump_target_to_next(opnum_default_jmp TSRMLS_CC); + zend_update_jump_target_to_next(opnum_default_jmp); } - zend_end_loop(get_next_op_number(CG(active_op_array)), 1 TSRMLS_CC); + zend_end_loop(get_next_op_number(CG(active_op_array)), 1); if (expr_node.op_type == IS_VAR || expr_node.op_type == IS_TMP_VAR) { zend_emit_op(NULL, ZEND_FREE, - &expr_node, NULL TSRMLS_CC); + &expr_node, NULL); } else if (expr_node.op_type == IS_CONST) { zval_dtor(&expr_node.u.constant); } @@ -3556,7 +3551,7 @@ void zend_compile_switch(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_try(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_try(zend_ast *ast) /* {{{ */ { zend_ast *try_ast = ast->child[0]; zend_ast_list *catches = zend_ast_get_list(ast->child[1]); @@ -3565,17 +3560,17 @@ void zend_compile_try(zend_ast *ast TSRMLS_DC) /* {{{ */ uint32_t i; zend_op *opline; uint32_t try_catch_offset = zend_add_try_element( - get_next_op_number(CG(active_op_array)) TSRMLS_CC); + get_next_op_number(CG(active_op_array))); uint32_t *jmp_opnums = safe_emalloc(sizeof(uint32_t), catches->children, 0); if (catches->children == 0 && !finally_ast) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot use try without catch or finally"); } - zend_compile_stmt(try_ast TSRMLS_CC); + zend_compile_stmt(try_ast); if (catches->children != 0) { - jmp_opnums[0] = zend_emit_jump(0 TSRMLS_CC); + jmp_opnums[0] = zend_emit_jump(0); } for (i = 0; i < catches->children; ++i) { @@ -3599,20 +3594,20 @@ void zend_compile_try(zend_ast *ast TSRMLS_DC) /* {{{ */ CG(zend_lineno) = catch_ast->lineno; - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_CATCH; opline->op1_type = IS_CONST; opline->op1.constant = zend_add_class_name_literal(CG(active_op_array), - zend_resolve_class_name_ast(class_ast TSRMLS_CC) TSRMLS_CC); + zend_resolve_class_name_ast(class_ast)); opline->op2_type = IS_CV; - opline->op2.var = lookup_cv(CG(active_op_array), zend_string_copy(Z_STR_P(var_name)) TSRMLS_CC); + opline->op2.var = lookup_cv(CG(active_op_array), zend_string_copy(Z_STR_P(var_name))); opline->result.num = is_last_catch; - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); if (!is_last_catch) { - jmp_opnums[i + 1] = zend_emit_jump(0 TSRMLS_CC); + jmp_opnums[i + 1] = zend_emit_jump(0); } opline = &CG(active_op_array)->opcodes[opnum_catch]; @@ -3620,7 +3615,7 @@ void zend_compile_try(zend_ast *ast TSRMLS_DC) /* {{{ */ } for (i = 0; i < catches->children; ++i) { - zend_update_jump_target_to_next(jmp_opnums[i] TSRMLS_CC); + zend_update_jump_target_to_next(jmp_opnums[i]); } if (finally_ast) { @@ -3631,26 +3626,26 @@ void zend_compile_try(zend_ast *ast TSRMLS_DC) /* {{{ */ CG(context).fast_call_var = get_temporary_variable(CG(active_op_array)); } - opline = zend_emit_op(NULL, ZEND_FAST_CALL, NULL, NULL TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_FAST_CALL, NULL, NULL); opline->op1.opline_num = opnum_jmp + 1; opline->result_type = IS_TMP_VAR; opline->result.var = CG(context).fast_call_var; - zend_emit_op(NULL, ZEND_JMP, NULL, NULL TSRMLS_CC); + zend_emit_op(NULL, ZEND_JMP, NULL, NULL); CG(context).in_finally++; - zend_compile_stmt(finally_ast TSRMLS_CC); + zend_compile_stmt(finally_ast); CG(context).in_finally--; CG(active_op_array)->try_catch_array[try_catch_offset].finally_op = opnum_jmp + 1; CG(active_op_array)->try_catch_array[try_catch_offset].finally_end = get_next_op_number(CG(active_op_array)); - opline = zend_emit_op(NULL, ZEND_FAST_RET, NULL, NULL TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_FAST_RET, NULL, NULL); opline->op1_type = IS_TMP_VAR; opline->op1.var = CG(context).fast_call_var; - zend_update_jump_target_to_next(opnum_jmp TSRMLS_CC); + zend_update_jump_target_to_next(opnum_jmp); } efree(jmp_opnums); @@ -3658,7 +3653,7 @@ void zend_compile_try(zend_ast *ast TSRMLS_DC) /* {{{ */ /* }}} */ /* Encoding declarations must already be handled during parsing */ -void zend_handle_encoding_declaration(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_handle_encoding_declaration(zend_ast *ast) /* {{{ */ { zend_ast_list *declares = zend_ast_get_list(ast); uint32_t i; @@ -3681,18 +3676,18 @@ void zend_handle_encoding_declaration(zend_ast *ast TSRMLS_DC) /* {{{ */ CG(encoding_declared) = 1; - new_encoding = zend_multibyte_fetch_encoding(encoding_name->val TSRMLS_CC); + new_encoding = zend_multibyte_fetch_encoding(encoding_name->val); if (!new_encoding) { zend_error(E_COMPILE_WARNING, "Unsupported encoding [%s]", encoding_name->val); } else { old_input_filter = LANG_SCNG(input_filter); old_encoding = LANG_SCNG(script_encoding); - zend_multibyte_set_filter(new_encoding TSRMLS_CC); + zend_multibyte_set_filter(new_encoding); /* need to re-scan if input filter changed */ if (old_input_filter != LANG_SCNG(input_filter) || (old_input_filter && new_encoding != old_encoding)) { - zend_multibyte_yyinput_again(old_input_filter, old_encoding TSRMLS_CC); + zend_multibyte_yyinput_again(old_input_filter, old_encoding); } } @@ -3706,7 +3701,7 @@ void zend_handle_encoding_declaration(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_declare(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_declare(zend_ast *ast) /* {{{ */ { zend_ast_list *declares = zend_ast_get_list(ast->child[0]); zend_ast *stmt_ast = ast->child[1]; @@ -3721,7 +3716,7 @@ void zend_compile_declare(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_string *name = zend_ast_get_str(name_ast); if (zend_string_equals_literal_ci(name, "ticks")) { zval value_zv; - zend_const_expr_to_zval(&value_zv, value_ast TSRMLS_CC); + zend_const_expr_to_zval(&value_zv, value_ast); convert_to_long(&value_zv); ZVAL_COPY_VALUE(&CG(declarables).ticks, &value_zv); zval_dtor(&value_zv); @@ -3745,24 +3740,24 @@ void zend_compile_declare(zend_ast *ast TSRMLS_DC) /* {{{ */ } if (stmt_ast) { - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); CG(declarables) = orig_declarables; } } /* }}} */ -void zend_compile_stmt_list(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_stmt_list(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; for (i = 0; i < list->children; ++i) { - zend_compile_stmt(list->child[i] TSRMLS_CC); + zend_compile_stmt(list->child[i]); } } /* }}} */ -void zend_compile_params(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_params(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -3788,13 +3783,13 @@ void zend_compile_params(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_op *opline; zend_arg_info *arg_info; - if (zend_is_auto_global(name TSRMLS_CC)) { + if (zend_is_auto_global(name)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot re-assign auto-global variable %s", name->val); } var_node.op_type = IS_CV; - var_node.u.op.var = lookup_cv(CG(active_op_array), zend_string_copy(name) TSRMLS_CC); + var_node.u.op.var = lookup_cv(CG(active_op_array), zend_string_copy(name)); if (EX_VAR_TO_NUM(var_node.u.op.var) != i) { zend_error_noreturn(E_COMPILE_ERROR, "Redefinition of parameter $%s", @@ -3822,14 +3817,14 @@ void zend_compile_params(zend_ast *ast TSRMLS_DC) /* {{{ */ } else if (default_ast) { opcode = ZEND_RECV_INIT; default_node.op_type = IS_CONST; - zend_const_expr_to_zval(&default_node.u.constant, default_ast TSRMLS_CC); + zend_const_expr_to_zval(&default_node.u.constant, default_ast); } else { opcode = ZEND_RECV; default_node.op_type = IS_UNUSED; op_array->required_num_args = i + 1; } - opline = zend_emit_op(NULL, opcode, NULL, &default_node TSRMLS_CC); + opline = zend_emit_op(NULL, opcode, NULL, &default_node); SET_NODE(opline->result, &var_node); opline->op1.num = i + 1; @@ -3870,7 +3865,7 @@ void zend_compile_params(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_string *class_name = zend_ast_get_str(type_ast); if (zend_is_const_default_class_ref(type_ast)) { - class_name = zend_resolve_class_name_ast(type_ast TSRMLS_CC); + class_name = zend_resolve_class_name_ast(type_ast); } else { zend_string_addref(class_name); } @@ -3892,7 +3887,7 @@ void zend_compile_params(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_closure_uses(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_closure_uses(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -3910,12 +3905,12 @@ void zend_compile_closure_uses(zend_ast *ast TSRMLS_DC) /* {{{ */ ZVAL_NULL(&zv); Z_CONST_FLAGS(zv) = by_ref ? IS_LEXICAL_REF : IS_LEXICAL_VAR; - zend_compile_static_var_common(var_ast, &zv, by_ref TSRMLS_CC); + zend_compile_static_var_common(var_ast, &zv, by_ref); } } /* }}} */ -void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_bool has_body TSRMLS_DC) /* {{{ */ +void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_bool has_body) /* {{{ */ { zend_class_entry *ce = CG(active_class_entry); zend_bool in_interface = (ce->ce_flags & ZEND_ACC_INTERFACE) != 0; @@ -3958,7 +3953,7 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo lcname = zend_string_alloc(name->len, 0); zend_str_tolower_copy(lcname->val, name->val, name->len); - lcname = zend_new_interned_string(lcname TSRMLS_CC); + lcname = zend_new_interned_string(lcname); if (zend_hash_add_ptr(&ce->function_table, lcname, op_array) == NULL) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot redeclare %s::%s()", @@ -4089,13 +4084,13 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo } /* }}} */ -static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_ast_decl *decl TSRMLS_DC) /* {{{ */ +static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_ast_decl *decl) /* {{{ */ { zend_ast *params_ast = decl->child[0]; zend_string *name = decl->name, *lcname; zend_op *opline; - op_array->function_name = name = zend_prefix_with_ns(name TSRMLS_CC); + op_array->function_name = name = zend_prefix_with_ns(name); lcname = zend_string_alloc(name->len, 0); zend_str_tolower_copy(lcname->val, name->val, name->len); @@ -4116,16 +4111,16 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as } if (op_array->fn_flags & ZEND_ACC_CLOSURE) { - opline = zend_emit_op_tmp(result, ZEND_DECLARE_LAMBDA_FUNCTION, NULL, NULL TSRMLS_CC); + opline = zend_emit_op_tmp(result, ZEND_DECLARE_LAMBDA_FUNCTION, NULL, NULL); } else { - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_DECLARE_FUNCTION; opline->op2_type = IS_CONST; LITERAL_STR(opline->op2, zend_string_copy(lcname)); } { - zend_string *key = zend_build_runtime_definition_key(lcname, decl->lex_pos TSRMLS_CC); + zend_string *key = zend_build_runtime_definition_key(lcname, decl->lex_pos); opline->op1_type = IS_CONST; LITERAL_STR(opline->op1, key); @@ -4137,7 +4132,7 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as } /* }}} */ -void zend_compile_func_decl(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_func_decl(znode *result, zend_ast *ast) /* {{{ */ { zend_ast_decl *decl = (zend_ast_decl *) ast; zend_ast *params_ast = decl->child[0]; @@ -4150,7 +4145,7 @@ void zend_compile_func_decl(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ // TODO.AST interactive (not just here - also bpc etc!) - init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE TSRMLS_CC); + init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE); op_array->fn_flags |= decl->flags; op_array->line_start = decl->start_lineno; @@ -4164,17 +4159,17 @@ void zend_compile_func_decl(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ if (is_method) { zend_bool has_body = stmt_ast != NULL; - zend_begin_method_decl(op_array, decl->name, has_body TSRMLS_CC); + zend_begin_method_decl(op_array, decl->name, has_body); } else { - zend_begin_func_decl(result, op_array, decl TSRMLS_CC); + zend_begin_func_decl(result, op_array, decl); } CG(active_op_array) = op_array; zend_stack_push(&CG(context_stack), (void *) &CG(context)); - zend_init_compiler_context(TSRMLS_C); + zend_init_compiler_context(); if (CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) { - zend_op *opline_ext = zend_emit_op(NULL, ZEND_EXT_NOP, NULL, NULL TSRMLS_CC); + zend_op *opline_ext = zend_emit_op(NULL, ZEND_EXT_NOP, NULL, NULL); opline_ext->lineno = decl->start_lineno; } @@ -4186,22 +4181,22 @@ void zend_compile_func_decl(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ zend_stack_push(&CG(loop_var_stack), (void *) &dummy_var); } - zend_compile_params(params_ast TSRMLS_CC); + zend_compile_params(params_ast); if (uses_ast) { - zend_compile_closure_uses(uses_ast TSRMLS_CC); + zend_compile_closure_uses(uses_ast); } - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); if (is_method) { zend_check_magic_method_implementation( - CG(active_class_entry), (zend_function *) op_array, E_COMPILE_ERROR TSRMLS_CC); + CG(active_class_entry), (zend_function *) op_array, E_COMPILE_ERROR); } - zend_do_extended_info(TSRMLS_C); - zend_emit_final_return(NULL TSRMLS_CC); + zend_do_extended_info(); + zend_emit_final_return(NULL); - pass_two(CG(active_op_array) TSRMLS_CC); - zend_release_labels(0 TSRMLS_CC); + pass_two(CG(active_op_array)); + zend_release_labels(0); /* Pop the loop variable stack separator */ zend_stack_del_top(&CG(loop_var_stack)); @@ -4210,7 +4205,7 @@ void zend_compile_func_decl(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_prop_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_prop_decl(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t flags = list->attr; @@ -4251,13 +4246,13 @@ void zend_compile_prop_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ } if (value_ast) { - zend_const_expr_to_zval(&value_zv, value_ast TSRMLS_CC); + zend_const_expr_to_zval(&value_zv, value_ast); } else { ZVAL_NULL(&value_zv); } - name = zend_new_interned_string_safe(name TSRMLS_CC); - zend_declare_property_ex(ce, name, &value_zv, flags, doc_comment TSRMLS_CC); + name = zend_new_interned_string_safe(name); + zend_declare_property_ex(ce, name, &value_zv, flags, doc_comment); /* Doc comment is only assigned to first property */ doc_comment = NULL; @@ -4265,7 +4260,7 @@ void zend_compile_prop_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_class_const_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_class_const_decl(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); zend_class_entry *ce = CG(active_class_entry); @@ -4283,9 +4278,9 @@ void zend_compile_class_const_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ return; } - zend_const_expr_to_zval(&value_zv, value_ast TSRMLS_CC); + zend_const_expr_to_zval(&value_zv, value_ast); - name = zend_new_interned_string_safe(name TSRMLS_CC); + name = zend_new_interned_string_safe(name); if (zend_hash_add(&ce->constants_table, name, &value_zv) == NULL) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot redefine class constant %s::%s", ce->name->val, name->val); @@ -4298,7 +4293,7 @@ void zend_compile_class_const_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -static zend_trait_method_reference *zend_compile_method_ref(zend_ast *ast TSRMLS_DC) /* {{{ */ +static zend_trait_method_reference *zend_compile_method_ref(zend_ast *ast) /* {{{ */ { zend_ast *class_ast = ast->child[0]; zend_ast *method_ast = ast->child[1]; @@ -4308,7 +4303,7 @@ static zend_trait_method_reference *zend_compile_method_ref(zend_ast *ast TSRMLS method_ref->method_name = zend_string_copy(zend_ast_get_str(method_ast)); if (class_ast) { - method_ref->class_name = zend_resolve_class_name_ast(class_ast TSRMLS_CC); + method_ref->class_name = zend_resolve_class_name_ast(class_ast); } else { method_ref->class_name = NULL; } @@ -4317,7 +4312,7 @@ static zend_trait_method_reference *zend_compile_method_ref(zend_ast *ast TSRMLS } /* }}} */ -static zend_string **zend_compile_name_list(zend_ast *ast TSRMLS_DC) /* {{{ */ +static zend_string **zend_compile_name_list(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); zend_string **names = safe_emalloc(sizeof(zend_string *), list->children + 1, 0); @@ -4325,7 +4320,7 @@ static zend_string **zend_compile_name_list(zend_ast *ast TSRMLS_DC) /* {{{ */ for (i = 0; i < list->children; ++i) { zend_ast *name_ast = list->child[i]; - names[i] = zend_resolve_class_name_ast(name_ast TSRMLS_CC); + names[i] = zend_resolve_class_name_ast(name_ast); } names[list->children] = NULL; @@ -4334,21 +4329,21 @@ static zend_string **zend_compile_name_list(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -static void zend_compile_trait_precedence(zend_ast *ast TSRMLS_DC) /* {{{ */ +static void zend_compile_trait_precedence(zend_ast *ast) /* {{{ */ { zend_ast *method_ref_ast = ast->child[0]; zend_ast *insteadof_ast = ast->child[1]; zend_trait_precedence *precedence = emalloc(sizeof(zend_trait_precedence)); - precedence->trait_method = zend_compile_method_ref(method_ref_ast TSRMLS_CC); + precedence->trait_method = zend_compile_method_ref(method_ref_ast); precedence->exclude_from_classes - = (void *) zend_compile_name_list(insteadof_ast TSRMLS_CC); + = (void *) zend_compile_name_list(insteadof_ast); - zend_add_to_list(&CG(active_class_entry)->trait_precedences, precedence TSRMLS_CC); + zend_add_to_list(&CG(active_class_entry)->trait_precedences, precedence); } /* }}} */ -static void zend_compile_trait_alias(zend_ast *ast TSRMLS_DC) /* {{{ */ +static void zend_compile_trait_alias(zend_ast *ast) /* {{{ */ { zend_ast *method_ref_ast = ast->child[0]; zend_ast *alias_ast = ast->child[1]; @@ -4365,7 +4360,7 @@ static void zend_compile_trait_alias(zend_ast *ast TSRMLS_DC) /* {{{ */ } alias = emalloc(sizeof(zend_trait_alias)); - alias->trait_method = zend_compile_method_ref(method_ref_ast TSRMLS_CC); + alias->trait_method = zend_compile_method_ref(method_ref_ast); alias->modifiers = modifiers; if (alias_ast) { @@ -4374,11 +4369,11 @@ static void zend_compile_trait_alias(zend_ast *ast TSRMLS_DC) /* {{{ */ alias->alias = NULL; } - zend_add_to_list(&CG(active_class_entry)->trait_aliases, alias TSRMLS_CC); + zend_add_to_list(&CG(active_class_entry)->trait_aliases, alias); } /* }}} */ -void zend_compile_use_trait(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_use_trait(zend_ast *ast) /* {{{ */ { zend_ast_list *traits = zend_ast_get_list(ast->child[0]); zend_ast_list *adaptations = ast->child[1] ? zend_ast_get_list(ast->child[1]) : NULL; @@ -4404,12 +4399,12 @@ void zend_compile_use_trait(zend_ast *ast TSRMLS_DC) /* {{{ */ break; } - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_ADD_TRAIT; SET_NODE(opline->op1, &CG(implementing_class)); opline->op2_type = IS_CONST; opline->op2.constant = zend_add_class_name_literal(CG(active_op_array), - zend_resolve_class_name_ast(trait_ast TSRMLS_CC) TSRMLS_CC); + zend_resolve_class_name_ast(trait_ast)); ce->num_traits++; } @@ -4422,10 +4417,10 @@ void zend_compile_use_trait(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_ast *adaptation_ast = adaptations->child[i]; switch (adaptation_ast->kind) { case ZEND_AST_TRAIT_PRECEDENCE: - zend_compile_trait_precedence(adaptation_ast TSRMLS_CC); + zend_compile_trait_precedence(adaptation_ast); break; case ZEND_AST_TRAIT_ALIAS: - zend_compile_trait_alias(adaptation_ast TSRMLS_CC); + zend_compile_trait_alias(adaptation_ast); break; EMPTY_SWITCH_DEFAULT_CASE() } @@ -4433,7 +4428,7 @@ void zend_compile_use_trait(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_implements(znode *class_node, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_implements(znode *class_node, zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -4454,17 +4449,17 @@ void zend_compile_implements(znode *class_node, zend_ast *ast TSRMLS_DC) /* {{{ "Cannot use '%s' as interface name as it is reserved", name->val); } - opline = zend_emit_op(NULL, ZEND_ADD_INTERFACE, class_node, NULL TSRMLS_CC); + opline = zend_emit_op(NULL, ZEND_ADD_INTERFACE, class_node, NULL); opline->op2_type = IS_CONST; opline->op2.constant = zend_add_class_name_literal(CG(active_op_array), - zend_resolve_class_name_ast(class_ast TSRMLS_CC) TSRMLS_CC); + zend_resolve_class_name_ast(class_ast)); CG(active_class_entry)->num_interfaces++; } } /* }}} */ -void zend_compile_class_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_class_decl(zend_ast *ast) /* {{{ */ { zend_ast_decl *decl = (zend_ast_decl *) ast; zend_ast *extends_ast = decl->child[0]; @@ -4494,7 +4489,7 @@ void zend_compile_class_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ } if (CG(current_namespace)) { - name = zend_prefix_with_ns(name TSRMLS_CC); + name = zend_prefix_with_ns(name); zend_string_release(lcname); lcname = zend_string_alloc(name->len, 0); @@ -4508,15 +4503,15 @@ void zend_compile_class_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ "because the name is already in use", name->val); } - name = zend_new_interned_string(name TSRMLS_CC); - lcname = zend_new_interned_string(lcname TSRMLS_CC); + name = zend_new_interned_string(name); + lcname = zend_new_interned_string(lcname); ce->type = ZEND_USER_CLASS; ce->name = name; - zend_initialize_class_data(ce, 1 TSRMLS_CC); + zend_initialize_class_data(ce, 1); ce->ce_flags |= decl->flags; - ce->info.user.filename = zend_get_compiled_filename(TSRMLS_C); + ce->info.user.filename = zend_get_compiled_filename(); ce->info.user.line_start = decl->start_lineno; ce->info.user.line_end = decl->end_lineno; if (decl->doc_comment) { @@ -4536,11 +4531,11 @@ void zend_compile_class_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ "Cannot use '%s' as class name as it is reserved", extends_name->val); } - zend_compile_class_ref(&extends_node, extends_ast TSRMLS_CC); + zend_compile_class_ref(&extends_node, extends_ast); } - opline = get_next_op(CG(active_op_array) TSRMLS_CC); - zend_make_var_result(&declare_node, opline TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); + zend_make_var_result(&declare_node, opline); // TODO.AST drop this GET_NODE(&CG(implementing_class), opline->result); @@ -4556,7 +4551,7 @@ void zend_compile_class_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ } { - zend_string *key = zend_build_runtime_definition_key(lcname, decl->lex_pos TSRMLS_CC); + zend_string *key = zend_build_runtime_definition_key(lcname, decl->lex_pos); opline->op1_type = IS_CONST; LITERAL_STR(opline->op1, key); @@ -4567,10 +4562,10 @@ void zend_compile_class_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ CG(active_class_entry) = ce; if (implements_ast) { - zend_compile_implements(&declare_node, implements_ast TSRMLS_CC); + zend_compile_implements(&declare_node, implements_ast); } - zend_compile_stmt(stmt_ast TSRMLS_CC); + zend_compile_stmt(stmt_ast); if (ce->constructor) { ce->constructor->common.fn_flags |= ZEND_ACC_CTOR; @@ -4602,15 +4597,15 @@ void zend_compile_class_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ ce->num_traits = 0; ce->ce_flags |= ZEND_ACC_IMPLEMENT_TRAITS; - zend_emit_op(NULL, ZEND_BIND_TRAITS, &declare_node, NULL TSRMLS_CC); + zend_emit_op(NULL, ZEND_BIND_TRAITS, &declare_node, NULL); } if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) && (extends_ast || ce->num_interfaces > 0) ) { - zend_verify_abstract_class(ce TSRMLS_CC); + zend_verify_abstract_class(ce); if (ce->num_interfaces && !(ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS)) { - zend_emit_op(NULL, ZEND_VERIFY_ABSTRACT_CLASS, &declare_node, NULL TSRMLS_CC); + zend_emit_op(NULL, ZEND_VERIFY_ABSTRACT_CLASS, &declare_node, NULL); } } @@ -4628,7 +4623,7 @@ void zend_compile_class_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -static HashTable *zend_get_import_ht(uint32_t type TSRMLS_DC) /* {{{ */ +static HashTable *zend_get_import_ht(uint32_t type) /* {{{ */ { switch (type) { case T_CLASS: @@ -4683,13 +4678,13 @@ static void zend_check_already_in_use(uint32_t type, zend_string *old_name, zend } /* }}} */ -void zend_compile_use(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_use(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; zend_string *current_ns = CG(current_namespace); uint32_t type = ast->attr; - HashTable *current_import = zend_get_import_ht(type TSRMLS_CC); + HashTable *current_import = zend_get_import_ht(type); zend_bool case_sensitive = type == T_CONST; for (i = 0; i < list->children; ++i) { @@ -4793,7 +4788,7 @@ void zend_compile_use(zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_const_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_const_decl(zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -4808,14 +4803,14 @@ void zend_compile_const_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ zval *value_zv = &value_node.u.constant; value_node.op_type = IS_CONST; - zend_const_expr_to_zval(value_zv, value_ast TSRMLS_CC); + zend_const_expr_to_zval(value_zv, value_ast); - if (zend_lookup_reserved_const(name->val, name->len TSRMLS_CC)) { + if (zend_lookup_reserved_const(name->val, name->len)) { zend_error_noreturn(E_COMPILE_ERROR, "Cannot redeclare constant '%s'", name->val); } - name = zend_prefix_with_ns(name TSRMLS_CC); - name = zend_new_interned_string(name TSRMLS_CC); + name = zend_prefix_with_ns(name); + name = zend_new_interned_string(name); if (CG(current_import_const) && (import_name = zend_hash_find_ptr(CG(current_import_const), name)) @@ -4829,14 +4824,14 @@ void zend_compile_const_decl(zend_ast *ast TSRMLS_DC) /* {{{ */ name_node.op_type = IS_CONST; ZVAL_STR(&name_node.u.constant, name); - zend_emit_op(NULL, ZEND_DECLARE_CONST, &name_node, &value_node TSRMLS_CC); + zend_emit_op(NULL, ZEND_DECLARE_CONST, &name_node, &value_node); zend_hash_add_ptr(&CG(const_filenames), name, CG(compiled_filename)); } } /* }}}*/ -void zend_compile_namespace(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_namespace(zend_ast *ast) /* {{{ */ { zend_ast *name_ast = ast->child[0]; zend_ast *stmt_ast = ast->child[1]; @@ -4894,7 +4889,7 @@ void zend_compile_namespace(zend_ast *ast TSRMLS_DC) /* {{{ */ CG(current_namespace) = NULL; } - zend_reset_import_tables(TSRMLS_C); + zend_reset_import_tables(); CG(in_namespace) = 1; if (with_bracket) { @@ -4902,13 +4897,13 @@ void zend_compile_namespace(zend_ast *ast TSRMLS_DC) /* {{{ */ } if (stmt_ast) { - zend_compile_top_stmt(stmt_ast TSRMLS_CC); - zend_end_namespace(TSRMLS_C); + zend_compile_top_stmt(stmt_ast); + zend_end_namespace(); } } /* }}} */ -void zend_compile_halt_compiler(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_halt_compiler(zend_ast *ast) /* {{{ */ { zend_ast *offset_ast = ast->child[0]; zend_long offset = Z_LVAL_P(zend_ast_get_zval(offset_ast)); @@ -4921,16 +4916,16 @@ void zend_compile_halt_compiler(zend_ast *ast TSRMLS_DC) /* {{{ */ "__HALT_COMPILER() can only be used from the outermost scope"); } - filename = zend_get_compiled_filename(TSRMLS_C); + filename = zend_get_compiled_filename(); name = zend_mangle_property_name(const_name, sizeof(const_name) - 1, filename->val, filename->len, 0); - zend_register_long_constant(name->val, name->len, offset, CONST_CS, 0 TSRMLS_CC); + zend_register_long_constant(name->val, name->len, offset, CONST_CS, 0); zend_string_release(name); } /* }}} */ -static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast TSRMLS_DC) /* {{{ */ +static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */ { zend_op_array *op_array = CG(active_op_array); zend_class_entry *ce = CG(active_class_entry); @@ -5014,33 +5009,33 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast TSRMLS_DC) } /* }}} */ -static inline void zend_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ +static inline void zend_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *op2) /* {{{ */ { binary_op_type fn = get_binary_op(opcode); - fn(result, op1, op2 TSRMLS_CC); + fn(result, op1, op2); } /* }}} */ -static inline void zend_ct_eval_unary_pm(zval *result, zend_ast_kind kind, zval *op TSRMLS_DC) /* {{{ */ +static inline void zend_ct_eval_unary_pm(zval *result, zend_ast_kind kind, zval *op) /* {{{ */ { binary_op_type fn = kind == ZEND_AST_UNARY_PLUS ? add_function : sub_function; zval left; ZVAL_LONG(&left, 0); - fn(result, &left, op TSRMLS_CC); + fn(result, &left, op); } /* }}} */ -static inline void zend_ct_eval_greater(zval *result, zend_ast_kind kind, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ +static inline void zend_ct_eval_greater(zval *result, zend_ast_kind kind, zval *op1, zval *op2) /* {{{ */ { binary_op_type fn = kind == ZEND_AST_GREATER ? is_smaller_function : is_smaller_or_equal_function; - fn(result, op2, op1 TSRMLS_CC); + fn(result, op2, op1); } /* }}} */ -static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -5049,8 +5044,8 @@ static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast TSRMLS_DC) / for (i = 0; i < list->children; ++i) { zend_ast *elem_ast = list->child[i]; zend_bool by_ref = elem_ast->attr; - zend_eval_const_expr(&elem_ast->child[0] TSRMLS_CC); - zend_eval_const_expr(&elem_ast->child[1] TSRMLS_CC); + zend_eval_const_expr(&elem_ast->child[0]); + zend_eval_const_expr(&elem_ast->child[1]); if (by_ref || elem_ast->child[0]->kind != ZEND_AST_ZVAL || (elem_ast->child[1] && elem_ast->child[1]->kind != ZEND_AST_ZVAL) @@ -5103,32 +5098,32 @@ static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast TSRMLS_DC) / } /* }}} */ -void zend_compile_binary_op(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_binary_op(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *left_ast = ast->child[0]; zend_ast *right_ast = ast->child[1]; uint32_t opcode = ast->attr; znode left_node, right_node; - zend_compile_expr(&left_node, left_ast TSRMLS_CC); - zend_compile_expr(&right_node, right_ast TSRMLS_CC); + zend_compile_expr(&left_node, left_ast); + zend_compile_expr(&right_node, right_ast); if (left_node.op_type == IS_CONST && right_node.op_type == IS_CONST) { result->op_type = IS_CONST; zend_ct_eval_binary_op(&result->u.constant, opcode, - &left_node.u.constant, &right_node.u.constant TSRMLS_CC); + &left_node.u.constant, &right_node.u.constant); zval_ptr_dtor(&left_node.u.constant); zval_ptr_dtor(&right_node.u.constant); return; } - zend_emit_op_tmp(result, opcode, &left_node, &right_node TSRMLS_CC); + zend_emit_op_tmp(result, opcode, &left_node, &right_node); } /* }}} */ /* We do not use zend_compile_binary_op for this because we want to retain the left-to-right * evaluation order. */ -void zend_compile_greater(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_greater(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *left_ast = ast->child[0]; zend_ast *right_ast = ast->child[1]; @@ -5136,13 +5131,13 @@ void zend_compile_greater(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ ZEND_ASSERT(ast->kind == ZEND_AST_GREATER || ast->kind == ZEND_AST_GREATER_EQUAL); - zend_compile_expr(&left_node, left_ast TSRMLS_CC); - zend_compile_expr(&right_node, right_ast TSRMLS_CC); + zend_compile_expr(&left_node, left_ast); + zend_compile_expr(&right_node, right_ast); if (left_node.op_type == IS_CONST && right_node.op_type == IS_CONST) { result->op_type = IS_CONST; zend_ct_eval_greater(&result->u.constant, ast->kind, - &left_node.u.constant, &right_node.u.constant TSRMLS_CC); + &left_node.u.constant, &right_node.u.constant); zval_ptr_dtor(&left_node.u.constant); zval_ptr_dtor(&right_node.u.constant); return; @@ -5150,34 +5145,34 @@ void zend_compile_greater(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ zend_emit_op_tmp(result, ast->kind == ZEND_AST_GREATER ? ZEND_IS_SMALLER : ZEND_IS_SMALLER_OR_EQUAL, - &right_node, &left_node TSRMLS_CC); + &right_node, &left_node); } /* }}} */ -void zend_compile_unary_op(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_unary_op(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; uint32_t opcode = ast->attr; znode expr_node; - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); - zend_emit_op_tmp(result, opcode, &expr_node, NULL TSRMLS_CC); + zend_emit_op_tmp(result, opcode, &expr_node, NULL); } /* }}} */ -void zend_compile_unary_pm(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_unary_pm(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; znode zero_node, expr_node; ZEND_ASSERT(ast->kind == ZEND_AST_UNARY_PLUS || ast->kind == ZEND_AST_UNARY_MINUS); - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); if (expr_node.op_type == IS_CONST) { result->op_type = IS_CONST; - zend_ct_eval_unary_pm(&result->u.constant, ast->kind, &expr_node.u.constant TSRMLS_CC); + zend_ct_eval_unary_pm(&result->u.constant, ast->kind, &expr_node.u.constant); zval_ptr_dtor(&expr_node.u.constant); return; } @@ -5186,11 +5181,11 @@ void zend_compile_unary_pm(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ ZVAL_LONG(&zero_node.u.constant, 0); zend_emit_op_tmp(result, ast->kind == ZEND_AST_UNARY_PLUS ? ZEND_ADD : ZEND_SUB, - &zero_node, &expr_node TSRMLS_CC); + &zero_node, &expr_node); } /* }}} */ -void zend_compile_short_circuiting(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_short_circuiting(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *left_ast = ast->child[0]; zend_ast *right_ast = ast->child[1]; @@ -5201,11 +5196,11 @@ void zend_compile_short_circuiting(znode *result, zend_ast *ast TSRMLS_DC) /* {{ ZEND_ASSERT(ast->kind == ZEND_AST_AND || ast->kind == ZEND_AST_OR); - zend_compile_expr(&left_node, left_ast TSRMLS_CC); + zend_compile_expr(&left_node, left_ast); opnum_jmpz = get_next_op_number(CG(active_op_array)); opline_jmpz = zend_emit_op(NULL, ast->kind == ZEND_AST_AND ? ZEND_JMPZ_EX : ZEND_JMPNZ_EX, - &left_node, NULL TSRMLS_CC); + &left_node, NULL); if (left_node.op_type == IS_TMP_VAR) { SET_NODE(opline_jmpz->result, &left_node); @@ -5215,64 +5210,64 @@ void zend_compile_short_circuiting(znode *result, zend_ast *ast TSRMLS_DC) /* {{ } GET_NODE(result, opline_jmpz->result); - zend_compile_expr(&right_node, right_ast TSRMLS_CC); + zend_compile_expr(&right_node, right_ast); - opline_bool = zend_emit_op(NULL, ZEND_BOOL, &right_node, NULL TSRMLS_CC); + opline_bool = zend_emit_op(NULL, ZEND_BOOL, &right_node, NULL); SET_NODE(opline_bool->result, result); - zend_update_jump_target_to_next(opnum_jmpz TSRMLS_CC); + zend_update_jump_target_to_next(opnum_jmpz); } /* }}} */ -void zend_compile_post_incdec(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_post_incdec(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; ZEND_ASSERT(ast->kind == ZEND_AST_POST_INC || ast->kind == ZEND_AST_POST_DEC); if (var_ast->kind == ZEND_AST_PROP) { - zend_op *opline = zend_compile_prop_common(NULL, var_ast, BP_VAR_RW TSRMLS_CC); + zend_op *opline = zend_compile_prop_common(NULL, var_ast, BP_VAR_RW); opline->opcode = ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC_OBJ : ZEND_POST_DEC_OBJ; - zend_make_tmp_result(result, opline TSRMLS_CC); + zend_make_tmp_result(result, opline); } else { znode var_node; - zend_compile_var(&var_node, var_ast, BP_VAR_RW TSRMLS_CC); + zend_compile_var(&var_node, var_ast, BP_VAR_RW); zend_emit_op_tmp(result, ast->kind == ZEND_AST_POST_INC ? ZEND_POST_INC : ZEND_POST_DEC, - &var_node, NULL TSRMLS_CC); + &var_node, NULL); } } /* }}} */ -void zend_compile_pre_incdec(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_pre_incdec(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; ZEND_ASSERT(ast->kind == ZEND_AST_PRE_INC || ast->kind == ZEND_AST_PRE_DEC); if (var_ast->kind == ZEND_AST_PROP) { - zend_op *opline = zend_compile_prop_common(result, var_ast, BP_VAR_RW TSRMLS_CC); + zend_op *opline = zend_compile_prop_common(result, var_ast, BP_VAR_RW); opline->opcode = ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC_OBJ : ZEND_PRE_DEC_OBJ; } else { znode var_node; - zend_compile_var(&var_node, var_ast, BP_VAR_RW TSRMLS_CC); + zend_compile_var(&var_node, var_ast, BP_VAR_RW); zend_emit_op(result, ast->kind == ZEND_AST_PRE_INC ? ZEND_PRE_INC : ZEND_PRE_DEC, - &var_node, NULL TSRMLS_CC); + &var_node, NULL); } } /* }}} */ -void zend_compile_cast(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_cast(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; znode expr_node; zend_op *opline; - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); - opline = zend_emit_op_tmp(result, ZEND_CAST, &expr_node, NULL TSRMLS_CC); + opline = zend_emit_op_tmp(result, ZEND_CAST, &expr_node, NULL); opline->extended_value = ast->attr; } /* }}} */ -static void zend_compile_shorthand_conditional(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +static void zend_compile_shorthand_conditional(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *cond_ast = ast->child[0]; zend_ast *false_ast = ast->child[2]; @@ -5283,21 +5278,21 @@ static void zend_compile_shorthand_conditional(znode *result, zend_ast *ast TSRM ZEND_ASSERT(ast->child[1] == NULL); - zend_compile_expr(&cond_node, cond_ast TSRMLS_CC); + zend_compile_expr(&cond_node, cond_ast); opnum_jmp_set = get_next_op_number(CG(active_op_array)); - zend_emit_op_tmp(result, ZEND_JMP_SET, &cond_node, NULL TSRMLS_CC); + zend_emit_op_tmp(result, ZEND_JMP_SET, &cond_node, NULL); - zend_compile_expr(&false_node, false_ast TSRMLS_CC); + zend_compile_expr(&false_node, false_ast); opline_jmp_set = &CG(active_op_array)->opcodes[opnum_jmp_set]; opline_jmp_set->op2.opline_num = get_next_op_number(CG(active_op_array)) + 1; - opline_qm_assign = zend_emit_op_tmp(NULL, ZEND_QM_ASSIGN, &false_node, NULL TSRMLS_CC); + opline_qm_assign = zend_emit_op_tmp(NULL, ZEND_QM_ASSIGN, &false_node, NULL); SET_NODE(opline_qm_assign->result, result); } /* }}} */ -void zend_compile_conditional(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_conditional(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *cond_ast = ast->child[0]; zend_ast *true_ast = ast->child[1]; @@ -5308,34 +5303,34 @@ void zend_compile_conditional(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ uint32_t opnum_jmpz, opnum_jmp, opnum_qm_assign1; if (!true_ast) { - zend_compile_shorthand_conditional(result, ast TSRMLS_CC); + zend_compile_shorthand_conditional(result, ast); return; } - zend_compile_expr(&cond_node, cond_ast TSRMLS_CC); + zend_compile_expr(&cond_node, cond_ast); - opnum_jmpz = zend_emit_cond_jump(ZEND_JMPZ, &cond_node, 0 TSRMLS_CC); + opnum_jmpz = zend_emit_cond_jump(ZEND_JMPZ, &cond_node, 0); - zend_compile_expr(&true_node, true_ast TSRMLS_CC); + zend_compile_expr(&true_node, true_ast); opnum_qm_assign1 = get_next_op_number(CG(active_op_array)); - zend_emit_op_tmp(result, ZEND_QM_ASSIGN, &true_node, NULL TSRMLS_CC); + zend_emit_op_tmp(result, ZEND_QM_ASSIGN, &true_node, NULL); - opnum_jmp = zend_emit_jump(0 TSRMLS_CC); + opnum_jmp = zend_emit_jump(0); - zend_update_jump_target_to_next(opnum_jmpz TSRMLS_CC); + zend_update_jump_target_to_next(opnum_jmpz); - zend_compile_expr(&false_node, false_ast TSRMLS_CC); + zend_compile_expr(&false_node, false_ast); opline_qm_assign1 = &CG(active_op_array)->opcodes[opnum_qm_assign1]; - opline_qm_assign2 = zend_emit_op(NULL, opline_qm_assign1->opcode, &false_node, NULL TSRMLS_CC); + opline_qm_assign2 = zend_emit_op(NULL, opline_qm_assign1->opcode, &false_node, NULL); SET_NODE(opline_qm_assign2->result, result); - zend_update_jump_target_to_next(opnum_jmp TSRMLS_CC); + zend_update_jump_target_to_next(opnum_jmp); } /* }}} */ -void zend_compile_coalesce(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_coalesce(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; zend_ast *default_ast = ast->child[1]; @@ -5344,14 +5339,14 @@ void zend_compile_coalesce(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ zend_op *opline; uint32_t opnum; - zend_compile_var(&expr_node, expr_ast, BP_VAR_IS TSRMLS_CC); + zend_compile_var(&expr_node, expr_ast, BP_VAR_IS); opnum = get_next_op_number(CG(active_op_array)); - zend_emit_op_tmp(result, ZEND_COALESCE, &expr_node, NULL TSRMLS_CC); + zend_emit_op_tmp(result, ZEND_COALESCE, &expr_node, NULL); - zend_compile_expr(&default_node, default_ast TSRMLS_CC); + zend_compile_expr(&default_node, default_ast); - opline = zend_emit_op_tmp(NULL, ZEND_QM_ASSIGN, &default_node, NULL TSRMLS_CC); + opline = zend_emit_op_tmp(NULL, ZEND_QM_ASSIGN, &default_node, NULL); SET_NODE(opline->result, result); opline = &CG(active_op_array)->opcodes[opnum]; @@ -5359,27 +5354,27 @@ void zend_compile_coalesce(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_print(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_print(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; znode expr_node; - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); - zend_emit_op_tmp(result, ZEND_PRINT, &expr_node, NULL TSRMLS_CC); + zend_emit_op_tmp(result, ZEND_PRINT, &expr_node, NULL); } /* }}} */ -void zend_compile_exit(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_exit(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; if (expr_ast) { znode expr_node; - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); - zend_emit_op(NULL, ZEND_EXIT, &expr_node, NULL TSRMLS_CC); + zend_compile_expr(&expr_node, expr_ast); + zend_emit_op(NULL, ZEND_EXIT, &expr_node, NULL); } else { - zend_emit_op(NULL, ZEND_EXIT, NULL, NULL TSRMLS_CC); + zend_emit_op(NULL, ZEND_EXIT, NULL, NULL); } result->op_type = IS_CONST; @@ -5387,7 +5382,7 @@ void zend_compile_exit(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_yield(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_yield(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *value_ast = ast->child[0]; zend_ast *key_ast = ast->child[1]; @@ -5405,20 +5400,20 @@ void zend_compile_yield(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ CG(active_op_array)->fn_flags |= ZEND_ACC_GENERATOR; if (key_ast) { - zend_compile_expr(&key_node, key_ast TSRMLS_CC); + zend_compile_expr(&key_node, key_ast); key_node_ptr = &key_node; } if (value_ast) { if (returns_by_ref && zend_is_variable(value_ast) && !zend_is_call(value_ast)) { - zend_compile_var(&value_node, value_ast, BP_VAR_REF TSRMLS_CC); + zend_compile_var(&value_node, value_ast, BP_VAR_REF); } else { - zend_compile_expr(&value_node, value_ast TSRMLS_CC); + zend_compile_expr(&value_node, value_ast); } value_node_ptr = &value_node; } - opline = zend_emit_op(result, ZEND_YIELD, value_node_ptr, key_node_ptr TSRMLS_CC); + opline = zend_emit_op(result, ZEND_YIELD, value_node_ptr, key_node_ptr); if (value_ast && returns_by_ref && zend_is_call(value_ast)) { opline->extended_value = ZEND_RETURNS_FUNCTION; @@ -5426,7 +5421,7 @@ void zend_compile_yield(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_instanceof(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_instanceof(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *obj_ast = ast->child[0]; zend_ast *class_ast = ast->child[1]; @@ -5434,7 +5429,7 @@ void zend_compile_instanceof(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ znode obj_node, class_node; zend_op *opline; - zend_compile_expr(&obj_node, obj_ast TSRMLS_CC); + zend_compile_expr(&obj_node, obj_ast); if (obj_node.op_type == IS_CONST) { zend_error_noreturn(E_COMPILE_ERROR, "instanceof expects an object instance, constant given"); @@ -5442,41 +5437,41 @@ void zend_compile_instanceof(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ if (zend_is_const_default_class_ref(class_ast)) { class_node.op_type = IS_CONST; - ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast TSRMLS_CC)); + ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast)); } else { - opline = zend_compile_class_ref(&class_node, class_ast TSRMLS_CC); + opline = zend_compile_class_ref(&class_node, class_ast); opline->extended_value |= ZEND_FETCH_CLASS_NO_AUTOLOAD; } - opline = zend_emit_op_tmp(result, ZEND_INSTANCEOF, &obj_node, NULL TSRMLS_CC); + opline = zend_emit_op_tmp(result, ZEND_INSTANCEOF, &obj_node, NULL); if (class_node.op_type == IS_CONST) { opline->op2_type = IS_CONST; opline->op2.constant = zend_add_class_name_literal( - CG(active_op_array), Z_STR(class_node.u.constant) TSRMLS_CC); + CG(active_op_array), Z_STR(class_node.u.constant)); } else { SET_NODE(opline->op2, &class_node); } } /* }}} */ -void zend_compile_include_or_eval(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_include_or_eval(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; znode expr_node; zend_op *opline; - zend_do_extended_fcall_begin(TSRMLS_C); - zend_compile_expr(&expr_node, expr_ast TSRMLS_CC); + zend_do_extended_fcall_begin(); + zend_compile_expr(&expr_node, expr_ast); - opline = zend_emit_op(result, ZEND_INCLUDE_OR_EVAL, &expr_node, NULL TSRMLS_CC); + opline = zend_emit_op(result, ZEND_INCLUDE_OR_EVAL, &expr_node, NULL); opline->extended_value = ast->attr; - zend_do_extended_fcall_end(TSRMLS_C); + zend_do_extended_fcall_end(); } /* }}} */ -void zend_compile_isset_or_empty(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_isset_or_empty(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *var_ast = ast->child[0]; @@ -5489,7 +5484,7 @@ void zend_compile_isset_or_empty(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ if (ast->kind == ZEND_AST_EMPTY) { /* empty(expr) can be transformed to !expr */ zend_ast *not_ast = zend_ast_create_ex(ZEND_AST_UNARY_OP, ZEND_BOOL_NOT, var_ast); - zend_compile_expr(result, not_ast TSRMLS_CC); + zend_compile_expr(result, not_ast); return; } else { zend_error_noreturn(E_COMPILE_ERROR, @@ -5500,24 +5495,24 @@ void zend_compile_isset_or_empty(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ switch (var_ast->kind) { case ZEND_AST_VAR: - if (zend_try_compile_cv(&var_node, var_ast TSRMLS_CC) == SUCCESS) { - opline = zend_emit_op(result, ZEND_ISSET_ISEMPTY_VAR, &var_node, NULL TSRMLS_CC); + if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) { + opline = zend_emit_op(result, ZEND_ISSET_ISEMPTY_VAR, &var_node, NULL); opline->extended_value = ZEND_FETCH_LOCAL | ZEND_QUICK_SET; } else { - opline = zend_compile_simple_var_no_cv(result, var_ast, BP_VAR_IS TSRMLS_CC); + opline = zend_compile_simple_var_no_cv(result, var_ast, BP_VAR_IS); opline->opcode = ZEND_ISSET_ISEMPTY_VAR; } break; case ZEND_AST_DIM: - opline = zend_compile_dim_common(result, var_ast, BP_VAR_IS TSRMLS_CC); + opline = zend_compile_dim_common(result, var_ast, BP_VAR_IS); opline->opcode = ZEND_ISSET_ISEMPTY_DIM_OBJ; break; case ZEND_AST_PROP: - opline = zend_compile_prop_common(result, var_ast, BP_VAR_IS TSRMLS_CC); + opline = zend_compile_prop_common(result, var_ast, BP_VAR_IS); opline->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ; break; case ZEND_AST_STATIC_PROP: - opline = zend_compile_static_prop_common(result, var_ast, BP_VAR_IS TSRMLS_CC); + opline = zend_compile_static_prop_common(result, var_ast, BP_VAR_IS); opline->opcode = ZEND_ISSET_ISEMPTY_VAR; break; EMPTY_SWITCH_DEFAULT_CASE() @@ -5528,7 +5523,7 @@ void zend_compile_isset_or_empty(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ } /* }}} */ -void zend_compile_silence(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_silence(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; znode silence_node; @@ -5536,18 +5531,18 @@ void zend_compile_silence(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ zend_brk_cont_element *brk_cont_element; begin_opline_num = get_next_op_number(CG(active_op_array)); - zend_emit_op_tmp(&silence_node, ZEND_BEGIN_SILENCE, NULL, NULL TSRMLS_CC); + zend_emit_op_tmp(&silence_node, ZEND_BEGIN_SILENCE, NULL, NULL); if (expr_ast->kind == ZEND_AST_VAR) { /* For @$var we need to force a FETCH instruction, otherwise the CV access will * happen outside the silenced section. */ - zend_compile_simple_var_no_cv(result, expr_ast, BP_VAR_R TSRMLS_CC); + zend_compile_simple_var_no_cv(result, expr_ast, BP_VAR_R); } else { - zend_compile_expr(result, expr_ast TSRMLS_CC); + zend_compile_expr(result, expr_ast); } end_opline_num = get_next_op_number(CG(active_op_array)); - zend_emit_op(NULL, ZEND_END_SILENCE, &silence_node, NULL TSRMLS_CC); + zend_emit_op(NULL, ZEND_END_SILENCE, &silence_node, NULL); /* Store BEGIN_SILENCE/END_SILENCE pair to restore previous * EG(error_reporting) value on exception */ @@ -5558,7 +5553,7 @@ void zend_compile_silence(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_shell_exec(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_shell_exec(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *expr_ast = ast->child[0]; @@ -5570,20 +5565,20 @@ void zend_compile_shell_exec(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ args_ast = zend_ast_create_list(1, ZEND_AST_ARG_LIST, expr_ast); call_ast = zend_ast_create(ZEND_AST_CALL, name_ast, args_ast); - zend_compile_expr(result, call_ast TSRMLS_CC); + zend_compile_expr(result, call_ast); zval_ptr_dtor(&fn_name); } /* }}} */ -void zend_compile_array(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_array(znode *result, zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); zend_op *opline; uint32_t i, opnum_init = -1; zend_bool packed = 1; - if (zend_try_ct_eval_array(&result->u.constant, ast TSRMLS_CC)) { + if (zend_try_ct_eval_array(&result->u.constant, ast)) { result->op_type = IS_CONST; return; } @@ -5597,25 +5592,25 @@ void zend_compile_array(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ znode value_node, key_node, *key_node_ptr = NULL; if (key_ast) { - zend_compile_expr(&key_node, key_ast TSRMLS_CC); - zend_handle_numeric_op(&key_node TSRMLS_CC); + zend_compile_expr(&key_node, key_ast); + zend_handle_numeric_op(&key_node); key_node_ptr = &key_node; } if (by_ref) { zend_ensure_writable_variable(value_ast); - zend_compile_var(&value_node, value_ast, BP_VAR_W TSRMLS_CC); + zend_compile_var(&value_node, value_ast, BP_VAR_W); } else { - zend_compile_expr(&value_node, value_ast TSRMLS_CC); + zend_compile_expr(&value_node, value_ast); } if (i == 0) { opnum_init = get_next_op_number(CG(active_op_array)); - opline = zend_emit_op_tmp(result, ZEND_INIT_ARRAY, &value_node, key_node_ptr TSRMLS_CC); + opline = zend_emit_op_tmp(result, ZEND_INIT_ARRAY, &value_node, key_node_ptr); opline->extended_value = list->children << ZEND_ARRAY_SIZE_SHIFT; } else { opline = zend_emit_op(NULL, ZEND_ADD_ARRAY_ELEMENT, - &value_node, key_node_ptr TSRMLS_CC); + &value_node, key_node_ptr); SET_NODE(opline->result, result); } opline->extended_value |= by_ref; @@ -5627,7 +5622,7 @@ void zend_compile_array(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ /* Handle empty array */ if (!list->children) { - zend_emit_op_tmp(result, ZEND_INIT_ARRAY, NULL, NULL TSRMLS_CC); + zend_emit_op_tmp(result, ZEND_INIT_ARRAY, NULL, NULL); } /* Add a flag to INIT_ARRAY if we know this array cannot be packed */ @@ -5639,7 +5634,7 @@ void zend_compile_array(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_const(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *name_ast = ast->child[0]; @@ -5648,36 +5643,36 @@ void zend_compile_const(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ zend_bool is_fully_qualified; zend_string *orig_name = zend_ast_get_str(name_ast); zend_string *resolved_name = zend_resolve_const_name( - orig_name, name_ast->attr, &is_fully_qualified TSRMLS_CC); + orig_name, name_ast->attr, &is_fully_qualified); - if (zend_try_ct_eval_const(&result->u.constant, resolved_name, is_fully_qualified TSRMLS_CC)) { + if (zend_try_ct_eval_const(&result->u.constant, resolved_name, is_fully_qualified)) { result->op_type = IS_CONST; zend_string_release(resolved_name); return; } - opline = zend_emit_op_tmp(result, ZEND_FETCH_CONSTANT, NULL, NULL TSRMLS_CC); + opline = zend_emit_op_tmp(result, ZEND_FETCH_CONSTANT, NULL, NULL); opline->op2_type = IS_CONST; if (is_fully_qualified) { opline->op2.constant = zend_add_const_name_literal( - CG(active_op_array), resolved_name, 0 TSRMLS_CC); + CG(active_op_array), resolved_name, 0); } else { opline->extended_value = IS_CONSTANT_UNQUALIFIED; if (CG(current_namespace)) { opline->extended_value |= IS_CONSTANT_IN_NAMESPACE; opline->op2.constant = zend_add_const_name_literal( - CG(active_op_array), resolved_name, 1 TSRMLS_CC); + CG(active_op_array), resolved_name, 1); } else { opline->op2.constant = zend_add_const_name_literal( - CG(active_op_array), resolved_name, 0 TSRMLS_CC); + CG(active_op_array), resolved_name, 0); } } - zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC); + zend_alloc_cache_slot(opline->op2.constant); } /* }}} */ -void zend_compile_class_const(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *class_ast = ast->child[0]; zend_ast *const_ast = ast->child[1]; @@ -5687,26 +5682,26 @@ void zend_compile_class_const(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ if (zend_is_const_default_class_ref(class_ast)) { class_node.op_type = IS_CONST; - ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast TSRMLS_CC)); + ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast)); } else { - zend_compile_class_ref(&class_node, class_ast TSRMLS_CC); + zend_compile_class_ref(&class_node, class_ast); } - zend_compile_expr(&const_node, const_ast TSRMLS_CC); + zend_compile_expr(&const_node, const_ast); - opline = zend_emit_op_tmp(result, ZEND_FETCH_CONSTANT, NULL, &const_node TSRMLS_CC); + opline = zend_emit_op_tmp(result, ZEND_FETCH_CONSTANT, NULL, &const_node); - zend_set_class_name_op1(opline, &class_node TSRMLS_CC); + zend_set_class_name_op1(opline, &class_node); if (opline->op1_type == IS_CONST) { - zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC); + zend_alloc_cache_slot(opline->op2.constant); } else { - zend_alloc_polymorphic_cache_slot(opline->op2.constant TSRMLS_CC); + zend_alloc_polymorphic_cache_slot(opline->op2.constant); } } /* }}} */ -void zend_compile_resolve_class_name(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_resolve_class_name(znode *result, zend_ast *ast) /* {{{ */ { zend_ast *name_ast = ast->child[0]; uint32_t fetch_type = zend_get_class_fetch_type(zend_ast_get_str(name_ast)); @@ -5725,7 +5720,7 @@ void zend_compile_resolve_class_name(znode *result, zend_ast *ast TSRMLS_DC) /* class_str_ast = zend_ast_create_zval(&class_str_zv); class_const_ast = zend_ast_create(ZEND_AST_CLASS_CONST, name_ast, class_str_ast); - zend_compile_expr(result, class_const_ast TSRMLS_CC); + zend_compile_expr(result, class_const_ast); zval_ptr_dtor(&class_str_zv); } else { @@ -5748,21 +5743,21 @@ void zend_compile_resolve_class_name(znode *result, zend_ast *ast TSRMLS_DC) /* class_const_ast = zend_ast_create( ZEND_AST_CLASS_CONST, name_ast, class_str_ast); - zend_compile_expr(result, class_const_ast TSRMLS_CC); + zend_compile_expr(result, class_const_ast); zval_ptr_dtor(&class_str_zv); } break; case ZEND_FETCH_CLASS_DEFAULT: result->op_type = IS_CONST; - ZVAL_STR(&result->u.constant, zend_resolve_class_name_ast(name_ast TSRMLS_CC)); + ZVAL_STR(&result->u.constant, zend_resolve_class_name_ast(name_ast)); break; EMPTY_SWITCH_DEFAULT_CASE() } } /* }}} */ -void zend_compile_encaps_list(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */ { zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; @@ -5777,21 +5772,21 @@ void zend_compile_encaps_list(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ znode elem_node; zend_op *opline; - zend_compile_expr(&elem_node, elem_ast TSRMLS_CC); + zend_compile_expr(&elem_node, elem_ast); if (elem_ast->kind == ZEND_AST_ZVAL) { zval *zv = &elem_node.u.constant; ZEND_ASSERT(Z_TYPE_P(zv) == IS_STRING); if (Z_STRLEN_P(zv) > 1) { - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_ADD_STRING; } else if (Z_STRLEN_P(zv) == 1) { char ch = *Z_STRVAL_P(zv); zend_string_release(Z_STR_P(zv)); ZVAL_LONG(zv, ch); - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_ADD_CHAR; } else { /* String can be empty after a variable at the end of a heredoc */ @@ -5799,7 +5794,7 @@ void zend_compile_encaps_list(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ continue; } } else { - opline = get_next_op(CG(active_op_array) TSRMLS_CC); + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_ADD_VAR; ZEND_ASSERT(elem_node.op_type != IS_CONST); } @@ -5815,9 +5810,9 @@ void zend_compile_encaps_list(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_magic_const(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_magic_const(znode *result, zend_ast *ast) /* {{{ */ { - if (zend_try_ct_eval_magic_const(&result->u.constant, ast TSRMLS_CC)) { + if (zend_try_ct_eval_magic_const(&result->u.constant, ast)) { result->op_type = IS_CONST; return; } @@ -5829,7 +5824,7 @@ void zend_compile_magic_const(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ { zend_ast *const_ast = zend_ast_create(ZEND_AST_CONST, zend_ast_create_zval_from_str(zend_string_init("__CLASS__", sizeof("__CLASS__") - 1, 0))); - zend_compile_const(result, const_ast TSRMLS_CC); + zend_compile_const(result, const_ast); zend_ast_destroy(const_ast); } } @@ -5849,7 +5844,7 @@ zend_bool zend_is_allowed_in_const_expr(zend_ast_kind kind) /* {{{ */ } /* }}} */ -void zend_compile_const_expr_class_const(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ +void zend_compile_const_expr_class_const(zend_ast **ast_ptr) /* {{{ */ { zend_ast *ast = *ast_ptr; zend_ast *class_ast = ast->child[0]; @@ -5873,7 +5868,7 @@ void zend_compile_const_expr_class_const(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ } if (ZEND_FETCH_CLASS_DEFAULT == fetch_type) { - class_name = zend_resolve_class_name_ast(class_ast TSRMLS_CC); + class_name = zend_resolve_class_name_ast(class_ast); } else { zend_string_addref(class_name); } @@ -5891,7 +5886,7 @@ void zend_compile_const_expr_class_const(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_const_expr_const(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ +void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */ { zend_ast *ast = *ast_ptr; zend_ast *name_ast = ast->child[0]; @@ -5900,9 +5895,9 @@ void zend_compile_const_expr_const(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ zval result, resolved_name; ZVAL_STR(&resolved_name, zend_resolve_const_name( - orig_name, name_ast->attr, &is_fully_qualified TSRMLS_CC)); + orig_name, name_ast->attr, &is_fully_qualified)); - if (zend_try_ct_eval_const(&result, Z_STR(resolved_name), is_fully_qualified TSRMLS_CC)) { + if (zend_try_ct_eval_const(&result, Z_STR(resolved_name), is_fully_qualified)) { zend_string_release(Z_STR(resolved_name)); zend_ast_destroy(ast); *ast_ptr = zend_ast_create_zval(&result); @@ -5919,7 +5914,7 @@ void zend_compile_const_expr_const(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_const_expr_resolve_class_name(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ +void zend_compile_const_expr_resolve_class_name(zend_ast **ast_ptr) /* {{{ */ { zend_ast *ast = *ast_ptr; zend_ast *name_ast = ast->child[0]; @@ -5942,7 +5937,7 @@ void zend_compile_const_expr_resolve_class_name(zend_ast **ast_ptr TSRMLS_DC) /* ); break; case ZEND_FETCH_CLASS_DEFAULT: - ZVAL_STR(&result, zend_resolve_class_name_ast(name_ast TSRMLS_CC)); + ZVAL_STR(&result, zend_resolve_class_name_ast(name_ast)); break; EMPTY_SWITCH_DEFAULT_CASE() } @@ -5952,7 +5947,7 @@ void zend_compile_const_expr_resolve_class_name(zend_ast **ast_ptr TSRMLS_DC) /* } /* }}} */ -void zend_compile_const_expr_magic_const(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ +void zend_compile_const_expr_magic_const(zend_ast **ast_ptr) /* {{{ */ { zend_ast *ast = *ast_ptr; @@ -5972,7 +5967,7 @@ void zend_compile_const_expr_magic_const(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_const_expr(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ +void zend_compile_const_expr(zend_ast **ast_ptr) /* {{{ */ { zend_ast *ast = *ast_ptr; if (ast == NULL || ast->kind == ZEND_AST_ZVAL) { @@ -5985,29 +5980,29 @@ void zend_compile_const_expr(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ switch (ast->kind) { case ZEND_AST_CLASS_CONST: - zend_compile_const_expr_class_const(ast_ptr TSRMLS_CC); + zend_compile_const_expr_class_const(ast_ptr); break; case ZEND_AST_CONST: - zend_compile_const_expr_const(ast_ptr TSRMLS_CC); + zend_compile_const_expr_const(ast_ptr); break; case ZEND_AST_RESOLVE_CLASS_NAME: - zend_compile_const_expr_resolve_class_name(ast_ptr TSRMLS_CC); + zend_compile_const_expr_resolve_class_name(ast_ptr); break; case ZEND_AST_MAGIC_CONST: - zend_compile_const_expr_magic_const(ast_ptr TSRMLS_CC); + zend_compile_const_expr_magic_const(ast_ptr); break; default: - zend_ast_apply(ast, zend_compile_const_expr TSRMLS_CC); + zend_ast_apply(ast, zend_compile_const_expr); break; } } /* }}} */ -void zend_const_expr_to_zval(zval *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_const_expr_to_zval(zval *result, zend_ast *ast) /* {{{ */ { zend_ast *orig_ast = ast; - zend_eval_const_expr(&ast TSRMLS_CC); - zend_compile_const_expr(&ast TSRMLS_CC); + zend_eval_const_expr(&ast); + zend_compile_const_expr(&ast); if (ast->kind == ZEND_AST_ZVAL) { ZVAL_COPY_VALUE(result, zend_ast_get_zval(ast)); @@ -6022,7 +6017,7 @@ void zend_const_expr_to_zval(zval *result, zend_ast *ast TSRMLS_DC) /* {{{ */ /* }}} */ /* Same as compile_stmt, but with early binding */ -void zend_compile_top_stmt(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_top_stmt(zend_ast *ast) /* {{{ */ { if (!ast) { return; @@ -6032,24 +6027,24 @@ void zend_compile_top_stmt(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_ast_list *list = zend_ast_get_list(ast); uint32_t i; for (i = 0; i < list->children; ++i) { - zend_compile_top_stmt(list->child[i] TSRMLS_CC); + zend_compile_top_stmt(list->child[i]); } return; } - zend_compile_stmt(ast TSRMLS_CC); + zend_compile_stmt(ast); if (ast->kind != ZEND_AST_NAMESPACE && ast->kind != ZEND_AST_HALT_COMPILER) { - zend_verify_namespace(TSRMLS_C); + zend_verify_namespace(); } if (ast->kind == ZEND_AST_FUNC_DECL || ast->kind == ZEND_AST_CLASS) { CG(zend_lineno) = ((zend_ast_decl *) ast)->end_lineno; - zend_do_early_binding(TSRMLS_C); + zend_do_early_binding(); } } /* }}} */ -void zend_compile_stmt(zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_stmt(zend_ast *ast) /* {{{ */ { if (!ast) { return; @@ -6059,103 +6054,103 @@ void zend_compile_stmt(zend_ast *ast TSRMLS_DC) /* {{{ */ switch (ast->kind) { case ZEND_AST_STMT_LIST: - zend_compile_stmt_list(ast TSRMLS_CC); + zend_compile_stmt_list(ast); break; case ZEND_AST_GLOBAL: - zend_compile_global_var(ast TSRMLS_CC); + zend_compile_global_var(ast); break; case ZEND_AST_STATIC: - zend_compile_static_var(ast TSRMLS_CC); + zend_compile_static_var(ast); break; case ZEND_AST_UNSET: - zend_compile_unset(ast TSRMLS_CC); + zend_compile_unset(ast); break; case ZEND_AST_RETURN: - zend_compile_return(ast TSRMLS_CC); + zend_compile_return(ast); break; case ZEND_AST_ECHO: - zend_compile_echo(ast TSRMLS_CC); + zend_compile_echo(ast); break; case ZEND_AST_THROW: - zend_compile_throw(ast TSRMLS_CC); + zend_compile_throw(ast); break; case ZEND_AST_BREAK: case ZEND_AST_CONTINUE: - zend_compile_break_continue(ast TSRMLS_CC); + zend_compile_break_continue(ast); break; case ZEND_AST_GOTO: - zend_compile_goto(ast TSRMLS_CC); + zend_compile_goto(ast); break; case ZEND_AST_LABEL: - zend_compile_label(ast TSRMLS_CC); + zend_compile_label(ast); break; case ZEND_AST_WHILE: - zend_compile_while(ast TSRMLS_CC); + zend_compile_while(ast); break; case ZEND_AST_DO_WHILE: - zend_compile_do_while(ast TSRMLS_CC); + zend_compile_do_while(ast); break; case ZEND_AST_FOR: - zend_compile_for(ast TSRMLS_CC); + zend_compile_for(ast); break; case ZEND_AST_FOREACH: - zend_compile_foreach(ast TSRMLS_CC); + zend_compile_foreach(ast); break; case ZEND_AST_IF: - zend_compile_if(ast TSRMLS_CC); + zend_compile_if(ast); break; case ZEND_AST_SWITCH: - zend_compile_switch(ast TSRMLS_CC); + zend_compile_switch(ast); break; case ZEND_AST_TRY: - zend_compile_try(ast TSRMLS_CC); + zend_compile_try(ast); break; case ZEND_AST_DECLARE: - zend_compile_declare(ast TSRMLS_CC); + zend_compile_declare(ast); break; case ZEND_AST_FUNC_DECL: case ZEND_AST_METHOD: - zend_compile_func_decl(NULL, ast TSRMLS_CC); + zend_compile_func_decl(NULL, ast); break; case ZEND_AST_PROP_DECL: - zend_compile_prop_decl(ast TSRMLS_CC); + zend_compile_prop_decl(ast); break; case ZEND_AST_CLASS_CONST_DECL: - zend_compile_class_const_decl(ast TSRMLS_CC); + zend_compile_class_const_decl(ast); break; case ZEND_AST_USE_TRAIT: - zend_compile_use_trait(ast TSRMLS_CC); + zend_compile_use_trait(ast); break; case ZEND_AST_CLASS: - zend_compile_class_decl(ast TSRMLS_CC); + zend_compile_class_decl(ast); break; case ZEND_AST_USE: - zend_compile_use(ast TSRMLS_CC); + zend_compile_use(ast); break; case ZEND_AST_CONST_DECL: - zend_compile_const_decl(ast TSRMLS_CC); + zend_compile_const_decl(ast); break; case ZEND_AST_NAMESPACE: - zend_compile_namespace(ast TSRMLS_CC); + zend_compile_namespace(ast); break; case ZEND_AST_HALT_COMPILER: - zend_compile_halt_compiler(ast TSRMLS_CC); + zend_compile_halt_compiler(ast); break; default: { znode result; - zend_compile_expr(&result, ast TSRMLS_CC); - zend_do_free(&result TSRMLS_CC); + zend_compile_expr(&result, ast); + zend_do_free(&result); } } if (Z_LVAL(CG(declarables).ticks) && !zend_is_unticked_stmt(ast)) { - zend_emit_tick(TSRMLS_C); + zend_emit_tick(); } } /* }}} */ -void zend_compile_expr(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ +void zend_compile_expr(znode *result, zend_ast *ast) /* {{{ */ { /* CG(zend_lineno) = ast->lineno; */ CG(zend_lineno) = zend_ast_get_lineno(ast); @@ -6175,103 +6170,103 @@ void zend_compile_expr(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ case ZEND_AST_CALL: case ZEND_AST_METHOD_CALL: case ZEND_AST_STATIC_CALL: - zend_compile_var(result, ast, BP_VAR_R TSRMLS_CC); + zend_compile_var(result, ast, BP_VAR_R); return; case ZEND_AST_ASSIGN: - zend_compile_assign(result, ast TSRMLS_CC); + zend_compile_assign(result, ast); return; case ZEND_AST_ASSIGN_REF: - zend_compile_assign_ref(result, ast TSRMLS_CC); + zend_compile_assign_ref(result, ast); return; case ZEND_AST_NEW: - zend_compile_new(result, ast TSRMLS_CC); + zend_compile_new(result, ast); return; case ZEND_AST_CLONE: - zend_compile_clone(result, ast TSRMLS_CC); + zend_compile_clone(result, ast); return; case ZEND_AST_ASSIGN_OP: - zend_compile_compound_assign(result, ast TSRMLS_CC); + zend_compile_compound_assign(result, ast); return; case ZEND_AST_BINARY_OP: - zend_compile_binary_op(result, ast TSRMLS_CC); + zend_compile_binary_op(result, ast); return; case ZEND_AST_GREATER: case ZEND_AST_GREATER_EQUAL: - zend_compile_greater(result, ast TSRMLS_CC); + zend_compile_greater(result, ast); return; case ZEND_AST_UNARY_OP: - zend_compile_unary_op(result, ast TSRMLS_CC); + zend_compile_unary_op(result, ast); return; case ZEND_AST_UNARY_PLUS: case ZEND_AST_UNARY_MINUS: - zend_compile_unary_pm(result, ast TSRMLS_CC); + zend_compile_unary_pm(result, ast); return; case ZEND_AST_AND: case ZEND_AST_OR: - zend_compile_short_circuiting(result, ast TSRMLS_CC); + zend_compile_short_circuiting(result, ast); return; case ZEND_AST_POST_INC: case ZEND_AST_POST_DEC: - zend_compile_post_incdec(result, ast TSRMLS_CC); + zend_compile_post_incdec(result, ast); return; case ZEND_AST_PRE_INC: case ZEND_AST_PRE_DEC: - zend_compile_pre_incdec(result, ast TSRMLS_CC); + zend_compile_pre_incdec(result, ast); return; case ZEND_AST_CAST: - zend_compile_cast(result, ast TSRMLS_CC); + zend_compile_cast(result, ast); return; case ZEND_AST_CONDITIONAL: - zend_compile_conditional(result, ast TSRMLS_CC); + zend_compile_conditional(result, ast); return; case ZEND_AST_COALESCE: - zend_compile_coalesce(result, ast TSRMLS_CC); + zend_compile_coalesce(result, ast); return; case ZEND_AST_PRINT: - zend_compile_print(result, ast TSRMLS_CC); + zend_compile_print(result, ast); return; case ZEND_AST_EXIT: - zend_compile_exit(result, ast TSRMLS_CC); + zend_compile_exit(result, ast); return; case ZEND_AST_YIELD: - zend_compile_yield(result, ast TSRMLS_CC); + zend_compile_yield(result, ast); return; case ZEND_AST_INSTANCEOF: - zend_compile_instanceof(result, ast TSRMLS_CC); + zend_compile_instanceof(result, ast); return; case ZEND_AST_INCLUDE_OR_EVAL: - zend_compile_include_or_eval(result, ast TSRMLS_CC); + zend_compile_include_or_eval(result, ast); return; case ZEND_AST_ISSET: case ZEND_AST_EMPTY: - zend_compile_isset_or_empty(result, ast TSRMLS_CC); + zend_compile_isset_or_empty(result, ast); return; case ZEND_AST_SILENCE: - zend_compile_silence(result, ast TSRMLS_CC); + zend_compile_silence(result, ast); return; case ZEND_AST_SHELL_EXEC: - zend_compile_shell_exec(result, ast TSRMLS_CC); + zend_compile_shell_exec(result, ast); return; case ZEND_AST_ARRAY: - zend_compile_array(result, ast TSRMLS_CC); + zend_compile_array(result, ast); return; case ZEND_AST_CONST: - zend_compile_const(result, ast TSRMLS_CC); + zend_compile_const(result, ast); return; case ZEND_AST_CLASS_CONST: - zend_compile_class_const(result, ast TSRMLS_CC); + zend_compile_class_const(result, ast); return; case ZEND_AST_RESOLVE_CLASS_NAME: - zend_compile_resolve_class_name(result, ast TSRMLS_CC); + zend_compile_resolve_class_name(result, ast); return; case ZEND_AST_ENCAPS_LIST: - zend_compile_encaps_list(result, ast TSRMLS_CC); + zend_compile_encaps_list(result, ast); return; case ZEND_AST_MAGIC_CONST: - zend_compile_magic_const(result, ast TSRMLS_CC); + zend_compile_magic_const(result, ast); return; case ZEND_AST_CLOSURE: - zend_compile_func_decl(result, ast TSRMLS_CC); + zend_compile_func_decl(result, ast); return; default: ZEND_ASSERT(0 /* not supported */); @@ -6279,29 +6274,29 @@ void zend_compile_expr(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ */ } /* }}} */ -void zend_compile_var(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +void zend_compile_var(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { switch (ast->kind) { case ZEND_AST_VAR: - zend_compile_simple_var(result, ast, type TSRMLS_CC); + zend_compile_simple_var(result, ast, type); return; case ZEND_AST_DIM: - zend_compile_dim(result, ast, type TSRMLS_CC); + zend_compile_dim(result, ast, type); return; case ZEND_AST_PROP: - zend_compile_prop(result, ast, type TSRMLS_CC); + zend_compile_prop(result, ast, type); return; case ZEND_AST_STATIC_PROP: - zend_compile_static_prop(result, ast, type TSRMLS_CC); + zend_compile_static_prop(result, ast, type); return; case ZEND_AST_CALL: - zend_compile_call(result, ast, type TSRMLS_CC); + zend_compile_call(result, ast, type); return; case ZEND_AST_METHOD_CALL: - zend_compile_method_call(result, ast, type TSRMLS_CC); + zend_compile_method_call(result, ast, type); return; case ZEND_AST_STATIC_CALL: - zend_compile_static_call(result, ast, type TSRMLS_CC); + zend_compile_static_call(result, ast, type); return; case ZEND_AST_ZNODE: *result = *zend_ast_get_znode(ast); @@ -6317,32 +6312,32 @@ void zend_compile_var(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* } } - zend_compile_expr(result, ast TSRMLS_CC); + zend_compile_expr(result, ast); return; } } /* }}} */ -void zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type TSRMLS_DC) /* {{{ */ +void zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type) /* {{{ */ { zend_op *opline; switch (ast->kind) { case ZEND_AST_DIM: - opline = zend_delayed_compile_dim(result, ast, type TSRMLS_CC); + opline = zend_delayed_compile_dim(result, ast, type); zend_adjust_for_fetch_type(opline, type); return; case ZEND_AST_PROP: - opline = zend_delayed_compile_prop(result, ast, type TSRMLS_CC); + opline = zend_delayed_compile_prop(result, ast, type); zend_adjust_for_fetch_type(opline, type); return; default: - zend_compile_var(result, ast, type TSRMLS_CC); + zend_compile_var(result, ast, type); return; } } /* }}} */ -void zend_eval_const_expr(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ +void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */ { zend_ast *ast = *ast_ptr; zval result; @@ -6353,43 +6348,43 @@ void zend_eval_const_expr(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ switch (ast->kind) { case ZEND_AST_BINARY_OP: - zend_eval_const_expr(&ast->child[0] TSRMLS_CC); - zend_eval_const_expr(&ast->child[1] TSRMLS_CC); + zend_eval_const_expr(&ast->child[0]); + zend_eval_const_expr(&ast->child[1]); if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { return; } zend_ct_eval_binary_op(&result, ast->attr, - zend_ast_get_zval(ast->child[0]), zend_ast_get_zval(ast->child[1]) TSRMLS_CC); + zend_ast_get_zval(ast->child[0]), zend_ast_get_zval(ast->child[1])); break; case ZEND_AST_GREATER: case ZEND_AST_GREATER_EQUAL: - zend_eval_const_expr(&ast->child[0] TSRMLS_CC); - zend_eval_const_expr(&ast->child[1] TSRMLS_CC); + zend_eval_const_expr(&ast->child[0]); + zend_eval_const_expr(&ast->child[1]); if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) { return; } zend_ct_eval_greater(&result, ast->kind, - zend_ast_get_zval(ast->child[0]), zend_ast_get_zval(ast->child[1]) TSRMLS_CC); + zend_ast_get_zval(ast->child[0]), zend_ast_get_zval(ast->child[1])); break; case ZEND_AST_UNARY_PLUS: case ZEND_AST_UNARY_MINUS: - zend_eval_const_expr(&ast->child[0] TSRMLS_CC); + zend_eval_const_expr(&ast->child[0]); if (ast->child[0]->kind != ZEND_AST_ZVAL) { return; } zend_ct_eval_unary_pm(&result, ast->kind, - zend_ast_get_zval(ast->child[0]) TSRMLS_CC); + zend_ast_get_zval(ast->child[0])); break; case ZEND_AST_ARRAY: - if (!zend_try_ct_eval_array(&result, ast TSRMLS_CC)) { + if (!zend_try_ct_eval_array(&result, ast)) { return; } break; case ZEND_AST_MAGIC_CONST: - if (!zend_try_ct_eval_magic_const(&result, ast TSRMLS_CC)) { + if (!zend_try_ct_eval_magic_const(&result, ast)) { return; } break; @@ -6398,9 +6393,9 @@ void zend_eval_const_expr(zend_ast **ast_ptr TSRMLS_DC) /* {{{ */ zend_ast *name_ast = ast->child[0]; zend_bool is_fully_qualified; zend_string *resolved_name = zend_resolve_const_name( - zend_ast_get_str(name_ast), name_ast->attr, &is_fully_qualified TSRMLS_CC); + zend_ast_get_str(name_ast), name_ast->attr, &is_fully_qualified); - if (!zend_try_ct_eval_const(&result, resolved_name, is_fully_qualified TSRMLS_CC)) { + if (!zend_try_ct_eval_const(&result, resolved_name, is_fully_qualified)) { zend_string_release(resolved_name); return; } |