Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39544 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93473 invoked from network); 1 Aug 2008 15:01:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Aug 2008 15:01:59 -0000 Authentication-Results: pb1.pair.com header.from=stefan.esser@sektioneins.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=stefan.esser@sektioneins.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sektioneins.de from 85.214.103.31 cause and error) X-PHP-List-Original-Sender: stefan.esser@sektioneins.de X-Host-Fingerprint: 85.214.103.31 h1332034.stratoserver.net Linux 2.6 Received: from [85.214.103.31] ([85.214.103.31:17484] helo=h1332034.stratoserver.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DE/8A-39007-56523984 for ; Fri, 01 Aug 2008 11:01:58 -0400 Received: from Very-Black-Mac.lan (port-87-193-248-162.static.qsc.de [87.193.248.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by h1332034.stratoserver.net (Postfix) with ESMTP id D735BA245AA; Fri, 1 Aug 2008 16:57:37 +0200 (CEST) Message-ID: <48932589.2090100@sektioneins.de> Date: Fri, 01 Aug 2008 17:02:33 +0200 User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Dmitry Stogov CC: PHP Internals List References: <4890CC7A.6060303@sektioneins.de> <416879664.20080801004706@marcus-boerger.de> <4892F46A.1060008@zend.com> <4892F813.6050402@sektioneins.de> <4892FB94.5030107@zend.com> <48930B84.80305@sektioneins.de> <489323A7.8040006@zend.com> In-Reply-To: <489323A7.8040006@zend.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Switch Table Extension for PHP From: stefan.esser@sektioneins.de (Stefan Esser) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, > The idea also won't work with variables and unresolved constants as > "case" labels (I saw your extension already carries about this limitation). Yeah constants are the reason why I perform the optimization at runtime. Because the moment a switch is executed the constants should be available, because otherwise the switch() does not make sense. And at that point the constant cannot change anymore. That is the reason why compiletime / optimization time optimization is a problem. And yes variables and function calls in CASEs are a problem. That is why I am not supporting them (and will not). After all there are people that "abuse" switch() as OR. Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkiTJYkACgkQSuF5XhWr2niH/gCfVhl1xoED9IdEUUPvUgKlxtaI 31gAoJdnpFssybdbqfwYC8XUDpMdfUWY =8mem -----END PGP SIGNATURE-----