[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Re : Re: How many pases tcc doesn? Could we make a faste
From: |
david . koch |
Subject: |
[Tinycc-devel] Re : Re: How many pases tcc doesn? Could we make a faster compiler than tcc for another language? |
Date: |
Tue, 14 Dec 2021 08:49:14 +0100 (CET) |
I don't understand, could you elaborate a bit ?
Regards.
----- Mail d'origine -----
De: rempas via Tinycc-devel <tinycc-devel@nongnu.org>
À: Tinycc Devel <tinycc-devel@nongnu.org>
Cc: rempas@tutanota.com, Tinycc Devel <tinycc-devel@nongnu.org>
Envoyé: Mon, 13 Dec 2021 19:41:14 +0100 (CET)
Objet: Re: [Tinycc-devel] How many pases tcc doesn? Could we make a faster
compiler than tcc for another language?
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
approach
is in action when trying to implement it as a developer. Not having macros and
`#include`
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.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel