Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up last/size definitions

  • Loading branch information...
commit 232b90454f2858aa69712426d717e7fb64ebd774 1 parent 897b413
@zsuraski zsuraski authored
View
6 Zend/zend-parser.y
@@ -268,9 +268,9 @@ switch_case_list:
case_list:
- /* empty */ { $$.u.opline_num = -1; }
- | case_list T_CASE expr case_separator { do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); }
- | case_list T_DEFAULT case_separator { do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); }
+ /* empty */ { $$.op_type = IS_UNUSED; }
+ | case_list T_CASE expr case_separator { do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
+ | case_list T_DEFAULT case_separator { do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
;
View
2  Zend/zend_compile.c
@@ -1385,7 +1385,7 @@ void do_case_before_statement(znode *case_list, znode *case_token, znode *case_e
SET_UNUSED(opline->op2);
case_token->u.opline_num = next_op_number;
- if (case_list->u.opline_num==-1) {
+ if (case_list->op_type==IS_UNUSED) {
return;
}
next_op_number = get_next_op_number(CG(active_op_array));
View
4 Zend/zend_compile.h
@@ -59,7 +59,7 @@ typedef struct _znode {
zval constant;
zend_uint var;
- int opline_num; /* Needs to be signed */
+ zend_uint opline_num; /* Needs to be signed */
zend_uchar fetch_type;
zend_op_array *op_array;
struct {
@@ -97,7 +97,7 @@ struct _zend_op_array {
zend_uint *refcount;
zend_op *opcodes;
- int last, size;
+ zend_uint last, size;
zend_uint T;
View
2  Zend/zend_execute.h
@@ -38,6 +38,8 @@ typedef union _temp_variable {
zval *str;
int offset;
} str_offset;
+// struct {
+// } overloaded_object;
} data;
unsigned char type;
Please sign in to comment.
Something went wrong with that request. Please try again.