Req #55673 [Asn->Csd]: Compiler creates (unused) compiled variables for self::$foo

From: Date: Sat, 21 Mar 2015 20:48:24 +0000
Subject: Req #55673 [Asn->Csd]: Compiler creates (unused) compiled variables for self::$foo
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191515@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55673&edit=1

 ID:                 55673
 Updated by:         nikic@php.net
 Reported by:        derick@php.net
 Summary:            Compiler creates (unused) compiled variables for
                     self::$foo
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Scripting Engine problem
 Operating System:   *
 PHP Version:        5.3SVN-2011-09-12 (SVN)
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

Should be fixed in PHP 7 by AST.


Previous Comments:
------------------------------------------------------------------------
[2011-09-15 09:47:33] dmitry@php.net

yeah. the fix requires significant modification of grammar and compiler.
It would be good to fix it, but I'm not sure it costs the time.
In general it's not a bug, but a feature request.

------------------------------------------------------------------------
[2011-09-15 03:59:43] laruence@php.net

this cv is created in fetch_simple_variable_ex,  and fetch_simple_variable_ex is used by a lot of
logic, so I think we should alter the parse.y to make the class::$static_member not to denpend on a
reference_variable.  I have tried, but bring in new reduce conflict.

------------------------------------------------------------------------
[2011-09-14 15:29:34] laruence@php.net

I'd better to report another one about the NOP opline, sorry agian.

------------------------------------------------------------------------
[2011-09-14 15:24:23] laruence@php.net

OOPS!, I must lost my mind, what I was doing is erease NOP opline(god know How can I read this bug
as "REMOVE UNUSED NOP" opline)....

sorry, but maybe this patch is also a litte useful...

------------------------------------------------------------------------
[2011-09-14 15:10:14] laruence@php.net

I have made a patch for this, and make whole test after patched. made sure that there is no new test
failed after patched.
TEST RESULT:
trunk: http://pastebin.com/gMYc2Fp5
5.4branch: http://pastebin.com/7EePEE43
5.3branch: http://pastebin.com/m4wirXjr

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=55673


--
Edit this bug report at https://bugs.php.net/bug.php?id=55673&edit=1


Thread (9 messages)

« previous php.bugs (#191515) next »