expr_without_variable:
- T_LIST '(' { do_list_init(); } assignment_list ')' '=' expr { do_list_end(&$$, &$7 CLS_CC); }
+ T_LIST '(' { do_list_init(CLS_C); } assignment_list ')' '=' expr { do_list_end(&$$, &$7 CLS_CC); }
| w_cvar '=' expr { do_assign(&$$, &$1, &$3 CLS_CC); }
| w_cvar '=' '&' w_cvar { do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| w_cvar '=' T_NEW class_name { do_extended_fcall_begin(CLS_C); do_begin_new_object(&$2, &$1, &$3, &$4 CLS_CC); } ctor_arguments { do_end_new_object(&$4, &$3, &$6 CLS_CC); do_extended_fcall_end(CLS_C); $$ = $2;}
#ifndef ZTS
-typedef struct {
+typedef struct _zend_lex_state {
YY_BUFFER_STATE buffer_state;
int state;
uint return_offset;
char *filename;
} zend_lex_state;
#else
-typedef struct {
+typedef struct _zend_lex_state {
ZendFlexLexer *ZFL;
istream *input_file;
} zend_lex_state;
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;
-typedef union {
+typedef union _zvalue_value {
long lval; /* long value */
double dval; /* double value */
struct {
-typedef struct {
+typedef struct _zend_function_entry {
char *fname;
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
unsigned char *func_arg_types;
} zend_function_entry;
-typedef struct {
+typedef struct _zend_property_reference {
int type; /* read, write or r/w */
zval **object;
zend_llist elements_list;
-typedef struct {
+typedef struct _zend_overloaded_element {
int type; /* array offset or object proprety */
zval element;
} zend_overloaded_element;
-typedef struct {
+typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *format, ...);
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
} zend_utility_functions;
-typedef struct {
+typedef struct _zend_utility_values {
unsigned char short_tags;
unsigned char asp_tags;
} zend_utility_values;
/* flush old leak */
if (leak_count>0) {
if (!silent && leak_count>1) {
- zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) leak_count-1);
+ zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) (leak_count-1));
}
leak_count=0;
total_bytes=0;
}
#if ZEND_DEBUG
if (!silent && leak_count>1) {
- zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) leak_count-1);
+ zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) (leak_count-1));
}
#endif
}
unsigned int cached:1;
} mem_header;
-typedef union {
+typedef union _align_test {
void *ptr;
double dbl;
long lng;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
opline->op1 = *parent;
opline->op2 = *dim;
+ opline->extended_value = ZEND_FETCH_STANDARD;
*result = opline->result;
zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
{
list_llist_element lle;
- if(element) {
+ if (element) {
lle.var = *element;
zend_llist_copy(&lle.dimensions, &CG(dimension_llist));
zend_llist_add_element(&CG(list_llist), &lle);
void do_new_list_end(CLS_D)
{
-
zend_llist_remove_tail(&CG(dimension_llist));
(*((int *)CG(dimension_llist).tail->data))++;
}
opline->op2.u.constant.value.lval = *((int *) dimension->data);
opline->op2.u.constant.refcount = 1;
opline->op2.u.constant.is_ref = 0;
+ if (le == CG(list_llist).tail) {
+ opline->extended_value = ZEND_FETCH_STANDARD;
+ } else {
+ opline->extended_value = ZEND_FETCH_NO_AI_COUNT;
+ }
last_container = opline->result;
dimension = dimension->next;
}
opline->op2.op_type = IS_CONST;
opline->op2.u.constant.type = IS_LONG;
opline->op2.u.constant.value.lval = 0;
+ opline->extended_value = ZEND_FETCH_STANDARD; /* ignored in fetch_dim_tmp_var, but what the hell. */
result_value = opline->result;
if (key->op_type != IS_UNUSED) {
opline->op2.op_type = IS_CONST;
opline->op2.u.constant.type = IS_LONG;
opline->op2.u.constant.value.lval = 1;
+ opline->extended_value = ZEND_FETCH_STANDARD; /* ignored in fetch_dim_tmp_var, but what the hell. */
result_key = opline->result;
}
typedef struct _zend_op_array zend_op_array;
-typedef struct {
+typedef struct _znode {
int op_type;
union {
zval constant;
} zend_op;
-typedef struct {
+typedef struct _zend_brk_cont_element {
int cont;
int brk;
int parent;
};
-typedef struct {
+typedef struct _zend_internal_function {
int type; /* MUST be the first element of this struct! */
unsigned char *arg_types; /* MUST be the second element of this struct */
} zend_internal_function;
-typedef union {
+typedef union _zend_function {
int type; /* MUST be the first element of this struct! */
struct {
int type; /* never used */
} zend_function_state;
-typedef struct {
+typedef struct _zend_switch_entry {
znode cond;
int default_case;
int control_var;
} zend_switch_entry;
-typedef struct {
+typedef struct _list_llist_element {
znode var;
zend_llist dimensions;
znode value;
#define ZEND_DECLARE_CLASS 1
#define ZEND_DECLARE_FUNCTION 2
+#define ZEND_FETCH_STANDARD 0
+#define ZEND_FETCH_NO_AI_COUNT 1
+
#endif /* _COMPILE_H */
#define CONST_CS 0x1 /* Case Sensitive */
#define CONST_PERSISTENT 0x2
-typedef struct {
+typedef struct _zend_constant {
zval value;
int flags;
char *name;
zend_fetch_var_address(&opline->result, &opline->op1, &opline->op2, Ts, BP_VAR_IS ELS_CC);
break;
case ZEND_FETCH_DIM_R:
+ if (opline->extended_value == ZEND_FETCH_NO_AI_COUNT) {
+ EG(AiCount)++;
+ }
zend_fetch_dimension_address(&opline->result, &opline->op1, &opline->op2, Ts, BP_VAR_R ELS_CC);
break;
case ZEND_FETCH_DIM_W:
#include "zend_compile.h"
#include "zend_hash.h"
-typedef union {
+typedef union _temp_variable {
zval tmp_var;
zval **var;
struct {
fflush(stdout);
fflush(stderr);
signal(SIGSEGV, original_sigsegv_handler);
- fprintf(stderr, "SIGSEGV caught on opcode %d on opline %d of %s() at %s:%d\n\n",
- active_opline->opcode,
- active_opline-EG(active_op_array)->opcodes,
- get_active_function_name(),
- zend_get_executed_filename(),
- zend_get_executed_lineno());
+ /*
+ {
+ ELS_FETCH();
+
+ fprintf(stderr, "SIGSEGV caught on opcode %d on opline %d of %s() at %s:%d\n\n",
+ active_opline->opcode,
+ active_opline-EG(active_op_array)->opcodes,
+ get_active_function_name(),
+ zend_get_executed_filename(ELS_C),
+ zend_get_executed_lineno(ELS_C));
+ }
original_sigsegv_handler(dummy);
+ */
}
#define ZEND_EXTENSION_API_NO 2
-typedef struct {
+typedef struct _zend_extension_version_info {
int zend_extension_api_no;
char *required_zend_version;
unsigned char thread_safe;
#define HL_KEYWORD_COLOR "#007700" /* green */
-typedef struct {
+typedef struct _zend_syntax_highlighter_ini {
char *highlight_html;
char *highlight_comment;
char *highlight_default;
extern HashTable list_destructors;
-typedef struct {
+typedef struct _list_entry {
void *ptr;
int type;
int refcount;
} list_entry;
-typedef struct {
+typedef struct _list_destructors_entry {
void (*list_destructor)(void *);
void (*plist_destructor)(void *);
int module_number;
char data[1]; /* Needs to always be last in the struct */
} zend_llist_element;
-typedef struct {
+typedef struct _zend_llist {
zend_llist_element *head;
zend_llist_element *tail;
size_t size;
#ifndef _ZEND_PTR_STACK_H
#define _ZEND_PTR_STACK_H
-typedef struct {
+typedef struct _zend_ptr_stack {
short top, max;
void **elements;
void **top_element;
#ifndef _ZEND_STACK_H
#define _ZEND_STACK_H
-typedef struct {
+typedef struct _zend_stack {
int top, max;
void **elements;
} zend_stack;