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

12

/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) 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];
88 Z_CACHE_SLOT(op_array->literals[fcall->op2.constant + 1]) = Z_CACHE_SLOT(op_array->literals[fcall->op2.constant]);
95 Z_CACHE_SLOT(op_array
[all...]
H A Dpass2.c36 void zend_optimizer_pass2(zend_op_array *op_array) argument
39 zend_op *end = op_array->opcodes + op_array->last;
41 opline = op_array->opcodes;
H A Dpass3.c42 if (jmp_hitlist[i] == ZEND_OP1(&op_array->opcodes[target]).opline_num) { \
46 jmp_hitlist[jmp_hitlist_count++] = ZEND_OP1(&op_array->opcodes[target]).opline_num;
50 if (jmp_hitlist[i] == ZEND_OP2(&op_array->opcodes[target]).opline_num) { \
54 jmp_hitlist[jmp_hitlist_count++] = ZEND_OP2(&op_array->opcodes[target]).opline_num;
56 void zend_optimizer_pass3(zend_op_array *op_array) argument
59 zend_op *end = op_array->opcodes + op_array->last;
66 jmp_hitlist = (uint32_t *)DO_ALLOCA(sizeof(uint32_t)*op_array->last);
67 opline = op_array->opcodes;
165 if (op_array
[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++) {
50 zend_op *target = op_array->opcodes + ZEND_OP1(opline).opline_num - 1;
66 op_array->opcodes[new_count] = *opline;
73 op_array->last = new_count;
74 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) 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);
95 if (zend_optimizer_replace_by_const(op_array, opline + 1, IS_TMP_VAR, tv, &result)) {
132 if (zend_optimizer_replace_by_const(op_array, opline + 1, type, tv, &res)) {
160 if (zend_optimizer_replace_by_const(op_array, opline + 1, IS_TMP_VAR, tv, &result)) {
233 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 */
252 fake_execute_data.func = (zend_function*)op_array;
257 if (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 (ZSTR_H(op_array->vars[i]) == hash_value &&
66 ZSTR_LEN(op_array->vars[i]) == ZSTR_LEN(name) &&
67 memcmp(ZSTR_VAL(op_array->vars[i]), ZSTR_VAL(name), ZSTR_LEN(name)) == 0)) {
72 i = op_array->last_var;
73 op_array->last_var++;
74 op_array->vars = erealloc(op_array
103 zend_optimizer_add_literal(zend_op_array *op_array, zval *zv) argument
120 zend_optimizer_update_op1_const(zend_op_array *op_array, zend_op *opline, zval *val) argument
159 zend_optimizer_update_op2_const(zend_op_array *op_array, zend_op *opline, zval *val) argument
295 zend_optimizer_replace_by_const(zend_op_array *op_array, zend_op *opline, zend_uchar type, uint32_t var, zval *val) argument
422 zend_optimize(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
494 zend_accel_optimize(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
586 zend_accel_adjust_fcall_stack_size(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
611 zend_op_array *op_array; local
[all...]
H A Doptimize_temp_vars_5.c42 void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
44 int T = op_array->T;
45 int offset = op_array->last_var;
64 end = op_array->opcodes;
65 opline = &op_array->opcodes[op_array->last - 1];
78 end = op_array->opcodes;
79 opline = &op_array->opcodes[op_array->last - 1];
110 if ((op_array
[all...]
H A Dblock_pass.c71 # define BLOCK_REF(b) b?op_array->opcodes-b->start_opline:-1
108 #define START_BLOCK_OP(opno) blocks[opno].start_opline = &op_array->opcodes[opno]; blocks[opno].start_opline_no = opno; blocks[opno].access = 1
110 /* find code blocks in op_array
113 static int find_code_blocks(zend_op_array *op_array, zend_cfg *cfg, zend_optimizer_ctx *ctx) argument
116 zend_op *end = op_array->opcodes + op_array->last;
121 blocks = cfg->blocks = zend_arena_calloc(&ctx->arena, op_array->last + 2, sizeof(zend_code_block));
122 opline = op_array->opcodes;
185 if (op_array->last_try_catch) {
187 cfg->try = zend_arena_calloc(&ctx->arena, op_array
507 zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int find_start, zend_optimizer_ctx *ctx) argument
609 zend_optimize_block(zend_code_block *block, zend_op_array *op_array, zend_bitset used_ext, zend_cfg *cfg, zend_optimizer_ctx *ctx) argument
1141 assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array) argument
1251 zend_jmp_optimization(zend_code_block *block, zend_op_array *op_array, zend_code_block *blocks, zend_cfg *cfg, zend_optimizer_ctx *ctx) argument
1789 zend_t_usage(zend_code_block *block, zend_op_array *op_array, zend_bitset used_ext, zend_optimizer_ctx *ctx) argument
1940 optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
[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) argument
130 if (op_array->last_literal) {
132 info = (literal_info*)zend_arena_calloc(&ctx->arena, op_array->last_literal, sizeof(literal_info));
135 opline = op_array->opcodes;
136 end = opline + op_array->last;
156 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...]
/PHP_TRUNK/ext/opcache/
H A Dzend_accelerator_module.c769 zend_op_array *op_array = NULL; local
789 op_array = persistent_compile_file(&handle, ZEND_INCLUDE);
795 if(op_array != NULL) {
796 destroy_op_array(op_array);
797 efree(op_array);
H A Dzend_file_cache.c342 static void zend_file_cache_serialize_op_array(zend_op_array *op_array, argument
347 if (op_array->static_variables && !IS_SERIALIZED(op_array->static_variables)) {
350 SERIALIZE_PTR(op_array->static_variables);
351 ht = op_array->static_variables;
356 if (op_array->literals && !IS_SERIALIZED(op_array->literals)) {
359 SERIALIZE_PTR(op_array->literals);
360 p = op_array->literals;
362 end = p + op_array
474 zend_op_array *op_array; local
898 zend_file_cache_unserialize_op_array(zend_op_array *op_array, zend_persistent_script *script, void *buf) argument
1020 zend_op_array *op_array; local
[all...]
H A Dzend_accelerator_util_funcs.c50 if (function->op_array.static_variables) {
51 if (!(GC_FLAGS(function->op_array.static_variables) & IS_ARRAY_IMMUTABLE)) {
52 if (--GC_REFCOUNT(function->op_array.static_variables) == 0) {
53 FREE_HASHTABLE(function->op_array.static_variables);
56 function->op_array.static_variables = NULL;
554 zend_set_compiled_filename(function1->op_array.filename);
555 CG(zend_lineno) = function1->op_array.opcodes[0].lineno;
557 && function2->op_array.last > 0) {
560 ZSTR_VAL(function2->op_array.filename),
561 (int)function2->op_array
679 zend_op_array *op_array; local
[all...]
H A Dzend_persist.c436 static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_script* main_persistent_script) argument
442 if (op_array->type != ZEND_USER_FUNCTION) {
446 if (op_array->refcount && --(*op_array->refcount) == 0) {
447 efree(op_array->refcount);
449 op_array->refcount = NULL;
457 fake_execute_data.func = (zend_function*)op_array;
465 if (op_array->static_variables) {
466 HashTable *stored = zend_shared_alloc_get_xlat_entry(op_array->static_variables);
469 op_array
670 zend_op_array *op_array = Z_PTR_P(zv); local
[all...]
H A Dzend_persist_calc.c156 static void zend_persist_op_array_calc_ex(zend_op_array *op_array) argument
158 if (op_array->type != ZEND_USER_FUNCTION) {
162 if (op_array->static_variables) {
163 if (!zend_shared_alloc_get_xlat_entry(op_array->static_variables)) {
164 HashTable *old = op_array->static_variables;
166 ADD_DUP_SIZE(op_array->static_variables, sizeof(HashTable));
167 zend_hash_persist_calc(op_array->static_variables, zend_persist_zval_calc);
168 zend_shared_alloc_register_xlat_entry(old, op_array->static_variables);
172 if (zend_shared_alloc_get_xlat_entry(op_array->opcodes)) {
174 if (op_array
259 zend_op_array *op_array = Z_PTR_P(zv); local
[all...]
/PHP_TRUNK/Zend/
H A Dzend_language_scanner.c577 zend_op_array *op_array = NULL; local
598 op_array = emalloc(sizeof(zend_op_array));
599 init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
600 CG(active_op_array) = op_array;
611 op_array->line_start = 1;
612 op_array->line_end = CG(zend_lineno);
613 pass_two(op_array);
626 return op_array;
741 zend_op_array *op_array = NULL; local
764 op_array
[all...]
H A Dzend_generators.c43 if (execute_data->opline != execute_data->func->op_array.opcodes) {
45 uint32_t op_num = execute_data->opline - execute_data->func->op_array.opcodes - 1;
129 if (!ex || !(ex->func->op_array.fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
135 op_num = ex->opline - ex->func->op_array.opcodes - 1;
140 for (i = 0; i < ex->func->op_array.last_try_catch; i++) {
141 zend_try_catch_element *try_catch = &ex->func->op_array.try_catch_array[i];
156 zval *fast_call = ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[finally_op_end].op1.var);
162 ex->opline = &ex->func->op_array.opcodes[finally_op_num];
228 ZEND_API void zend_generator_create_zval(zend_execute_data *call, zend_op_array *op_array, zval *return_value) /* {{{ */ argument
240 execute_data = zend_create_generator_execute_data(call, op_array, return_valu
[all...]
H A Dzend_opcode.c33 static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array) argument
36 extension->op_array_ctor(op_array);
40 static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array) argument
43 extension->op_array_dtor(op_array);
47 static void op_array_alloc_ops(zend_op_array *op_array, uint32_t size) argument
49 op_array->opcodes = erealloc(op_array->opcodes, size * sizeof(zend_op));
52 void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size) argument
54 op_array->type = type;
55 op_array
134 zend_cleanup_op_array_data(zend_op_array *op_array) argument
339 destroy_op_array(zend_op_array *op_array) argument
428 get_next_op(zend_op_array *op_array) argument
445 get_next_op_number(zend_op_array *op_array) argument
450 get_next_brk_cont_element(zend_op_array *op_array) argument
457 zend_update_extended_info(zend_op_array *op_array) argument
480 zend_extension_op_array_handler(zend_extension *extension, zend_op_array *op_array) argument
487 zend_check_finally_breakout(zend_op_array *op_array, uint32_t op_num, uint32_t dst_num) argument
512 zend_resolve_fast_call(zend_op_array *op_array, uint32_t op_num) argument
532 zend_resolve_finally_ret(zend_op_array *op_array, uint32_t op_num) argument
560 zend_get_brk_cont_target(const zend_op_array *op_array, const zend_op *opline) argument
574 pass_two(zend_op_array *op_array) argument
[all...]
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_print.c57 zend_op_array* op_array = &(method->op_array); local
59 if (op_array) {
60 zend_op *opline = &(op_array->opcodes[0]);
62 end = op_array->last-1;
66 op_array->line_start,
67 op_array->line_end,
70 op_array->filename ? ZSTR_VAL(op_array->filename) : "unknown",
72 op_array
[all...]
H A Dphpdbg_opcode.c181 char *decode = phpdbg_decode_opline(&execute_data->func->op_array, opline);
189 execute_data->func->op_array.filename ? ZSTR_VAL(execute_data->func->op_array.filename) : "unknown");
197 execute_data->func->op_array.filename ? ZSTR_VAL(execute_data->func->op_array.filename) : "unknown");
205 zend_op_array *op_array = &execute_data->func->op_array; local
207 cur->opcodes = op_array->opcodes;
208 cur->filename = op_array->filename;
209 cur->scope = op_array
[all...]
H A Dphpdbg_list.h51 zend_op_array op_array; member in struct:__anon4
H A Dphpdbg_utils.c324 phpdbg_error("inactive", "type=\"op_array\"", "No active op array!");
727 zend_op_array *op_array = &execute_data->func->op_array; local
735 op_num = op - op_array->opcodes;
737 for (i = 0; i < op_array->last_try_catch && op_array->try_catch_array[i].try_op <= op_num; i++) {
738 uint32_t catch = op_array->try_catch_array[i].catch_op, finally = op_array->try_catch_array[i].finally_op;
746 cur = &op_array->opcodes[catch];
H A Dphpdbg_bp.c476 PHPDBG_API int phpdbg_resolve_op_array_break(phpdbg_breakopline_t *brake, zend_op_array *op_array) /* {{{ */ argument
479 if (op_array->last <= brake->opline_num) {
481 phpdbg_error("breakpoint", "type=\"maxoplines\" add=\"fail\" maxoplinenum=\"%d\" function=\"%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in function %s (breaking at opline %ld impossible)", op_array->last, brake->func_name, brake->opline_num);
483 phpdbg_error("breakpoint", "type=\"maxoplines\" add=\"fail\" maxoplinenum=\"%d\" file=\"%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in file %s (breaking at opline %ld impossible)", op_array->last, brake->class_name, brake->opline_num);
485 phpdbg_error("breakpoint", "type=\"maxoplines\" add=\"fail\" maxoplinenum=\"%d\" method=\"%s::%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in method %s::%s (breaking at opline %ld impossible)", op_array->last, brake->class_name, brake->func_name, brake->opline_num);
494 opline_break.opline = brake->opline = (zend_ulong)(op_array->opcodes + brake->opline_num);
497 if (op_array->scope) {
499 } else if (op_array->function_name) {
512 PHPDBG_API void phpdbg_resolve_op_array_breaks(zend_op_array *op_array) /* {{{ */ argument
518 if (op_array
566 zend_op_array *op_array = &execute_data->func->op_array; local
883 phpdbg_find_breakpoint_file(zend_op_array *op_array) argument
1119 zend_op_array *op_array = &execute_data->func->op_array; local
[all...]
H A Dphpdbg_info.c177 phpdbg_error("inactive", "type=\"op_array\"", "No active op array!");
205 zend_op_array *ops = &EG(current_execute_data)->func->op_array;
299 /* literals are assumed to not be manipulated during executing of their op_array and as such async safe */
302 zend_op_array *ops = in_executor ? &EG(current_execute_data)->func->op_array : PHPDBG_G(ops);
441 zend_op_array *op_array = &zf->op_array; local
443 phpdbg_write("function", "name=\"%s\"", "|-------- %s", op_array->function_name ? ZSTR_VAL(op_array->function_name) : "{main}");
445 if (op_array->filename) {
446 phpdbg_writeln("functionsource", "file=\"%s\" line=\"%d\"", " in %s on line %d", ZSTR_VAL(op_array
[all...]
H A Dphpdbg_prompt.c525 const zend_op_array *op_array = &EG(current_execute_data)->func->op_array; local
527 while (++opline < op_array->opcodes + op_array->last) {
569 const zend_op_array *op_array = &EG(current_execute_data)->func->op_array - 1; local
572 while (++opline < op_array->opcodes + op_array->last) {
1463 phpdbg_resolve_op_array_breaks(&execute_data->func->op_array);
1632 phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\" file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in %s:%u", data->opline, (data->opline - data->func->op_array
[all...]
H A Dphpdbg_list.c298 zend_op_array *op_array; local
305 op_array = PHPDBG_G(init_compile_file)(file, type);
307 if (op_array == NULL) {
314 dataptr->op_array = *op_array;
315 if (dataptr->op_array.refcount) {
316 ++*dataptr->op_array.refcount;
319 return op_array;
324 zend_op_array *op_array; local
345 op_array
[all...]

Completed in 70 milliseconds

12