Searched defs:op_array (Results 1 - 24 of 24) sorted by relevance

/PHP_TRUNK/ext/opcache/Optimizer/
H A Doptimize_func_calls.c34 Z_TYPE(op_array->literals[(opline)->op2.constant]) == IS_STRING)
41 void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx TSRMLS_DC) argument
43 zend_op *opline = op_array->opcodes;
44 zend_op *end = opline + op_array->last;
49 if (op_array->last < 2) {
54 call_stack = zend_arena_calloc(&ctx->arena, op_array->last / 2, sizeof(optimizer_call_info));
61 zval *function_name = &op_array->literals[opline->op2.constant + 1];
83 Z_CACHE_SLOT(op_array->literals[fcall->op2.constant + 1]) = Z_CACHE_SLOT(op_array->literals[fcall->op2.constant]);
88 Z_CACHE_SLOT(op_array
[all...]
H A Doptimize_temp_vars_5.c41 void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
43 int T = op_array->T;
44 int offset = op_array->last_var;
61 end = op_array->opcodes;
62 opline = &op_array->opcodes[op_array->last - 1];
85 end = op_array->opcodes;
86 opline = &op_array->opcodes[op_array->last - 1];
183 op_array
[all...]
H A Dcompact_literals.c87 zend_op_array *op_array)
93 if (Z_TYPE(op_array->literals[constant]) == IS_STRING &&
95 LITERAL_INFO_OBJ(constant, kind, 1, slots, related, op_array->this_var);
108 zend_op_array *op_array)
117 void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx *ctx TSRMLS_DC) argument
130 if (op_array->last_literal) {
131 info = (literal_info*)zend_arena_calloc(&ctx->arena, op_array->last_literal, sizeof(literal_info));
134 opline = op_array->opcodes;
135 end = opline + op_array->last;
157 op_array);
80 optimizer_literal_obj_info(literal_info *info, zend_uchar op_type, znode_op op, int constant, uint32_t kind, uint32_t slots, uint32_t related, zend_op_array *op_array) argument
101 optimizer_literal_class_info(literal_info *info, zend_uchar op_type, znode_op op, int constant, uint32_t kind, uint32_t slots, uint32_t related, zend_op_array *op_array) argument
[all...]
H A Dnop_removal.c34 void zend_optimizer_nop_removal(zend_op_array *op_array) argument
42 shiftlist = (uint32_t *)DO_ALLOCA(sizeof(uint32_t) * op_array->last);
44 end = op_array->opcodes + op_array->last;
45 for (opline = op_array->opcodes; opline < end; opline++) {
58 zend_op *target = op_array->opcodes + ZEND_OP1(opline).opline_num - 1;
74 op_array->opcodes[new_count] = *opline;
81 op_array->last = new_count;
82 end = op_array->opcodes + op_array
[all...]
H A Dpass1_5.c40 void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx TSRMLS_DC) argument
43 zend_op *opline = op_array->opcodes;
44 zend_op *end = opline + op_array->last;
45 zend_bool collect_constants = (op_array == &ctx->script->main_op_array);
94 zend_optimizer_replace_by_const(op_array, opline + 1, IS_TMP_VAR, tv, &result TSRMLS_CC);
130 zend_optimizer_replace_by_const(op_array, opline + 1, type, tv, &res TSRMLS_CC);
157 zend_optimizer_replace_by_const(op_array, opline + 1, IS_TMP_VAR, tv, &result TSRMLS_CC);
226 ZEND_OP1(opline + 1).opline_num = last_op - op_array->opcodes; /* that's OK even for ZE2, since opline_num's are resolved in pass 2 later */
244 fake_execute_data.func = (zend_function*)op_array;
251 zend_optimizer_replace_by_const(op_array, oplin
[all...]
H A Dzend_optimizer.c58 int zend_optimizer_lookup_cv(zend_op_array *op_array, zend_string* name) argument
63 while (i < op_array->last_var) {
64 if (op_array->vars[i] == name ||
65 (op_array->vars[i]->h == hash_value &&
66 op_array->vars[i]->len == name->len &&
67 memcmp(op_array->vars[i]->val, name->val, name->len) == 0)) {
72 i = op_array->last_var;
73 op_array->last_var++;
74 op_array->vars = erealloc(op_array
102 zend_optimizer_add_literal(zend_op_array *op_array, zval *zv TSRMLS_DC) argument
114 zend_optimizer_update_op1_const(zend_op_array *op_array, zend_op *opline, zval *val TSRMLS_DC) argument
147 zend_optimizer_update_op2_const(zend_op_array *op_array, zend_op *opline, zval *val TSRMLS_DC) argument
265 zend_optimizer_replace_by_const(zend_op_array *op_array, zend_op *opline, zend_uchar type, uint32_t var, zval *val TSRMLS_DC) argument
339 zend_optimize(zend_op_array *op_array, zend_optimizer_ctx *ctx TSRMLS_DC) argument
411 zend_accel_optimize(zend_op_array *op_array, zend_optimizer_ctx *ctx TSRMLS_DC) argument
496 zend_op_array *op_array; local
[all...]
H A Dblock_pass.c70 # define BLOCK_REF(b) b?op_array->opcodes-b->start_opline:-1
107 #define START_BLOCK_OP(opno) blocks[opno].start_opline = &op_array->opcodes[opno]; blocks[opno].start_opline_no = opno; blocks[opno].access = 1
109 /* find code blocks in op_array
112 static int find_code_blocks(zend_op_array *op_array, zend_cfg *cfg, zend_optimizer_ctx *ctx) argument
115 zend_op *end = op_array->opcodes + op_array->last;
120 blocks = cfg->blocks = zend_arena_calloc(&ctx->arena, op_array->last + 2, sizeof(zend_code_block));
121 opline = op_array->opcodes;
186 if (op_array->last_try_catch) {
188 cfg->try = zend_arena_calloc(&ctx->arena, op_array
484 zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int find_start, zend_optimizer_ctx *ctx) argument
586 zend_optimize_block(zend_code_block *block, zend_op_array *op_array, char *used_ext, zend_cfg *cfg, zend_optimizer_ctx *ctx TSRMLS_DC) argument
1134 assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array) argument
1252 zend_jmp_optimization(zend_code_block *block, zend_op_array *op_array, zend_code_block *blocks, zend_cfg *cfg, zend_optimizer_ctx *ctx TSRMLS_DC) argument
1760 zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *used_ext, zend_optimizer_ctx *ctx) argument
1909 optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx TSRMLS_DC) argument
[all...]
/PHP_TRUNK/ext/opcache/
H A Dzend_accelerator_module.c697 zend_op_array *op_array = NULL; local
717 op_array = persistent_compile_file(&handle, ZEND_INCLUDE TSRMLS_CC);
723 if(op_array != NULL) {
724 destroy_op_array(op_array TSRMLS_CC);
725 efree(op_array);
H A DZendAccelerator.c1289 zend_op_array *op_array; local
1369 /* Save the original values for the op_array, function table and class table */
1386 op_array = *op_array_p = accelerator_orig_compile_file(file_handle, type TSRMLS_CC);
1389 op_array = NULL;
1400 if (!op_array) {
1415 new_persistent_script->main_op_array = *op_array;
1417 efree(op_array); /* we have valid persistent_script, so it's safe to free op_array */
1590 zend_op_array *op_array; local
1605 persistent_script = compile_and_cache_file(file_handle, type, key, key_length, &op_array,
[all...]
H A Dzend_accelerator_util_funcs.c46 static int zend_prepare_function_for_execution(zend_op_array *op_array);
56 if (function->op_array.static_variables) {
58 FREE_HASHTABLE(function->op_array.static_variables);
59 function->op_array.static_variables = NULL;
477 /* we use refcount to show that op_array is referenced from several places */
573 static int zend_prepare_function_for_execution(zend_op_array *op_array) argument
575 HashTable *shared_statics = op_array->static_variables;
578 op_array->refcount = &zend_accel_refcount;
579 (*op_array->refcount) = ZEND_PROTECTED_REFCOUNT;
583 ALLOC_HASHTABLE(op_array
874 zend_op_array *op_array; local
[all...]
H A Dzend_persist.c286 static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_script* main_persistent_script TSRMLS_DC) argument
292 if (op_array->type != ZEND_USER_FUNCTION) {
296 if (--(*op_array->refcount) == 0) {
297 efree(op_array->refcount);
299 op_array->refcount = NULL;
307 fake_execute_data.func = (zend_function*)op_array;
315 if (op_array->static_variables) {
316 zend_hash_persist(op_array->static_variables, zend_persist_zval TSRMLS_CC);
317 zend_accel_store(op_array->static_variables, sizeof(HashTable));
320 if (zend_shared_alloc_get_xlat_entry(op_array
[all...]
/PHP_TRUNK/main/
H A Dmain.c2677 zend_op_array *op_array; local
2681 op_array = zend_compile_file(file, ZEND_INCLUDE TSRMLS_CC);
2684 if (op_array) {
2685 destroy_op_array(op_array TSRMLS_CC);
2686 efree(op_array);
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_info.c359 zend_op_array *op_array = &((*pzf)->op_array); local
363 op_array->function_name ? op_array->function_name : "{main}",
364 op_array->filename ? op_array->filename : "(no source code)",
365 op_array->line_start);
H A Dphpdbg_print.c57 zend_op_array* op_array = &(method->op_array); local
60 if (op_array) {
61 zend_op *opline = &(op_array->opcodes[0]);
63 end = op_array->last-1;
67 op_array->line_start, op_array->line_end,
70 op_array->filename ? op_array->filename : "unknown");
73 method->common.function_name ? op_array
[all...]
H A Dphpdbg_prompt.c1086 static inline zend_execute_data *phpdbg_create_execute_data(zend_op_array *op_array, zend_bool nested TSRMLS_DC) /* {{{ */ argument
1089 return zend_create_execute_data_from_op_array(op_array, nested TSRMLS_CC);
1105 ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)) +
1106 ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T TSRMLS_CC);
1109 memset(EX(CVs), 0, sizeof(zval**) * op_array->last_var);
1110 EX(Ts) = (temp_variable *)(((char*)EX(CVs)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)));
1115 EX(op_array) = op_array;
1121 if (!op_array->run_time_cache && op_array
[all...]
/PHP_TRUNK/Zend/
H A Dzend.c1275 zend_op_array *op_array; local
1284 op_array = zend_compile_file(file_handle, type TSRMLS_CC);
1289 if (op_array) {
1290 zend_execute(op_array, retval TSRMLS_CC);
1317 destroy_op_array(op_array TSRMLS_CC);
1318 efree_size(op_array, sizeof(zend_op_array));
H A Dzend_language_scanner.c559 zend_op_array *op_array = (zend_op_array *) emalloc(sizeof(zend_op_array)); local
579 init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);
581 CG(active_op_array) = op_array;
600 pass_two(op_array TSRMLS_CC);
603 efree_size(op_array, sizeof(zend_op_array));
604 op_array = NULL;
608 return op_array;
723 zend_op_array *op_array = NULL; local
744 op_array = emalloc(sizeof(zend_op_array));
745 init_op_array(op_array, ZEND_EVAL_COD
[all...]
H A Dzend_opcode.c32 static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
35 extension->op_array_ctor(op_array);
39 static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
42 extension->op_array_dtor(op_array);
46 static void op_array_alloc_ops(zend_op_array *op_array, uint32_t size) argument
48 op_array->opcodes = erealloc(op_array->opcodes, size * sizeof(zend_op));
51 void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC) argument
53 op_array->type = type;
55 op_array
132 zend_cleanup_op_array_data(zend_op_array *op_array) argument
406 get_next_op_number(zend_op_array *op_array) argument
411 get_next_brk_cont_element(zend_op_array *op_array) argument
448 zend_check_finally_breakout(zend_op_array *op_array, uint32_t op_num, uint32_t dst_num TSRMLS_DC) argument
473 zend_adjust_fast_call(zend_op_array *op_array, uint32_t fast_call, uint32_t start, uint32_t end TSRMLS_DC) argument
494 zend_resolve_fast_call(zend_op_array *op_array, uint32_t fast_call, uint32_t op_num TSRMLS_DC) argument
516 zend_resolve_finally_call(zend_op_array *op_array, uint32_t op_num, uint32_t dst_num TSRMLS_DC) argument
594 zend_resolve_finally_ret(zend_op_array *op_array, uint32_t op_num TSRMLS_DC) argument
[all...]
H A Dzend_execute.c62 static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
63 static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
64 static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
113 #define CV_DEF_OF(i) (EX(func)->op_array.vars[i])
534 zend_error(error_type, "Argument %d passed to %s%s%s() must %s%s, %s%s given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind, ptr->func->op_array.filename->val, ptr->opline->lineno);
642 zend_error(E_WARNING, "Missing argument %u for %s%s%s(), called in %s on line %d and defined", arg_num, class_name, space, func_name, ptr->func->op_array.filename->val, ptr->opline->lineno);
849 static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
852 extension->statement_handler(op_array);
857 static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
860 extension->fcall_begin_handler(op_array);
1309 zend_brk_cont(int nest_levels, int array_offset, const zend_op_array *op_array, const zend_execute_data *execute_data TSRMLS_DC) argument
1427 i_init_func_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC) argument
1497 i_init_code_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC) argument
1521 i_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC) argument
1600 zend_create_generator_execute_data(zend_execute_data *call, zend_op_array *op_array, zval *return_value TSRMLS_DC) argument
1649 zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, vm_frame_kind frame_kind TSRMLS_DC) argument
[all...]
H A Dzend_compile.c35 #define CONSTANT_EX(op_array, op) \
36 (op_array)->literals[op]
60 zend_op_array *op_array = CG(active_op_array); local
61 Z_CACHE_SLOT(op_array->literals[literal]) = op_array->last_cache_slot++;
67 zend_op_array *op_array = CG(active_op_array); local
68 Z_CACHE_SLOT(op_array->literals[literal]) = op_array->last_cache_slot;
69 op_array->last_cache_slot += POLYMORPHIC_CACHE_SLOT_SIZE;
259 static uint32_t get_temporary_variable(zend_op_array *op_array) /* {{{ */ argument
265 lookup_cv(zend_op_array *op_array, zend_string* name TSRMLS_DC) argument
291 zend_del_literal(zend_op_array *op_array, int n) argument
303 zend_insert_literal(zend_op_array *op_array, zval *zv, int literal_position TSRMLS_DC) argument
320 zend_add_literal(zend_op_array *op_array, zval *zv TSRMLS_DC) argument
335 zend_add_literal_string(zend_op_array *op_array, zend_string **str TSRMLS_DC) argument
345 zend_add_func_name_literal(zend_op_array *op_array, zend_string *name TSRMLS_DC) argument
359 zend_add_ns_func_name_literal(zend_op_array *op_array, zend_string *name TSRMLS_DC) argument
383 zend_add_class_name_literal(zend_op_array *op_array, zend_string *name TSRMLS_DC) argument
399 zend_add_const_name_literal(zend_op_array *op_array, zend_string *name, zend_bool unqualified TSRMLS_DC) argument
748 zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 TSRMLS_DC) argument
843 zend_op_array *op_array = CG(active_op_array); local
863 zend_op_array *op_array = &function->op_array; local
881 do_bind_function(const zend_op_array *op_array, const zend_op *opline, HashTable *function_table, zend_bool compile_time TSRMLS_DC) argument
921 do_bind_class(const zend_op_array* op_array, const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC) argument
958 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) argument
1449 zend_get_compiled_variable_name(const zend_op_array *op_array, uint32_t var) argument
3762 zend_op_array *op_array = CG(active_op_array); local
3916 zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_bool has_body TSRMLS_DC) argument
4090 zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_ast_decl *decl TSRMLS_DC) argument
4131 zend_hash_update_ptr(CG(function_table), key, op_array); local
4147 zend_op_array *op_array = zend_arena_alloc(&CG(arena), sizeof(zend_op_array)); local
4931 zend_op_array *op_array = CG(active_op_array); local
[all...]
H A Dzend_compile.h223 /* op_array has finally blocks */
349 zend_op_array op_array; member in union:_zend_function
364 zend_function *func; /* executed op_array */
428 ZEND_API zend_string *zend_get_compiled_variable_name(const zend_op_array *op_array, uint32_t var);
451 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);
452 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);
453 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);
454 ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC);
467 void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 TSRMLS_DC);
481 ZEND_API void init_op_array(zend_op_array *op_array, zend_ucha
[all...]
H A Dzend_generators.c35 zend_op_array *op_array = &execute_data->func->op_array; local
47 uint32_t op_num = execute_data->opline - op_array->opcodes - 1;
50 for (i = 0; i < op_array->last_brk_cont; ++i) {
51 zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
58 zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
93 zend_op_array *op_array = &execute_data->func->op_array; local
121 if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
122 destroy_op_array(op_array TSRMLS_C
215 zend_generator_create_zval(zend_execute_data *call, zend_op_array *op_array, zval *return_value TSRMLS_DC) argument
[all...]
H A Dzend_vm_execute.h364 ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value TSRMLS_DC) argument
373 (zend_function*)op_array, 0, 0, EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL, Z_OBJ(EG(This)), NULL TSRMLS_CC);
380 i_init_execute_data(execute_data, op_array, return_value, VM_FRAME_TOP_CODE TSRMLS_CC);
395 if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_CLOSURE) != 0) && EX(func)->op_array.prototype) {
396 OBJ_RELEASE((zend_object*)EX(func)->op_array.prototype);
434 destroy_op_array(&EX(func)->op_array TSRMLS_CC);
457 if ((EX(func)->op_array.fn_flags & ZEND_ACC_CLOSURE) && EX(func)->op_array.prototype) {
458 OBJ_RELEASE((zend_object*)EX(func)->op_array
[all...]
/PHP_TRUNK/ext/reflection/
H A Dphp_reflection.c663 static zend_op* _get_recv_op(zend_op_array *op_array, uint32_t offset) argument
665 zend_op *op = op_array->opcodes;
666 zend_op *end = op + op_array->last;
782 if (fptr->type != ZEND_USER_FUNCTION || !fptr->op_array.static_variables) {
786 static_variables = fptr->op_array.static_variables;
818 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) {
819 string_printf(str, "%s%s\n", indent, fptr->op_array.doc_comment->val);
889 if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
896 fptr->op_array.filename->val,
897 fptr->op_array
[all...]

Completed in 61 milliseconds