emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add more supported primitives in libgccjit IR


From: Manuel Giraud
Subject: Re: Add more supported primitives in libgccjit IR
Date: Mon, 21 Aug 2023 13:34:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> Gregory Heytings <gregory@heytings.org> writes:
>
>> I'm not sure elisp-benchmarks are representative enough of actual Elisp 
>> code...
>
> Any better ideas?
>
>> Look at data.c:arith_driver.  You'll see that it's essentially a function 
>> which dispatches the handling of its arguments depending on their type...
>>
>> These integer/float/bignum types are not known at compilation time ...
>
> This is not correct. If you have something like
> (progn (setq x 1) (> x 2)), compiler is actually able to determine the
> type of X at compilation time.

Yes this is called type inference.  There is a full literature on the
subject.  Even a whole family of language based on this concept.

AFAIK, the SBCL compiler does some type inference but, as others have
said, I don't think there is such a thing for Emacs Lisp.
-- 
Manuel Giraud



reply via email to

[Prev in Thread] Current Thread [Next in Thread]