Hi Yo-An Lin, Unfortunately, this approach won't work. At first, at compile time we don't know the body of called getter. At second, the called method might be changed even at run-time, because of polymorphism.
Tricks like this might be implemented using JIT and polymorphic inline caches. Thanks. Dmitry. ________________________________________ From: Lin Yo-An <cornelius.h...@gmail.com> Sent: Friday, March 18, 2016 05:23 To: internals Subject: [PHP-DEV] Object getter method optimization Hello Everyone, I am recently trying to write an optimizer that could optimize the getter method call into just one object fetch opcode. I'd like to know thoughts from you guys, here is the note: https://c9s.hackpad.com/INLINE-OP-TVGo9WcshbZ -- Best Regards, Yo-An Lin https://github.com/c9s -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php