From: Nicholas Clark Date: Wed, 5 Jan 2005 20:14:02 +0000 (+0000) Subject: Error-free constant folding is a TODO X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6168cf9995a8bfcfe4ab9350ebc7de70215ae9af;p=p5sagit%2Fp5-mst-13.2.git Error-free constant folding is a TODO p4raw-id: //depot/perl@23754 --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index e44f242..5479568 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -184,6 +184,13 @@ Clean these up. Move them to mathom.c, and don't compile for blead? The old perltodo notes "This has been done in places, but needs a thorough code review. Also fchdir is available in some platforms." +=head2 Constant folding + +The peephole optimiser should trap errors during constant folding, and give +up on the folding, rather than bailing out at compile time. It is quite +possible that the unfoldable constant is in unreachable code, eg something +akin to C<$a = 0/0 if 0;> + =head1 Tests =head2 Make Schwern poorer