[Ecls-list] Type propagator and "bogus" existing code

Gabriel Dos Reis gdr at integrable-solutions.net
Sat Jun 19 15:46:44 UTC 2010


On Sat, Jun 19, 2010 at 10:13 AM, Waldek Hebisch
<hebisch at math.uni.wroc.pl> wrote:
> Juan Jose Garcia-Ripoll wrote:
>> On Sat, Jun 19, 2010 at 4:16 PM, Gabriel Dos Reis <
>> gdr at integrable-solutions.net> wrote:
>>
>> > It is valid Lisp, then error is obviously not acceptable.
>> > Any other form of diagnostic that leads to build error is also
>> > too severe.  Obviously, miscompilation is not an option.
>> > My question is: can ECL still generate correct codes?
>> >
>>
>> There is no such thing as "correct" in this case, because the arguments were
>> declared / inferred to have one type and the function expects a different
>> one.
>
> IMHO the "correct" code is obtained replacing function call by
> call to error-signaling routine, that is any attempt to execute
> expression which is proved to be type error signals at runtime
> type error.

If I understand Juanjo correctly, the situation is one where the is a
declaration in the enclosing scope that make the branch of the
conditional unreachable -- even if no type propagation is done
and everything is kept "naively".  It is just an instance where the
static analysis can determine for sure that the code is never
going to be executed.

-- Gaby




More information about the ecl-devel mailing list