Permalink
Browse files

Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport

Merging master to fix Windows build

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
  • Loading branch information...
2 parents 9003cd1 + 9ccf854 commit 1823b16fa15894f72fc01724766289dbecf5a62a @nikic nikic committed Aug 20, 2012
Showing with 2,810 additions and 1,482 deletions.
  1. +7 −0 NEWS
  2. +3 −1 UPGRADING
  3. +1 −1 Zend/tests/try_catch_finally_002.phpt
  4. +1 −1 Zend/tests/try_catch_finally_003.phpt
  5. +1 −1 Zend/tests/try_catch_finally_004.phpt
  6. +14 −0 Zend/tests/try_finally_004.phpt
  7. +17 −0 Zend/tests/try_finally_005.phpt
  8. +26 −0 Zend/tests/try_finally_006.phpt
  9. +22 −0 Zend/tests/try_finally_007.phpt
  10. +21 −0 Zend/tests/try_finally_008.phpt
  11. +23 −0 Zend/tests/try_finally_009.phpt
  12. +0 −2 Zend/zend_API.c
  13. +19 −26 Zend/zend_compile.c
  14. +5 −2 Zend/zend_compile.h
  15. +1 −3 Zend/zend_globals.h
  16. +0 −2 Zend/zend_highlight.c
  17. +11 −11 Zend/zend_language_parser.y
  18. +385 −379 Zend/zend_language_scanner.c
  19. +5 −0 Zend/zend_language_scanner.h
  20. +40 −34 Zend/zend_language_scanner.l
  21. +1 −1 Zend/zend_language_scanner_defs.h
  22. +40 −0 Zend/zend_opcode.c
  23. +5 −0 Zend/zend_ptr_stack.h
  24. +182 −182 Zend/zend_vm_def.h
  25. +610 −610 Zend/zend_vm_execute.h
  26. +2 −2 ext/curl/interface.c
  27. +18 −0 ext/curl/tests/bug62839.phpt
  28. +4 −4 ext/curl/tests/curl_basic_022.phpt
  29. +12 −4 ext/date/php_date.c
  30. +15 −0 ext/date/tests/bug62852.phpt
  31. +2 −2 ext/dom/element.c
  32. +1 −2 ext/enchant/enchant.c
  33. +1 −1 ext/exif/tests/bug60150.phpt
  34. +30 −0 ext/intl/symfony_format_type_double_intl1.phpt
  35. +30 −0 ext/intl/symfony_format_type_double_intl2.phpt
  36. +30 −0 ext/intl/symfony_format_type_double_intl3.phpt
  37. +30 −0 ext/intl/symfony_format_type_double_intl4.phpt
  38. +49 −0 ext/intl/symfony_format_type_int32_intl1.phpt
  39. +33 −0 ext/intl/symfony_format_type_int32_intl2.phpt
  40. +32 −0 ext/intl/symfony_format_type_int32_intl3.phpt
  41. +30 −0 ext/intl/symfony_format_type_int32_intl4.phpt
  42. +30 −0 ext/intl/symfony_format_type_int32_intl5.phpt
  43. +32 −0 ext/intl/symfony_format_type_int32_intl6.phpt
  44. +32 −0 ext/intl/symfony_format_type_int32_intl7.phpt
  45. +30 −0 ext/intl/symfony_format_type_int64_intl1.phpt
  46. +30 −0 ext/intl/symfony_format_type_int64_intl2.phpt
  47. +30 −0 ext/intl/symfony_format_type_int64_intl3.phpt
  48. +30 −0 ext/intl/symfony_format_type_int64_intl4.phpt
  49. +30 −0 ext/intl/symfony_format_type_int64_intl5.phpt
  50. +30 −0 ext/intl/symfony_format_type_int64_intl6.phpt
  51. +30 −0 ext/intl/symfony_format_type_int64_intl7.phpt
  52. +30 −0 ext/intl/symfony_format_type_int64_intl8.phpt
  53. +1 −0 ext/intl/tests/breakiter___construct.phpt
  54. +4 −0 ext/intl/tests/breakiter_clone_basic.phpt
  55. +4 −0 ext/intl/tests/breakiter_current_basic.phpt
  56. +1 −0 ext/intl/tests/breakiter_factories_basic.phpt
  57. +4 −0 ext/intl/tests/breakiter_factories_error.phpt
  58. +1 −0 ext/intl/tests/breakiter_first_basic.phpt
  59. +4 −0 ext/intl/tests/breakiter_first_last_previous_current_error.phpt
  60. +4 −0 ext/intl/tests/breakiter_following_basic.phpt
  61. +4 −0 ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt
  62. +4 −0 ext/intl/tests/breakiter_getLocale_basic.phpt
  63. +4 −0 ext/intl/tests/breakiter_getLocale_error.phpt
  64. +4 −0 ext/intl/tests/breakiter_getPartsIterator_basic.phpt
  65. +1 −0 ext/intl/tests/breakiter_getText_basic.phpt
  66. +4 −0 ext/intl/tests/breakiter_getText_error.phpt
  67. +4 −0 ext/intl/tests/breakiter_isBoundary_basic.phpt
  68. +1 −0 ext/intl/tests/breakiter_last_basic.phpt
  69. +4 −0 ext/intl/tests/breakiter_next_basic.phpt
  70. +4 −0 ext/intl/tests/breakiter_next_error.phpt
  71. +4 −0 ext/intl/tests/breakiter_preceding_basic.phpt
  72. +4 −0 ext/intl/tests/breakiter_previous_basic.phpt
  73. +1 −0 ext/intl/tests/breakiter_setText_basic.phpt
  74. +4 −0 ext/intl/tests/breakiter_setText_error.phpt
  75. +4 −0 ext/intl/tests/dateformat___construct_bad_tz_cal.phpt
  76. +4 −0 ext/intl/tests/dateformat_create_cal_arg.phpt
  77. +4 −0 ext/intl/tests/dateformat_getCalendarObject_error.phpt
  78. +4 −0 ext/intl/tests/dateformat_getTimeZone_error.phpt
  79. +4 −0 ext/intl/tests/dateformat_get_set_calendar.phpt
  80. +4 −0 ext/intl/tests/dateformat_get_set_timezone.phpt
  81. +4 −0 ext/intl/tests/dateformat_setTimeZoneID_deprecation.phpt
  82. +4 −0 ext/intl/tests/dateformat_setTimeZone_error.phpt
  83. +4 −0 ext/intl/tests/dateformat_timezone_arg_variations.phpt
  84. +4 −0 ext/intl/tests/rbbiter___construct_basic.phpt
  85. +4 −0 ext/intl/tests/rbbiter_getRuleStatusVec_basic.phpt
  86. +4 −0 ext/intl/tests/rbbiter_getRuleStatus_basic.phpt
  87. +4 −0 ext/intl/tests/rbbiter_getRules_basic.phpt
  88. +2 −2 ext/json/tests/pass001.1_64bit.phpt
  89. +3 −3 ext/mcrypt/mcrypt.c
  90. +6 −0 ext/mcrypt/tests/mcrypt_cbc.phpt
  91. +14 −0 ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt
  92. +14 −0 ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt
  93. +4 −0 ext/mcrypt/tests/mcrypt_cbc_error.phpt
  94. +26 −0 ext/mcrypt/tests/mcrypt_cbc_variation1.phpt
  95. +26 −1 ext/mcrypt/tests/mcrypt_cbc_variation2.phpt
  96. +26 −1 ext/mcrypt/tests/mcrypt_cbc_variation3.phpt
  97. +27 −1 ext/mcrypt/tests/mcrypt_cbc_variation4.phpt
  98. +26 −0 ext/mcrypt/tests/mcrypt_cbc_variation5.phpt
  99. +9 −3 ext/mcrypt/tests/{mcrypt_cbf.phpt → mcrypt_cfb.phpt}
  100. +4 −4 ext/mcrypt/tests/mcrypt_create_iv.phpt
  101. +6 −0 ext/mcrypt/tests/mcrypt_ecb.phpt
  102. +3 −1 ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
  103. +2 −0 ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
  104. +2 −0 ext/mcrypt/tests/mcrypt_ecb_error.phpt
  105. +3 −1 ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
  106. +3 −1 ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
  107. +3 −1 ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
  108. +3 −1 ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
  109. +3 −1 ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
  110. +8 −2 ext/mcrypt/tests/mcrypt_ofb.phpt
  111. +19 −1 ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt
  112. +0 −93 ext/mysqli/tests/connect.inc
  113. +13 −9 ext/mysqli/tests/mysqli_fetch_field.phpt
  114. +12 −9 ext/mysqli/tests/mysqli_fetch_field_oo.phpt
  115. +13 −7 ext/mysqli/tests/mysqli_fetch_fields.phpt
  116. +13 −9 ext/mysqli/tests/mysqli_field_seek.phpt
  117. +13 −8 ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
  118. +1 −1 ext/oci8/tests/bind_char_2_11gR1.phpt
  119. +1 −1 ext/oci8/tests/bind_char_3_11gR1.phpt
  120. +1 −1 ext/oci8/tests/bind_char_4_11gR1.phpt
  121. +28 −25 ext/oci8/tests/details.inc
  122. +3 −0 ext/oci8/tests/pecl_bug10194_blob.phpt
  123. +1 −0 ext/oci8/tests/xmltype_01.phpt
  124. +0 −2 ext/phar/util.c
  125. +15 −2 ext/session/mod_user.c
  126. +0 −2 ext/session/tests/bug60634_error_5.phpt
  127. +0 −1 ext/spl/spl_directory.c
  128. +8 −0 ext/standard/credits.c
  129. +1 −1 ext/standard/info.c
  130. +0 −1 ext/standard/pack.c
  131. +0 −1 ext/standard/string.c
  132. +2 −2 ext/standard/tests/php_ini_loaded_file.phpt
  133. +34 −0 ext/standard/tests/serialize/bug62836_1.phpt
  134. +37 −0 ext/standard/tests/serialize/bug62836_2.phpt
  135. +3 −0 ext/standard/tests/strings/str_pad_variation5.phpt
  136. +11 −0 ext/standard/tests/url/parse_url_relative_scheme.phpt
  137. +6 −4 ext/standard/url.c
  138. +6 −0 ext/standard/var_unserializer.c
  139. +121 −0 ext/tokenizer/tests/bug60097.phpt
  140. +1 −4 ext/tokenizer/tokenizer.c
  141. +3 −1 ext/tokenizer/tokenizer_data.c
  142. +2 −2 sapi/cgi/tests/apache_request_headers.phpt
  143. +4 −1 sapi/cli/php_http_parser.h
View
7 NEWS
@@ -55,6 +55,10 @@ PHP NEWS
- Hash
. Added support for PBKDF2 via hash_pbkdf2(). (Anthony Ferrara)
+- MCrypt
+ . mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw
+ E_DEPRECATED. (GoogleGuy)
+
- MySQLi
. Dropped support for LOAD DATA LOCAL INFILE handlers when using libmysql.
Known for stability problems. (Andrey)
@@ -66,6 +70,9 @@ PHP NEWS
- pgsql
. Added pg_escape_literal() and pg_escape_identifier() (Yasuo)
+- Tokenizer:
+ . Fixed bug #60097 (token_get_all fails to lex nested heredoc). (Nikita Popov)
+
- Zip:
. Upgraded libzip to 0.10.1 (Anatoliy)
View
@@ -98,7 +98,9 @@ PHP X.Y UPGRADE NOTES
instead.
- IntlDateFormatter::format() and datefmt_format() now also accept an
IntlCalendar object for formatting.
-- Deprecated mcrypt_ecb() made to produce E_DEPRECATED.
+- mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw
+ E_DEPRECATED. Their use was already previously discouraged in the docs,
+ but that predated the existence of E_DEPRECATED.
- php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid() and
zend_logo_guid() have been removed
@@ -1,5 +1,5 @@
--TEST--
-Try catch finally
+Try catch finally catch(multi catch blocks)
--FILE--
<?php
@@ -1,5 +1,5 @@
--TEST--
-Try catch finally
+Try catch finally (multi catch blocks with return)
--FILE--
<?php
@@ -1,5 +1,5 @@
--TEST--
-Try catch finally
+Try catch finally (re-throw exception in catch block)
--CREDITS--
adoy
--FILE--
@@ -0,0 +1,14 @@
+--TEST--
+Try without catch/finally block
+--FILE--
+<?php
+function foo () {
+ try {
+ echo "3";
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: Cannot use try without catch or finally in %stry_finally_004.php on line %d
@@ -0,0 +1,17 @@
+--TEST--
+Finally with long goto
+--FILE--
+<?php
+function foo () {
+ try {
+ } finally {
+ goto label;
+ }
+label:
+ return 1;
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: jump out of a finally block is disallowed in %stry_finally_005.php on line %d
@@ -0,0 +1,26 @@
+--TEST--
+Finally with near goto
+--FILE--
+<?php
+function foo () {
+ $jmp = 1;
+ try {
+ } finally {
+previous:
+ if ($jmp) {
+ goto label;
+ echo "dummy";
+label:
+ echo "label\n";
+ $jmp = 0;
+ goto previous;
+ }
+ echo "okey";
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+label
+okey
@@ -0,0 +1,22 @@
+--TEST--
+Finally with goto previous label
+--FILE--
+<?php
+function foo () {
+ try {
+label:
+ echo "label";
+ try {
+ } finally {
+ goto label;
+ echo "dummy";
+ }
+ } catch (Exception $e) {
+ } finally {
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: jump out of a finally block is disallowed in %stry_finally_007.php on line %d
@@ -0,0 +1,21 @@
+--TEST--
+Finally with jmp (do while)
+--FILE--
+<?php
+function foo () {
+ do {
+ try {
+ try {
+ } finally {
+ break;
+ }
+ } catch (Exception $e) {
+ } finally {
+ }
+ } while (0);
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: jump out of a finally block is disallowed in %stry_finally_008.php on line %d
@@ -0,0 +1,23 @@
+--TEST--
+Finally with jmp (for continue)
+--FILE--
+<?php
+function foo () {
+ for($i = 0; $i < 5; $i++) {
+ do {
+ try {
+ try {
+ } finally {
+ }
+ } catch (Exception $e) {
+ } finally {
+ continue;
+ }
+ } while (0);
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: jump out of a finally block is disallowed in %stry_finally_009.php on line %d
View
@@ -2651,11 +2651,9 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
/* Skip leading \ */
if (Z_STRVAL_P(callable)[0] == '\\') {
mlen = Z_STRLEN_P(callable) - 1;
- mname = Z_STRVAL_P(callable) + 1;
lmname = zend_str_tolower_dup(Z_STRVAL_P(callable) + 1, mlen);
} else {
mlen = Z_STRLEN_P(callable);
- mname = Z_STRVAL_P(callable);
lmname = zend_str_tolower_dup(Z_STRVAL_P(callable), mlen);
}
/* Check if function with given name exists.
View
@@ -2732,6 +2732,7 @@ static int zend_add_try_element(zend_uint try_op TSRMLS_DC) /* {{{ */
CG(active_op_array)->try_catch_array = erealloc(CG(active_op_array)->try_catch_array, sizeof(zend_try_catch_element)*CG(active_op_array)->last_try_catch);
CG(active_op_array)->try_catch_array[try_catch_offset].try_op = try_op;
CG(active_op_array)->try_catch_array[try_catch_offset].finally_op = 0;
+ CG(active_op_array)->try_catch_array[try_catch_offset].finally_end = 0;
return try_catch_offset;
}
/* }}} */
@@ -2792,7 +2793,7 @@ void zend_do_try(znode *try_token TSRMLS_DC) /* {{{ */
/* }}} */
void zend_do_finally(znode *finally_token TSRMLS_DC) /* {{{ */ {
- finally_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
+ finally_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
} /* }}} */
void zend_do_begin_catch(znode *catch_token, znode *class_name, znode *catch_var, znode *first_catch TSRMLS_DC) /* {{{ */
@@ -2846,34 +2847,29 @@ void zend_do_end_catch(znode *catch_token TSRMLS_DC) /* {{{ */
/* }}} */
void zend_do_bind_catch(znode *try_token, znode *catch_token TSRMLS_DC) /* {{{ */ {
- if (catch_token->op_type != IS_UNUSED) {
- zend_add_catch_element(try_token->u.op.opline_num, catch_token->EA TSRMLS_CC);
- }
+ if (catch_token->op_type != IS_UNUSED) {
+ zend_add_catch_element(try_token->u.op.opline_num, catch_token->EA TSRMLS_CC);
+ }
}
/* }}} */
-
void zend_do_end_finally(znode *try_token, znode* catch_token, znode *finally_token TSRMLS_DC) /* {{{ */
{
- zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
-
- if (catch_token->op_type == IS_UNUSED && finally_token->op_type == IS_UNUSED) {
- zend_error(E_COMPILE_ERROR, "Cannot use try without catch or finally");
- }
- if (finally_token->op_type != IS_UNUSED) {
- CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].finally_op = finally_token->u.op.opline_num;
- //try_token->u.op.opline_num = catch_token->u.op.opline_num;
-
- opline->opcode = ZEND_LEAVE;
- SET_UNUSED(opline->op1);
- SET_UNUSED(opline->op2);
- }
- if (catch_token->op_type == IS_UNUSED) {
- CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].catch_op = 0;
- } //else {
- // try_token->u.op.opline_num = catch_token->u.op.opline_num;
- //}
+ if (catch_token->op_type == IS_UNUSED && finally_token->op_type == IS_UNUSED) {
+ zend_error(E_COMPILE_ERROR, "Cannot use try without catch or finally");
+ }
+ if (finally_token->op_type != IS_UNUSED) {
+ zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].finally_op = finally_token->u.op.opline_num;
+ CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].finally_end = get_next_op_number(CG(active_op_array));
+ opline->opcode = ZEND_LEAVE;
+ SET_UNUSED(opline->op1);
+ SET_UNUSED(opline->op2);
+ }
+ if (catch_token->op_type == IS_UNUSED) {
+ CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].catch_op = 0;
+ }
}
/* }}} */
@@ -6823,9 +6819,6 @@ int zendlex(znode *zendlval TSRMLS_DC) /* {{{ */
case T_OPEN_TAG_WITH_ECHO:
retval = T_ECHO;
break;
- case T_END_HEREDOC:
- efree(Z_STRVAL(zendlval->u.constant));
- break;
}
INIT_PZVAL(&zendlval->u.constant);
View
@@ -80,7 +80,7 @@ typedef union _znode_op {
zend_op *jmp_addr;
zval *zv;
zend_literal *literal;
- void *ptr; /* Used for passing pointers from the compile to execution phase, currently used for traits */
+ void *ptr; /* Used for passing pointers from the compile to execution phase, currently used for traits */
} znode_op;
typedef struct _znode { /* used only during compilation */
@@ -132,7 +132,8 @@ typedef struct _zend_label {
typedef struct _zend_try_catch_element {
zend_uint try_op;
zend_uint catch_op; /* ketchup! */
- zend_uint finally_op;
+ zend_uint finally_op;
+ zend_uint finally_end;
} zend_try_catch_element;
#if SIZEOF_LONG == 8
@@ -502,6 +503,8 @@ void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC);
void zend_do_try(znode *try_token TSRMLS_DC);
void zend_do_begin_catch(znode *try_token, znode *catch_class, znode *catch_var, znode *first_catch TSRMLS_DC);
void zend_do_end_catch(znode *catch_token TSRMLS_DC);
+void zend_do_finally(znode *finally_token TSRMLS_DC);
+void zend_do_end_finally(znode *try_token, znode* catch_token, znode *finally_token TSRMLS_DC);
void zend_do_throw(const znode *expr TSRMLS_DC);
ZEND_API int do_bind_function(const zend_op_array *op_array, zend_op *opline, HashTable *function_table, zend_bool compile_time);
View
@@ -89,9 +89,6 @@ struct _zend_compiler_globals {
int zend_lineno;
- char *heredoc;
- int heredoc_len;
-
zend_op_array *active_op_array;
HashTable *function_table; /* function symbol table */
@@ -297,6 +294,7 @@ struct _zend_php_scanner_globals {
unsigned char *yy_limit;
int yy_state;
zend_stack state_stack;
+ zend_ptr_stack heredoc_label_stack;
/* original (unfiltered) script */
unsigned char *script_org;
View
@@ -153,8 +153,6 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
efree(token.value.str.val);
break;
}
- } else if (token_type == T_END_HEREDOC) {
- efree(token.value.str.val);
}
token.type = 0;
}
@@ -318,23 +318,23 @@ unticked_statement:
| T_DECLARE { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(&$1 TSRMLS_CC); }
| ';' /* empty statement */
| T_TRY { zend_do_try(&$1 TSRMLS_CC); } '{' inner_statement_list '}'
- catch_statement { zend_do_bind_catch(&$1, &$6 TSRMLS_CC); }
- finally_statement { zend_do_end_finally(&$1, &$6, &$8 TSRMLS_CC); }
+ catch_statement { zend_do_bind_catch(&$1, &$6 TSRMLS_CC); }
+ finally_statement { zend_do_end_finally(&$1, &$6, &$8 TSRMLS_CC); }
| T_THROW expr ';' { zend_do_throw(&$2 TSRMLS_CC); }
| T_GOTO T_STRING ';' { zend_do_goto(&$2 TSRMLS_CC); }
;
catch_statement:
- /* empty */ { $$.op_type = IS_UNUSED; }
- | T_CATCH '(' { zend_initialize_try_catch_element(&$1 TSRMLS_CC); }
- fully_qualified_class_name { zend_do_first_catch(&$2 TSRMLS_CC); }
- T_VARIABLE ')' { zend_do_begin_catch(&$1, &$4, &$6, &$2 TSRMLS_CC); }
+ /* empty */ { $$.op_type = IS_UNUSED; }
+ | T_CATCH '(' { zend_initialize_try_catch_element(&$1 TSRMLS_CC); }
+ fully_qualified_class_name { zend_do_first_catch(&$2 TSRMLS_CC); }
+ T_VARIABLE ')' { zend_do_begin_catch(&$1, &$4, &$6, &$2 TSRMLS_CC); }
'{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
additional_catches { zend_do_mark_last_catch(&$2, &$13 TSRMLS_CC); $$ = $1;}
finally_statement:
- /* empty */ { $$.op_type = IS_UNUSED; }
- | T_FINALLY { zend_do_finally(&$1 TSRMLS_CC); } '{' inner_statement_list '}' { $$ = $1; }
+ /* empty */ { $$.op_type = IS_UNUSED; }
+ | T_FINALLY { zend_do_finally(&$1 TSRMLS_CC); } '{' inner_statement_list '}' { $$ = $1; }
;
additional_catches:
@@ -938,8 +938,8 @@ common_scalar:
| T_METHOD_C { $$ = $1; }
| T_FUNC_C { $$ = $1; }
| T_NS_C { $$ = $1; }
- | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); }
- | T_START_HEREDOC T_END_HEREDOC { ZVAL_EMPTY_STRING(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); }
+ | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; }
+ | T_START_HEREDOC T_END_HEREDOC { ZVAL_EMPTY_STRING(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; }
;
@@ -968,7 +968,7 @@ scalar:
| T_NS_SEPARATOR namespace_name { char *tmp = estrndup(Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL($2.u.constant)); Z_STRVAL($2.u.constant) = tmp; ++Z_STRLEN($2.u.constant); zend_do_fetch_constant(&$$, NULL, &$2, ZEND_RT, 0 TSRMLS_CC); }
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
- | T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); }
+ | T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; }
| T_CLASS_C { if (Z_TYPE($1.u.constant) == IS_CONSTANT) {zend_do_fetch_constant(&$$, NULL, &$1, ZEND_RT, 1 TSRMLS_CC);} else {$$ = $1;} }
;
Oops, something went wrong.

0 comments on commit 1823b16

Please sign in to comment.