Bug #55695 [Asn->Wfx]: Compiler create unused opline(NOP)
| From: | dmitry@php.net | Date: | Thu, 15 Sep 2011 09:44:44 +0000 |
| Subject: | Bug #55695 [Asn->Wfx]: Compiler create unused opline(NOP) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163552@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55695&edit=1
ID: 55695
Updated by: dmitry@php.net
Reported by: laruence@php.net
Summary: Compiler create unused opline(NOP)
-Status: Assigned
+Status: Wont fix
Type: Bug
Package: Scripting Engine problem
PHP Version: trunk-SVN-2011-09-14 (SVN)
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
PHP Compiler is targeted to be fast.
ZE allows to plug another compilers, opcode caches and optimizers to improve the code quality if
it's necessary.
The cost of a NOP instruction is invisible, so I don't think it makes sense to invest into it.
Previous Comments:
------------------------------------------------------------------------
[2011-09-14 15:34:14] laruence@php.net
Dmitry, as I said in #55673, sorry for that mis-fix, heh, anyway, I report this to you, you can mark
simply it as won't fix :)
------------------------------------------------------------------------
[2011-09-14 15:32:52] laruence@php.net
The following patch has been added/updated:
Patch Name: bug55695.diff
Revision: 1316014372
URL: https://bugs.php.net/patch-display.php?bug=55695&patch=bug55695.diff&revision=1316014372
------------------------------------------------------------------------
[2011-09-14 15:32:17] laruence@php.net
Description:
------------
When having the following code:
<?php
class foo {
function bar() {
self::$bar = 42;
}
}
?>
The compiler generates compiled a totally unused NOP opline:
$ php -dvld.active=1 -r 'class foo { function bar() { self::$bar = 42; } }'
Finding entry points
Branch analysis from position: 0
Return found
filename: Command line code
function name: (null)
number of ops: 2
compiled vars: none
line # * op fetch ext return operands
---------------------------------------------------------------------------------
1 0 > NOP
1 > RETURN null
branch: # 0; line: 1- 1; sop: 0; eop: 1
path #1: 0,
Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
Return found
filename: Command line code
function name: bar
number of ops: 4
compiled vars: !0 = $bar
line # * op fetch ext return operands
---------------------------------------------------------------------------------
0 > ZEND_FETCH_CLASS 1
1 FETCH_W static member $1 'bar'
2 ASSIGN $1, 42
3 > RETURN null
branch: # 0; line: 1- 1; sop: 0; eop: 3
path #1: 0,
End of function bar.
Test script:
---------------
no
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55695&edit=1