TOGoS:
# When I say in IMCC:
# 
#   $P0 = $P1 + $P2
# 
# , I expect it to create a new value and store it in
# $P0, not give me a segfault because I didn't say
# 
#   $P0 = new <figure out what the heck type
#              $P0 is supposed to be based
#              on the types of $P1 and $P2>
# 
# first.

Then your expectations are wrong.

I think you may be losing sight of the fact that most users will *never*
interact with PASM or PIL directly.  Most users will have a
parser/compiler/optimizer between them and PIL--one that was written,
tested and debugged by experts.  The few people who work with raw
assembly or IL should know what they're doing.  While I have no problem
with IMCC-time warnings about constructs like this ("Use of
uninitialized register $P0 in add"), I don't think we should coddle the
user at this level.

Moreover, there really isn't any way to do what you want to do here.
There is no way for the add opcode to intuit what type should be put
into $P0.  That's ultimately the host language's decision, not Parrot's,
and the host language may have complicated rules to decide it.  And even
if we did do something like this, we'd be penalizing calls to add that
*do* have correct arguments.

--Brent Dax <[EMAIL PROTECTED]>
Perl and Parrot hacker
 
"Yeah, and my underwear is flame-retardant--that doesn't mean I'm gonna
set myself on fire to prove it."

Reply via email to