static inline void print_block(zend_code_block *block, zend_op *opcodes, char *txt)
{
- fprintf(stderr, "%sBlock: %d-%d (%d)", txt, block->start_opline - opcodes, block->start_opline - opcodes+block->len-1, block->len);
+ fprintf(stderr, "%sBlock: %d-%d (%d)", txt, block->start_opline - opcodes, block->start_opline - opcodes + block->len - 1, block->len);
if (!block->access) {
fprintf(stderr, " unused");
}
}
}
cur_block->len = end - cur_block->start_opline;
- cur_block->next = &blocks[op_array->last+1];
+ cur_block->next = &blocks[op_array->last + 1];
print_block(cur_block, op_array->opcodes, "");
/* The op_array doesn't have BRK, CONT, GOTO opcodes anyway */
memcpy(tmp, Z_STRVAL(ZEND_OP1_LITERAL(last_op)), l + 1);
Z_STRVAL(ZEND_OP1_LITERAL(last_op)) = tmp;
} else {
- Z_STRVAL(ZEND_OP1_LITERAL(last_op)) = erealloc(Z_STRVAL(ZEND_OP1_LITERAL(last_op)), l+1);
+ Z_STRVAL(ZEND_OP1_LITERAL(last_op)) = erealloc(Z_STRVAL(ZEND_OP1_LITERAL(last_op)), l + 1);
}
memcpy(Z_STRVAL(ZEND_OP1_LITERAL(last_op))+Z_STRLEN(ZEND_OP1_LITERAL(last_op)), Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)));
Z_STRVAL(ZEND_OP1_LITERAL(last_op))[l] = '\0';
/* strip the inside NOPs */
opline = block->start_opline;
- end = opline+block->len;
+ end = opline + block->len;
while (opline < end) {
if (opline->opcode == ZEND_NOP) {
zend_op *nop = opline + 1;
/* Rebuild plain (optimized) op_array from CFG */
static void assemble_code_blocks(zend_code_block *blocks, zend_op_array *op_array)
{
- zend_op *new_opcodes = emalloc(op_array->last*sizeof(zend_op));
+ zend_op *new_opcodes = emalloc(op_array->last * sizeof(zend_op));
zend_op *opline = new_opcodes;
zend_code_block *cur_block = blocks;
/* Copy code of reachable blocks into a single buffer */
while (cur_block) {
if (cur_block->access) {
- memcpy(opline, cur_block->start_opline, cur_block->len*sizeof(zend_op));
+ memcpy(opline, cur_block->start_opline, cur_block->len * sizeof(zend_op));
cur_block->start_opline = opline;
opline += cur_block->len;
- if ((opline-1)->opcode == ZEND_JMP) {
+ if ((opline - 1)->opcode == ZEND_JMP) {
zend_code_block *next;
next = cur_block->next;
while (next && !next->access) {
/* JMP to the next block - strip it */
cur_block->follow_to = cur_block->op1_to;
cur_block->op1_to = NULL;
- MAKE_NOP((opline-1));
+ MAKE_NOP((opline - 1));
opline--;
cur_block->len--;
}
} else {
/* this block will not be used, delete all constants there */
zend_op *_opl;
- zend_op *end = cur_block->start_opline+cur_block->len;
+ zend_op *end = cur_block->start_opline + cur_block->len;
for (_opl = cur_block->start_opline; _opl && _opl < end; _opl++) {
if (ZEND_OP1_TYPE(_opl) == IS_CONST) {
literal_dtor(&ZEND_OP1_LITERAL(_opl));
continue;
}
if (cur_block->op1_to) {
- ZEND_OP1(&cur_block->start_opline[cur_block->len-1]).opline_num = cur_block->op1_to->start_opline - new_opcodes;
+ ZEND_OP1(&cur_block->start_opline[cur_block->len - 1]).opline_num = cur_block->op1_to->start_opline - new_opcodes;
}
if (cur_block->op2_to) {
- ZEND_OP2(&cur_block->start_opline[cur_block->len-1]).opline_num = cur_block->op2_to->start_opline - new_opcodes;
+ ZEND_OP2(&cur_block->start_opline[cur_block->len - 1]).opline_num = cur_block->op2_to->start_opline - new_opcodes;
}
if (cur_block->ext_to) {
- cur_block->start_opline[cur_block->len-1].extended_value = cur_block->ext_to->start_opline - new_opcodes;
+ cur_block->start_opline[cur_block->len - 1].extended_value = cur_block->ext_to->start_opline - new_opcodes;
}
print_block(cur_block, new_opcodes, "Out ");
}
efree(op_array->opcodes);
- op_array->opcodes = erealloc(new_opcodes, op_array->last*sizeof(zend_op));
+ op_array->opcodes = erealloc(new_opcodes, op_array->last * sizeof(zend_op));
#if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
/* adjust early binding list */
while (next_block) {
zend_op *opline = next_block->start_opline;
- zend_op *end = opline+next_block->len;
+ zend_op *end = opline + next_block->len;
if (!next_block->access) {
next_block = next_block->next;
#if DEBUG_BLOCKPASS
{
int i;
- for (i=0; i< op_array->T; i++) {
+ for (i = 0; i< op_array->T; i++) {
fprintf(stderr, "T%d: %c\n", i, used_ext[i] + '0');
}
}
#endif
while (block) {
- zend_op *opline = block->start_opline+block->len - 1;
+ zend_op *opline = block->start_opline + block->len - 1;
if (!block->access) {
block = block->next;
shiftlist = (zend_uint *)DO_ALLOCA(sizeof(zend_uint) * op_array->last);
i = new_count = shift = 0;
- end = op_array->opcodes+op_array->last;
+ end = op_array->opcodes + op_array->last;
for (opline = op_array->opcodes; opline < end; opline++) {
#if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
int var_to_free = -1;
taken_T = (char *) emalloc(T);
- start_of_T = (zend_op **) emalloc(T*sizeof(zend_op *));
+ start_of_T = (zend_op **) emalloc(T * sizeof(zend_op *));
valid_T = (char *) emalloc(T);
- map_T = (int *) emalloc(T*sizeof(int));
+ map_T = (int *) emalloc(T * sizeof(int));
end = op_array->opcodes;
- opline = &op_array->opcodes[op_array->last-1];
+ opline = &op_array->opcodes[op_array->last - 1];
/* Find T definition points */
while (opline >= end) {
memset(taken_T, 0, T);
end = op_array->opcodes;
- opline = &op_array->opcodes[op_array->last-1];
+ opline = &op_array->opcodes[op_array->last - 1];
while (opline >= end) {
if ((ZEND_OP1_TYPE(opline) & (IS_VAR | IS_TMP_VAR))
/* Allocate OP_DATA->op2 after "opernds", but before "result" */
if (opline->opcode == ZEND_ASSIGN_DIM &&
- (opline+1)->opcode == ZEND_OP_DATA &&
- ZEND_OP2_TYPE(opline+1) & (IS_VAR | IS_TMP_VAR)) {
- currT = VAR_NUM(ZEND_OP2(opline+1).var);
+ (opline + 1)->opcode == ZEND_OP_DATA &&
+ ZEND_OP2_TYPE(opline + 1) & (IS_VAR | IS_TMP_VAR)) {
+ currT = VAR_NUM(ZEND_OP2(opline + 1).var);
GET_AVAILABLE_T();
map_T[currT] = i;
valid_T[currT] = 1;
taken_T[i] = 0;
- ZEND_OP2(opline+1).var = NUM_VAR(i);
+ ZEND_OP2(opline + 1).var = NUM_VAR(i);
var_to_free = i;
}
break;
}
last_op = next_op;
- final_length += (requires_conversion ? 1 : ZEND_OP2_LITERAL(opline).value.str.len);
- ptr = (char *)emalloc(final_length+1);
+ final_length += (requires_conversion? 1 : ZEND_OP2_LITERAL(opline).value.str.len);
+ ptr = (char *)emalloc(final_length + 1);
ptr[final_length] = '\0';
if (requires_conversion) { /* ZEND_ADD_CHAR */
char chval = (char)ZEND_OP2_LITERAL(opline).value.lval;
if (ZEND_OP1_TYPE(opline) == IS_UNUSED &&
ZEND_OP2_TYPE(opline) == IS_CONST &&
Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING &&
- Z_STRLEN(ZEND_OP2_LITERAL(opline)) == sizeof("__COMPILER_HALT_OFFSET__")-1 &&
- memcmp(Z_STRVAL(ZEND_OP2_LITERAL(opline)), "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1) == 0) {
+ Z_STRLEN(ZEND_OP2_LITERAL(opline)) == sizeof("__COMPILER_HALT_OFFSET__") - 1 &&
+ memcmp(Z_STRVAL(ZEND_OP2_LITERAL(opline)), "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1) == 0) {
/* substitute __COMPILER_HALT_OFFSET__ constant */
zend_bool orig_in_execution = EG(in_execution);
zend_op_array *orig_op_array = EG(active_op_array);
EG(in_execution) = 1;
EG(active_op_array) = op_array;
- if (zend_get_constant("__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1, &offset TSRMLS_CC)) {
+ if (zend_get_constant("__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1, &offset TSRMLS_CC)) {
literal_dtor(&ZEND_OP2_LITERAL(opline));
ZEND_OP1_TYPE(opline) = IS_CONST;
#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
if (ZEND_OPTIMIZER_PASS_3 & OPTIMIZATION_LEVEL) {
zend_op *opline;
- zend_op *end = op_array->opcodes+op_array->last;
+ zend_op *end = op_array->opcodes + op_array->last;
zend_uint *jmp_hitlist;
int jmp_hitlist_count;
int i;
/* JMPZ(X,L1), L1: JMPZ(X,L2) => JMPZ(X,L2), L1: JMPZ(X,L2) */
CHECK_JMP2(target, done_jmp_optimization);
ZEND_OP2(opline).opline_num = ZEND_OP2(&op_array->opcodes[target]).opline_num;
- } else if (op_array->opcodes[target].opcode == opline->opcode+3 &&
+ } else if (op_array->opcodes[target].opcode == opline->opcode + 3 &&
SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
/* convert JMPZ(X,L1), L1: T JMPZ_EX(X,L2) to
T = JMPZ_EX(X, L2) */
SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
/* convert JMPZ(X,L1), L1: JMPNZ(X,L2) to
JMPZ(X,L1+1) */
- ZEND_OP2(opline).opline_num = target+1;
+ ZEND_OP2(opline).opline_num = target + 1;
break;
} else if (op_array->opcodes[target].opcode == INV_COND_EX(opline->opcode) &&
SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
/* convert JMPZ(X,L1), L1: T = JMPNZ_EX(X,L2) to
T = JMPZ_EX(X,L1+1) */
- ZEND_OP2(opline).opline_num = target+1;
+ ZEND_OP2(opline).opline_num = target + 1;
opline->opcode += 3;
COPY_NODE(opline->result, op_array->opcodes[target].result);
break;
SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
/* convert JMPZ_EX(X,L1), L1: JMPNZ_EX(X,L2) to
JMPZ_EX(X,L1+1) */
- ZEND_OP2(opline).opline_num = target+1;
+ ZEND_OP2(opline).opline_num = target + 1;
break;
} else {
break;
if (GetFileAttributesEx(file_handle->opened_path, GetFileExInfoStandard, &fdata) != 0) {
unsigned __int64 ftime;
- if (CompareFileTime (&fdata.ftLastWriteTime, &utc_base_ft) < 0)
+ if (CompareFileTime (&fdata.ftLastWriteTime, &utc_base_ft) < 0) {
return 0;
+ }
ftime = (((unsigned __int64)fdata.ftLastWriteTime.dwHighDateTime) << 32) + fdata.ftLastWriteTime.dwLowDateTime - utc_base;
ftime /= 10000000L;
}
/* Calculate key length */
- key_length = cwd_len + path_length+include_path_len + 2;
+ key_length = cwd_len + path_length + include_path_len + 2;
if (parent_script_len) {
key_length += parent_script_len + 1;
}
#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO
# ifdef ALLOCA_FLAG
- #define DO_ALLOCA(x) do_alloca_with_limit(x,use_heap)
- #define FREE_ALLOCA(x) free_alloca_with_limit(x,use_heap)
+ #define DO_ALLOCA(x) do_alloca_with_limit(x, use_heap)
+ #define FREE_ALLOCA(x) free_alloca_with_limit(x, use_heap)
# else
#define ALLOCA_FLAG(x)
#define DO_ALLOCA(x) do_alloca(x)
#define FREE_ALLOCA(x) free_alloca(x)
# endif
#else
- #define DO_ALLOCA(x) do_alloca(x,use_heap)
- #define FREE_ALLOCA(x) free_alloca(x,use_heap)
+ #define DO_ALLOCA(x) do_alloca(x, use_heap)
+ #define FREE_ALLOCA(x) free_alloca(x, use_heap)
#endif
static char *create_name_with_username(char *name)
{
- static char newname[MAXPATHLEN+UNLEN+4];
- char uname[UNLEN+1];
+ static char newname[MAXPATHLEN + UNLEN + 4];
+ char uname[UNLEN + 1];
DWORD unsize = UNLEN;
GetUserName(uname, &unsize);
- snprintf(newname, sizeof(newname)-1, "%s@%s", name, uname);
+ snprintf(newname, sizeof(newname) - 1, "%s@%s", name, uname);
return newname;
}
static char *get_mmap_base_file()
{
- static char windir[MAXPATHLEN+UNLEN+3+sizeof("\\\\@")];
- char uname[UNLEN+1];
+ static char windir[MAXPATHLEN+UNLEN + 3 + sizeof("\\\\@")];
+ char uname[UNLEN + 1];
DWORD unsize = UNLEN;
int l;
GetTempPath(MAXPATHLEN, windir);
GetUserName(uname, &unsize);
l = strlen(windir);
- snprintf(windir+l, sizeof(windir)-l-1, "\\%s@%s", ACCEL_FILEMAP_BASE, uname);
+ snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s", ACCEL_FILEMAP_BASE, uname);
return windir;
}
do {
memfile = OpenFileMapping(FILE_MAP_WRITE, 0, create_name_with_username(ACCEL_FILEMAP_NAME));
err = GetLastError();
- if (memfile == NULL)
+ if (memfile == NULL) {
break;
+ }
ret = zend_shared_alloc_reattach(requested_size, error_in);
err = GetLastError();
/* Mapping failed, wait for mapping object to get freed and retry */
CloseHandle(memfile);
memfile = NULL;
- Sleep(1000*(map_retries+1));
+ Sleep(1000 * (map_retries + 1));
} else {
return ret;
}
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
if (! GetVersionEx ((OSVERSIONINFO *) &osvi)) {
- osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- if (! GetVersionEx ( (OSVERSIONINFO *) &osvi) )
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
break;
+ }
}
GetSystemInfo(&si);
/* Are we running Vista ? */
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion == 6) {
/* Assert that platform is 32 bit (for 64 bit we need to test a different set */
- if (si.wProcessorArchitecture != PROCESSOR_ARCHITECTURE_INTEL)
+ if (si.wProcessorArchitecture != PROCESSOR_ARCHITECTURE_INTEL) {
DebugBreak();
+ }
wanted_mapping_base = vista_mapping_base_set;
}
char *s = ZCG(accel_directives).mmap_base;
/* skip leading 0x, %p assumes hexdeciaml format anyway */
- if (*s == '0' && *(s+1) == 'x') {
+ if (*s == '0' && *(s + 1) == 'x') {
s += 2;
}
if (sscanf(s, "%p", &default_mapping_base_set[0]) != 1) {
do {
shared_segment->p = mapping_base = MapViewOfFileEx(memfile, FILE_MAP_ALL_ACCESS, 0, 0, 0, *wanted_mapping_base);
- if (*wanted_mapping_base == NULL) /* Auto address (NULL) is the last option on the array */
+ if (*wanted_mapping_base == NULL) { /* Auto address (NULL) is the last option on the array */
break;
+ }
wanted_mapping_base++;
} while (!mapping_base);
regexp[1] = '(';
clen = 2;
- for (j = end; j <= i ;j++) {
+ for (j = end; j <= i; j++) {
int c;
if (j != end) {
/* keep the compiler happy */
(void)entry; (void)new_value_length; (void)mh_arg2; (void)mh_arg3; (void)stage;
- p = (long *) (base+(size_t) mh_arg1);
+ p = (long *) (base + (size_t)mh_arg1);
memsize = atoi(new_value);
/* sanity check we must use at least 8 MB */
if (memsize < 8) {
zend_ini_entry *ini_entry;
memsize = 8;
- zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.memory_consumption is set below the required 8MB.\n" );
- zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal 8MB cofiguration.\n" );
+ zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.memory_consumption is set below the required 8MB.\n");
+ zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal 8MB cofiguration.\n");
if (zend_hash_find(EG(ini_directives),
"zend_optimizerplus.memory_consumption",
/* keep the compiler happy */
(void)entry; (void)new_value_length; (void)mh_arg2; (void)mh_arg3; (void)stage;
- p = (long *) (base+(size_t) mh_arg1);
+ p = (long *) (base + (size_t)mh_arg1);
size = atoi(new_value);
/* sanity check we must use a value between MIN_ACCEL_FILES and MAX_ACCEL_FILES */
if (size < MIN_ACCEL_FILES) {
size = MIN_ACCEL_FILES;
new_new_value = TOKENTOSTR(MIN_ACCEL_FILES);
- zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_accelerated_files is set below the required minimum (%d).\n", MIN_ACCEL_FILES );
- zend_accel_error(ACCEL_LOG_WARNING,ACCELERATOR_PRODUCT_NAME " will use the minimal cofiguration.\n" );
+ zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_accelerated_files is set below the required minimum (%d).\n", MIN_ACCEL_FILES);
+ zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the minimal cofiguration.\n");
}
if (size > MAX_ACCEL_FILES) {
size = MAX_ACCEL_FILES;
new_new_value = TOKENTOSTR(MAX_ACCEL_FILES);
- zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_accelerated_files is set above the limit (%d).\n", MAX_ACCEL_FILES );
- zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the maximal cofiguration.\n" );
+ zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_accelerated_files is set above the limit (%d).\n", MAX_ACCEL_FILES);
+ zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use the maximal cofiguration.\n");
}
if (zend_hash_find(EG(ini_directives),
"zend_optimizerplus.max_accelerated_files",
/* keep the compiler happy */
(void)entry; (void)new_value_length; (void)mh_arg2; (void)mh_arg3; (void)stage;
- p = (double *) (base+(size_t) mh_arg1);
+ p = (double *) (base + (size_t)mh_arg1);
percentage = atoi(new_value);
if (percentage <= 0 || percentage > 50) {
percentage = 5;
zend_accel_error(ACCEL_LOG_WARNING, "zend_optimizerplus.max_wasted_percentage must be ser netweeb 1 and 50.\n");
- zend_accel_error(ACCEL_LOG_WARNING,ACCELERATOR_PRODUCT_NAME " will use 5%.\n" );
+ zend_accel_error(ACCEL_LOG_WARNING, ACCELERATOR_PRODUCT_NAME " will use 5%.\n");
if (zend_hash_find(EG(ini_directives),
"zend_optimizerplus.max_wasted_percentage",
sizeof("zend_optimizerplus.max_wasted_percentage"),
return FAILURE;
}
- p = (char **) (base+(size_t) mh_arg1);
+ p = (char **) (base + (size_t)mh_arg1);
*p = new_value;
zend_accel_blacklist_init(&accel_blacklist);
{
zend_class_entry **pce, **pce_orig;
- if (zend_hash_find(EG(class_table), Z_STRVAL(EX(opline)->op2.u.constant), Z_STRLEN(EX(opline)->op2.u.constant)+1, (void **)&pce) == FAILURE ||
+ if (zend_hash_find(EG(class_table), Z_STRVAL(EX(opline)->op2.u.constant), Z_STRLEN(EX(opline)->op2.u.constant) + 1, (void **)&pce) == FAILURE ||
(zend_hash_find(EG(class_table), Z_STRVAL(EX(opline)->op1.u.constant), Z_STRLEN(EX(opline)->op1.u.constant), (void**)&pce_orig) == SUCCESS &&
*pce != *pce_orig)) {
do_bind_inherited_class(EX(opline), EG(class_table), EX_T(EX(opline)->extended_value).class_entry, 0 TSRMLS_CC);
handle.type = ZEND_HANDLE_FILENAME;
if (IS_ABSOLUTE_PATH(filename, filename_len)) {
- persistent_script = zend_accel_hash_find(&ZCSG(hash), filename, filename_len+1);
+ persistent_script = zend_accel_hash_find(&ZCSG(hash), filename, filename_len + 1);
if (persistent_script) {
return !persistent_script->corrupted;
}
}
if ((key = accel_make_persistent_key_ex(&handle, filename_len, &key_length TSRMLS_CC)) != NULL) {
- persistent_script = zend_accel_hash_find(&ZCSG(hash), key, key_length+1);
+ persistent_script = zend_accel_hash_find(&ZCSG(hash), key, key_length + 1);
return persistent_script && !persistent_script->corrupted;
}
add_assoc_long(memory_usage, "free_memory", zend_shared_alloc_get_free_memory());
add_assoc_long(memory_usage, "wasted_memory", ZSMMG(wasted_shared_memory));
add_assoc_double(memory_usage, "current_wasted_percentage", (((double) ZSMMG(wasted_shared_memory))/ZCG(accel_directives).memory_consumption)*100.0);
- add_assoc_zval(return_value, "memory_usage",memory_usage);
+ add_assoc_zval(return_value, "memory_usage", memory_usage);
/* Accelerator statistics */
MAKE_STD_ZVAL(statistics);
reqs = ZCSG(hits)+ZCSG(misses);
add_assoc_double(statistics, "blacklist_miss_ratio", reqs?(((double) ZCSG(blacklist_misses))/reqs)*100.0:0);
add_assoc_double(statistics, "accelerator_hit_rate", reqs?(((double) ZCSG(hits))/reqs)*100.0:0);
- add_assoc_zval(return_value, "accelerator_statistics",statistics);
+ add_assoc_zval(return_value, "accelerator_statistics", statistics);
/* acceleratred scripts */
scripts = accelerator_get_scripts(TSRMLS_C);
if (scripts) {
- add_assoc_zval(return_value, "scripts",scripts);
+ add_assoc_zval(return_value, "scripts", scripts);
}
}
add_assoc_bool(directives, "zend_optimizerplus.enable_file_override", ZCG(accel_directives).file_override_enabled);
add_assoc_long(directives, "zend_optimizerplus.optimization_level", ZCG(accel_directives).optimization_level);
- add_assoc_zval(return_value, "directives",directives);
+ add_assoc_zval(return_value, "directives", directives);
/*version */
MAKE_STD_ZVAL(version);
array_init(version);
add_assoc_string(version, "version", ACCELERATOR_VERSION, 1);
add_assoc_string(version, "accelerator_product_name", ACCELERATOR_PRODUCT_NAME, 1);
- add_assoc_zval(return_value, "version",version);
+ add_assoc_zval(return_value, "version", version);
/* blacklist */
MAKE_STD_ZVAL(blacklist);
array_init(blacklist);
zend_accel_blacklist_apply(&accel_blacklist, (apply_func_arg_t) add_blacklist_path, blacklist TSRMLS_CC);
- add_assoc_zval(return_value, "blacklist",blacklist);
+ add_assoc_zval(return_value, "blacklist", blacklist);
}
/* {{{ proto void accelerator_reset()
static void zend_protect_zval(zval *z TSRMLS_DC)
{
PZ_SET_ISREF_P(z);
- PZ_SET_REFCOUNT_P(z,2);
+ PZ_SET_REFCOUNT_P(z, 2);
}
static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_script* main_persistent_script TSRMLS_DC)
zend_op *end = new_opcodes + op_array->last;
int offset = 0;
- for (;opline<end;opline++, offset++) {
+ for (; opline < end ; opline++, offset++) {
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
opline->op1.zv = (zval*)((char*)opline->op1.zv + ((char*)op_array->literals - (char*)orig_literals));
zend_uint i;
ADD_DUP_SIZE(op_array->arg_info, sizeof(zend_arg_info) * op_array->num_args);
- for (i = 0;i < op_array->num_args; i++) {
+ for (i = 0; i < op_array->num_args; i++) {
if (op_array->arg_info[i].name) {
ADD_INTERNED_STRING(op_array->arg_info[i].name, op_array->arg_info[i].name_len + 1);
}