Sam Tregar:
# On Fri, 26 Oct 2001, Brent Dax wrote:
#
# > What if I want my compiler to be lazy?  Do you have the
# right to punish
# > me for my laziness by making me add constant folding to my
# optimizer (or
# > perhaps making me *write* an optimizer just to do constant folding)?
#
# Actually, a really lazy compiler will never use constants
# with anything
# other than "set"!  See the scheme compiler posted here last week for a
# good example.

Not by babyperl's definition of laziness.  According to babyperl, a
constant just pushes its value onto the stack, and a binary operator
just pops two values (which may be constants or registers) off the stack
and adds the appropriate bit of assembly to the listing currently in
progress.  This is a Good Thing because it means I can use simple
templates, like '+' => 'add ${d}, ${1}, ${2}', to generate it without
fussing with special cases.

--Brent Dax
[EMAIL PROTECTED]
Configure pumpking for Perl 6

When I take action, I'm not going to fire a $2 million missile at a $10
empty tent and hit a camel in the butt.
    --Dubya

Reply via email to