[Top][All Lists]

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

Re: [Tinycc-devel] How many pases tcc doesn? Could we make a faster comp

From: rempas
Subject: Re: [Tinycc-devel] How many pases tcc doesn? Could we make a faster compiler than tcc for another language?
Date: Mon, 13 Dec 2021 19:41:14 +0100 (CET)

13 Δεκ 2021, 13:02 Από tonypdmtr@gmail.com:

> Single pass is not exactly what you think.  The compiler passes over your 
> code once but it keeps track of various things for later resolution.
> For example, #define's are macros that are stored in some 'dictionary' to be 
> expanded when actually used, if ever.
> It's at the time they are used that they must resolve to something without 
> errors, not during definition.
Hmmmm. Sounds good at thinking but another thing I wonder is how is this 
is in action when trying to implement it as a developer. Not having macros and 
and stuff would probably be better. Instead we could have templates that have 
to be
declared before used and then the compiler will see what it needs to generate 
and what
it has already been created. Of course a function will be a little bit slower 
than a macro
that will place the code in place but of course the difference is more tiny 
that TCC ;). `#if`
is the only one that makes sense tbh but it needs to be more powerful of course.

reply via email to

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