Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105513 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19292 invoked from network); 30 Apr 2019 08:42:39 -0000 Received: from unknown (HELO smtpproxy19.qq.com) (184.105.206.84) by pb1.pair.com with SMTP; 30 Apr 2019 08:42:39 -0000 X-QQ-mid:Yeas8t1556603076t694t35056 Received: from 90373548D78A4F9A84016F99F658592A (me@jhdxr.com [155.69.203.163]) X-QQ-SSF:00000000000000F0F61000000000000 To: "'David Rodrigues'" , "'PHP Internals'" References: In-Reply-To: Date: Tue, 30 Apr 2019 13:44:32 +0800 Message-ID: <01a401d4ff17$c9919900$5cb4cb00$@jhdxr.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: en-us Thread-Index: AQNHDxik+1mmIs4jqHHZn8DshgSDtqNwCkVA X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:jhdxr.com:qybgforeign:qybgforeign4 X-QQ-Bgrelay: 1 Subject: RE: [PHP-DEV] TCO: Tail Call Optimization From: me@jhdxr.com (=?utf-8?b?Q0hVIFpoYW93ZWk=?=) Hi David, TCO modifies the call stack, which means features relying on it are not = reliable any more, e.g. debug_backtrace, stack trace of an exception, = etc. As a result, ES6 only ask to enable TCO in strict mode, which = dropped support for func.arguments and func.caller. PHP don't have = similar concept yet. In addition, if you check the compatibility for = TCO, you will realize only safari provides support for it now. Regards, CHU Zhaowei =20 > -----Original Message----- > From: David Rodrigues > Sent: Sunday, April 28, 2019 2:48 AM > To: PHP Internals > Subject: [PHP-DEV] TCO: Tail Call Optimization >=20 > Not long ago I heard about the Tail Call Optimization from ES6. It = seemed > obscure to me at first, but once I understood the benefit of having = it, it > seemed like a good idea of optimization for PHP to avoid recursion = problems. >=20 > Is there any plan to make it possible in the engine? > -- > David Rodrigues