tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] incremental compilation


From: Fabrice Bellard
Subject: Re: [Tinycc-devel] incremental compilation
Date: Tue, 13 May 2003 14:47:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020828

brian wrote:
Well, I've had a play with tinycc today, and added (fairly primitive) incremental compilation (for the memory target).

The *addenda stuff is a bit of a hack, and should be cleaned up soon.

If anyone is particularly interested the next stage involves rendering into custom memory arenas, and after that - type introspection.

I think this is an interesting feature.

An important application would be a "TCC shell" where each line you type is compiled then evaluted such as:

# tcc -i

> 1 + 1;
$1 = 2

> int fib(int n) { if (n <= 2) return 1; else return fib(n-1) + fib(n-2); }
$2 = void

> fib(3);
$3 = 2

You can send me your hack (a diff -u against the current CVS) so that I can see if it is possible to improve it.

A possible idea would be the following: after each TCC relocate, the PROGBITS/NOBITS sections should be moved in permanent memory arenas and clean empty new ones should be created. The ELF symbols tables should be kept unmodified.

It seems also possible to add a feature to compile without flushing the C symbol table so that earlier identifiers can be used without using externs.

Fabrice.






reply via email to

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