cvs: ZendEngine2(PHP_5_0) / zend_compile.c zend_language_parser.y /tests bug30961.phpt php-src NEWS
| From: | Dmitry Stogov | Date: | Wed, 08 Jun 2005 06:48:40 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_0) / zend_compile.c zend_language_parser.y /tests bug30961.phpt php-src NEWS | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3753@lists.php.net to get a copy of this message | ||
dmitry Wed Jun 8 02:48:40 2005 EDT
Added files: (Branch: PHP_5_0)
/ZendEngine2/tests bug30961.phpt
Modified files:
/php-src NEWS
/ZendEngine2 zend_compile.c zend_language_parser.y
Log:
Fixed bug #30961 (Wrong linenumber in ReflectionClass getStartLine())
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.425&r2=1.1760.2.426&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.425 php-src/NEWS:1.1760.2.426
--- php-src/NEWS:1.1760.2.425 Tue Jun 7 14:07:51 2005
+++ php-src/NEWS Wed Jun 8 02:48:31 2005
@@ -125,6 +125,8 @@
serializer). (Dmitry)
- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
- Fixed bug #31363 (broken non-blocking flock()). ian at snork dot net
+- Fixed bug #30961 (Wrong linenumber in ReflectionClass getStartLine()).
+ (Dmitry)
- Fixed bug #30889 (Conflict between __get/__set and ++ operator). (Dmitry)
- Fixed bug #30833 (array_count_values() modifying input array). (Tony)
- Fixed bug #30819 (Better support for LDAP SASL bind). (Jani)
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.567.2.21&r2=1.567.2.22&ty=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.567.2.21 ZendEngine2/zend_compile.c:1.567.2.22
--- ZendEngine2/zend_compile.c:1.567.2.21 Tue Jun 7 14:07:52 2005
+++ ZendEngine2/zend_compile.c Wed Jun 8 02:48:37 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.567.2.21 2005/06/07 18:07:52 dmitry Exp $ */
+/* $Id: zend_compile.c,v 1.567.2.22 2005/06/08 06:48:37 dmitry Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -2502,8 +2502,8 @@
zend_initialize_class_data(new_class_entry, 1 TSRMLS_CC);
new_class_entry->filename = zend_get_compiled_filename(TSRMLS_C);
- new_class_entry->line_start = zend_get_compiled_lineno(TSRMLS_C);
- new_class_entry->ce_flags |= class_token->u.constant.value.lval;
+ new_class_entry->line_start = class_token->u.opline_num;
+ new_class_entry->ce_flags |= class_token->u.EA.type;
if (parent_class_name && parent_class_name->op_type != IS_UNUSED) {
doing_inheritance = 1;
http://cvs.php.net/diff.php/ZendEngine2/zend_language_parser.y?r1=1.144.2.2&r2=1.144.2.3&ty=u
Index: ZendEngine2/zend_language_parser.y
diff -u ZendEngine2/zend_language_parser.y:1.144.2.2 ZendEngine2/zend_language_parser.y:1.144.2.3
--- ZendEngine2/zend_language_parser.y:1.144.2.2 Thu Sep 16 01:44:39 2004
+++ ZendEngine2/zend_language_parser.y Wed Jun 8 02:48:38 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_parser.y,v 1.144.2.2 2004/09/16 05:44:39 sebastian Exp $ */
+/* $Id: zend_language_parser.y,v 1.144.2.3 2005/06/08 06:48:38 dmitry Exp $ */
/*
* LALR shift/reduce conflicts and how they are resolved:
@@ -291,9 +291,9 @@
class_entry_type:
- T_CLASS { $$.u.constant.value.lval = 0; }
- | T_ABSTRACT T_CLASS { $$.u.constant.value.lval = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
- | T_FINAL T_CLASS { $$.u.constant.value.lval = ZEND_ACC_FINAL_CLASS; }
+ T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = 0; }
+ | T_ABSTRACT T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type =
ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
+ | T_FINAL T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = ZEND_ACC_FINAL_CLASS; }
;
extends_from:
@@ -302,7 +302,7 @@
;
interface_entry:
- T_INTERFACE { $$.u.constant.value.lval = ZEND_ACC_INTERFACE; }
+ T_INTERFACE { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = ZEND_ACC_INTERFACE; }
;
interface_extends_list:
http://cvs.php.net/co.php/ZendEngine2/tests/bug30961.phpt?r=1.1&p=1
Index: ZendEngine2/tests/bug30961.phpt
+++ ZendEngine2/tests/bug30961.phpt