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

12

/PHP_TRUNK/ext/opcache/Optimizer/
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 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) {
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;
155 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 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 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;
189 if (op_array->last_try_catch) {
191 cfg->try = zend_arena_calloc(&ctx->arena, op_array
496 zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int find_start, zend_optimizer_ctx *ctx) argument
598 zend_optimize_block(zend_code_block *block, zend_op_array *op_array, char *used_ext, zend_cfg *cfg, zend_optimizer_ctx *ctx) argument
1121 assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array) argument
1239 zend_jmp_optimization(zend_code_block *block, zend_op_array *op_array, zend_code_block *blocks, zend_cfg *cfg, zend_optimizer_ctx *ctx) argument
1747 zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *used_ext, zend_optimizer_ctx *ctx) argument
1895 optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
[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];
75 end = op_array->opcodes;
76 opline = &op_array->opcodes[op_array->last - 1];
190 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;
204 jmp_to = &op_array->brk_cont_array[array_offset];
207 if (op_array->opcodes[jmp_to->brk].opcode == ZEND_FREE ||
208 op_array->opcodes[jmp_to->brk].opcode == ZEND_FE_FREE ||
209 op_array->opcodes[jmp_to->brk].opcode == ZEND_END_SILENCE) {
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) argument
121 zend_optimizer_update_op1_const(zend_op_array *op_array, zend_op *opline, zval *val) argument
160 zend_optimizer_update_op2_const(zend_op_array *op_array, zend_op *opline, zval *val) argument
296 zend_optimizer_replace_by_const(zend_op_array *op_array, zend_op *opline, zend_uchar type, uint32_t var, zval *val) argument
409 zend_optimize(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
481 zend_accel_optimize(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
567 zend_accel_adjust_fcall_stack_size(zend_op_array *op_array, zend_optimizer_ctx *ctx) argument
592 zend_op_array *op_array; local
[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);
92 if (zend_optimizer_replace_by_const(op_array, opline + 1, IS_TMP_VAR, tv, &result)) {
129 if (zend_optimizer_replace_by_const(op_array, opline + 1, type, tv, &res)) {
157 if (zend_optimizer_replace_by_const(op_array, opline + 1, IS_TMP_VAR, tv, &result)) {
230 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 */
249 fake_execute_data.func = (zend_function*)op_array;
254 if (zend_optimizer_replace_by_const(op_array, oplin
[all...]
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_bp.c439 PHPDBG_API int phpdbg_resolve_op_array_break(phpdbg_breakopline_t *brake, zend_op_array *op_array) /* {{{ */ argument
442 if (op_array->last <= brake->opline_num) {
444 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);
446 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);
448 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);
457 opline_break.opline = brake->opline = (zend_ulong)(op_array->opcodes + brake->opline_num);
460 if (op_array->scope) {
462 } else if (op_array->function_name) {
475 PHPDBG_API void phpdbg_resolve_op_array_breaks(zend_op_array *op_array) /* {{{ */ argument
481 if (op_array
529 zend_op_array *op_array = &execute_data->func->op_array; local
840 phpdbg_find_breakpoint_file(zend_op_array *op_array) argument
[all...]
H A Dphpdbg_info.c175 phpdbg_error("inactive", "type=\"op_array\"", "No active op array!");
203 zend_op_array *ops = &EG(current_execute_data)->func->op_array;
289 /* literals are assumed to not be manipulated during executing of their op_array and as such async safe */
292 zend_op_array *ops = in_executor ? &EG(current_execute_data)->func->op_array : PHPDBG_G(ops);
431 zend_op_array *op_array = &zf->op_array; local
433 phpdbg_write("function", "name=\"%s\"", "|-------- %s", op_array->function_name ? op_array->function_name->val : "{main}");
435 if (op_array->filename) {
436 phpdbg_writeln("functionsource", "file=\"%s\" line=\"%d\"", " in %s on line %d", op_array
[all...]
H A Dphpdbg_prompt.c486 const zend_op_array *op_array = &EG(current_execute_data)->func->op_array; local
488 while (++opline < op_array->opcodes + op_array->last) {
501 const zend_op_array *op_array = &EG(current_execute_data)->func->op_array - 1; local
503 while (++opline < op_array->opcodes + op_array->last) {
1372 zend_hash_init(&vars, execute_data->func->op_array.last, NULL, NULL, 0);
1383 phpdbg_resolve_op_array_breaks(&execute_data->func->op_array);
[all...]
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,
68 op_array->line_end,
71 op_array->filename ? op_array->filename->val : "unknown",
73 op_array
[all...]
/PHP_TRUNK/Zend/
H A Dzend_opcode.c32 static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array) argument
35 extension->op_array_ctor(op_array);
39 static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array) argument
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) argument
53 op_array->type = type;
55 op_array
130 zend_cleanup_op_array_data(zend_op_array *op_array) argument
328 destroy_op_array(zend_op_array *op_array) argument
416 get_next_op(zend_op_array *op_array) argument
433 get_next_op_number(zend_op_array *op_array) argument
438 get_next_brk_cont_element(zend_op_array *op_array) argument
445 zend_update_extended_info(zend_op_array *op_array) argument
468 zend_extension_op_array_handler(zend_extension *extension, zend_op_array *op_array) argument
475 zend_check_finally_breakout(zend_op_array *op_array, uint32_t op_num, uint32_t dst_num) argument
500 zend_adjust_fast_call(zend_op_array *op_array, uint32_t fast_call, uint32_t start, uint32_t end) argument
521 zend_resolve_fast_call(zend_op_array *op_array, uint32_t fast_call, uint32_t op_num) argument
543 zend_resolve_finally_call(zend_op_array *op_array, uint32_t op_num, uint32_t dst_num) argument
632 zend_resolve_finally_ret(zend_op_array *op_array, uint32_t op_num) argument
660 zend_resolve_finally_calls(zend_op_array *op_array) argument
715 pass_two(zend_op_array *op_array) argument
[all...]
H A Dzend_generators.c37 zend_op_array *op_array = &execute_data->func->op_array; local
49 uint32_t op_num = execute_data->opline - op_array->opcodes - 1;
52 for (i = 0; i < op_array->last_brk_cont; ++i) {
53 zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
60 zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
150 if (!ex || !(ex->func->op_array.fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
156 op_num = ex->opline - ex->func->op_array.opcodes - 1;
161 for (i = 0; i < ex->func->op_array.last_try_catch; i++) {
162 zend_try_catch_element *try_catch = &ex->func->op_array
247 zend_generator_create_zval(zend_execute_data *call, zend_op_array *op_array, zval *return_value) argument
[all...]
H A Dzend_execute.c63 static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array);
64 static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array);
65 static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_op_array *op_array);
119 #define CV_DEF_OF(i) (EX(func)->op_array.vars[i])
613 ptr->func->op_array.filename->val, ptr->opline->lineno);
827 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);
851 zf->op_array.filename->val, EG(current_execute_data)->opline->lineno);
1237 static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array) argument
1240 extension->statement_handler(op_array);
1245 static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array) argument
1253 zend_extension_fcall_end_handler(const zend_extension *extension, zend_op_array *op_array) argument
1725 zend_brk_cont(int nest_levels, int array_offset, const zend_op_array *op_array, const zend_execute_data *execute_data) argument
1862 i_init_func_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value, int check_this) argument
1935 i_init_code_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value) argument
1962 i_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value) argument
2044 zend_create_generator_execute_data(zend_execute_data *call, zend_op_array *op_array, zval *return_value) argument
2095 zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value) argument
[all...]
H A Dzend.c1374 zend_op_array *op_array; local
1383 op_array = zend_compile_file(file_handle, type);
1388 if (op_array) {
1389 zend_execute(op_array, retval);
1416 destroy_op_array(op_array);
1417 efree_size(op_array, sizeof(zend_op_array));
H A Dzend_language_scanner.c565 zend_op_array *op_array = NULL; local
586 op_array = emalloc(sizeof(zend_op_array));
587 init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
588 CG(active_op_array) = op_array;
600 pass_two(op_array);
613 return op_array;
728 zend_op_array *op_array = NULL; local
751 op_array = emalloc(sizeof(zend_op_array));
752 init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE);
753 CG(active_op_array) = op_array;
[all...]
/PHP_TRUNK/ext/opcache/
H A Dzend_accelerator_util_funcs.c51 if (function->op_array.static_variables) {
52 if (!(GC_FLAGS(function->op_array.static_variables) & IS_ARRAY_IMMUTABLE)) {
53 if (--GC_REFCOUNT(function->op_array.static_variables) == 0) {
54 FREE_HASHTABLE(function->op_array.static_variables);
57 function->op_array.static_variables = NULL;
669 zend_set_compiled_filename(function1->op_array.filename);
670 CG(zend_lineno) = function1->op_array.opcodes[0].lineno;
672 && function2->op_array.last > 0) {
675 function2->op_array.filename->val,
676 (int)function2->op_array
790 zend_op_array *op_array; local
[all...]
H A Dzend_accelerator_module.c695 zend_op_array *op_array = NULL; local
715 op_array = persistent_compile_file(&handle, ZEND_INCLUDE);
721 if(op_array != NULL) {
722 destroy_op_array(op_array);
723 efree(op_array);
H A DZendAccelerator.c1322 zend_op_array *op_array; local
1387 /* Save the original values for the op_array, function table and class table */
1404 op_array = *op_array_p = accelerator_orig_compile_file(file_handle, type);
1407 op_array = NULL;
1418 if (!op_array) {
1433 new_persistent_script->main_op_array = *op_array;
1435 efree(op_array); /* we have valid persistent_script, so it's safe to free op_array */
1606 zend_op_array *op_array; local
1621 persistent_script = compile_and_cache_file(file_handle, type, key, key_length, &op_array,
[all...]
H A Dzend_persist.c408 static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_script* main_persistent_script) argument
414 if (op_array->type != ZEND_USER_FUNCTION) {
418 if (op_array->refcount && --(*op_array->refcount) == 0) {
419 efree(op_array->refcount);
421 op_array->refcount = NULL;
429 fake_execute_data.func = (zend_function*)op_array;
437 if (op_array->static_variables) {
438 HashTable *stored = zend_shared_alloc_get_xlat_entry(op_array->static_variables);
441 op_array
638 zend_op_array *op_array = Z_PTR_P(zv); local
[all...]
H A Dzend_persist_calc.c153 static void zend_persist_op_array_calc_ex(zend_op_array *op_array) argument
155 if (op_array->type != ZEND_USER_FUNCTION) {
159 if (op_array->static_variables) {
160 if (!zend_shared_alloc_get_xlat_entry(op_array->static_variables)) {
161 HashTable *old = op_array->static_variables;
163 ADD_DUP_SIZE(op_array->static_variables, sizeof(HashTable));
164 zend_hash_persist_calc(op_array->static_variables, zend_persist_zval_calc);
165 zend_shared_alloc_register_xlat_entry(old, op_array->static_variables);
169 if (zend_shared_alloc_get_xlat_entry(op_array->opcodes)) {
171 if (op_array
256 zend_op_array *op_array = Z_PTR_P(zv); local
[all...]
/PHP_TRUNK/main/
H A Dmain.c2590 zend_op_array *op_array; local
2594 op_array = zend_compile_file(file, ZEND_INCLUDE);
2597 if (op_array) {
2598 destroy_op_array(op_array);
2599 efree(op_array);
/PHP_TRUNK/ext/reflection/
H A Dphp_reflection.c621 static zend_op* _get_recv_op(zend_op_array *op_array, uint32_t offset) argument
623 zend_op *op = op_array->opcodes;
624 zend_op *end = op + op_array->last;
683 ZVAL_DUP(&zv, RT_CONSTANT(&fptr->op_array, precv->op2));
748 if (fptr->type != ZEND_USER_FUNCTION || !fptr->op_array.static_variables) {
752 static_variables = fptr->op_array.static_variables;
781 if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) {
782 string_printf(str, "%s%s\n", indent, fptr->op_array.doc_comment->val);
852 if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
859 fptr->op_array
[all...]

Completed in 56 milliseconds

12