tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Code refactoring to remove globals phase1 done.


From: grischka
Subject: Re: [Tinycc-devel] Code refactoring to remove globals phase1 done.
Date: Sat, 29 Mar 2014 20:13:31 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Domingo Alvarez Duarte wrote:
Hello all !

I finished phase1 of code refactoring of tinycc to remove global variables, not all global variables are removed yet but most of then are, with that it can cross compile all platforms on my linux X86_64 and till only on real test was done on linux.

Here you can find the repository to test yourselves https://github.com/mingodad/tinycc any comment/suggestion/patch are welcome.

For the lazy typers and in order not to go to far past 80 cpl
I'd suggest 's1' instead of 'tcc_state' all over the place.

Not sure whether vtop (and all that) needs to become tccgen_vtop
etc.

Section stuff (text_section etc.) would more logically belong
to tccelf rather than tccgen.  (I once wanted to move those,
and add some interfaces such as elf_new()/elf_delete(), but ...)

C99 declarations past statement or declaration of size_t in
user code hurts other compilers.

Your 'virtual io' should maybe go in a 'contrib' directory, and
have some readme explanation. (otherwise it is useless for
other people).  Though, struct fd is NOT nice.  There are
probably much less intrusive ways, say with 3 simple #defines
on top and instead slightly more intelligent custom functions
that supports int fd's).

If any possible avoid mixing the refactoring with other fixes
or improvements, whatever those are.

Btw. did you use some special tools (and if yes, which) or
just find&replace?

--- grischka

Thanks for your time, attention and great work !




reply via email to

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