We're definately on the same page as far as implementation goals, but I
can't help but notice one problem:
* labels aren't scoped to functions. The break container checks prevent
casual jumping, but:
FOO: do { } while (0);
function bar() {
do { break FOO; } while (0);
}
Actually compiles legally. Of course the actual break stays within its
local container, but if/when Jump is introduced to the mix....well... all
bets are off...
-Sara
----- Original Message -----
From: "Dmitry Stogov" <[EMAIL PROTECTED]>
To: "'Sara Golemon'" <[EMAIL PROTECTED]>; <internals@lists.php.net>
Cc: "Zeev Suraski" <[EMAIL PROTECTED]>; "Stanislav Malyshev" <[EMAIL PROTECTED]>
Sent: Thursday, December 01, 2005 2:45 AM
Subject: RE: [PHP-DEV] Labeled Break (nothing at all whatsoever to do
withGOTO)
Hi Sara,
I made another patch that is based on your ideas.
1) It uses "right" syntax:
LABEL: while(1) {
break LABEL;
}
2) It doesn't allow usage of same label for different loops
L1: while(1) {...}
L1: while(1) {...}
3) It doesn't use executor data structures
4) It allows reuse of same labels for jump/goto (as was done in your first
patch).
It already declares "jump LABEL;" operator but emits error for now.
I think this patch can be committed and then we can discuss jump/goto.
Thanks. Dmitry.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php