[Top][All Lists]

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

Re: [Tinycc-devel] Extension to C language

From: Jared Maddox
Subject: Re: [Tinycc-devel] Extension to C language
Date: Tue, 29 May 2012 01:59:13 -0500

You know guys, you can remove the irrelevant parts of what you're replying to...

> Date: Tue, 29 May 2012 02:52:13 +0000
> From: Paulo Henrique Torrens <address@hidden>
> To: <address@hidden>
> Subject: [Tinycc-devel] Extension to C language
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
> Hi,
> I'm working on a compiler suite project (black.nongnu.org), and made several
> updates to TCC in order to incentive it's use as bootstrapper compiler and
> for "publicity", including port to Mac OS X and the Open/Free/Net BSDs (and
> planning on fixing for Android), the C11 _Atomic, _Alignas and _Generic
> keywords, and some other stuff. I plan to send a patch soon.

I've looked at how Windows does thread variables, so if you want to do
_Thread_local (which would presumably be based on the code for static
variables), then I can help out with (at least) the Win32 version (I
don't have an x86-64, and haven't seen anyone mention if Windows makes
any changes there). I MIGHT be able to actually do a Win32 version
myself, but I don't understand TCC enough to be certain of it (and I
don't have a clue how to add keywords).

> I've made a small extension to my compiler, making "tracked variables" in C.
> They are just reference counted structs which can call free()
> automatically.
> void test() {  int ^strong = malloc(sizeof(int));  printf("strong has %d
> references", countof(strong));  int *weak_reference = strong;  // countage
> for strong becomes 0 and free(strong) is called automatically};
> Should I update this patch too? I mean, would this extension (enabled with
> -ftracked-variables) be used into the main branch?Anyway, I will update all
> the other patches soon. :)

An extended TCC (eTCC) compiler might be nice (some people have
suggested adding some sort of support for objects, which combined with
your tracked structures would be similar to Vala, and I myself intend
to finish a pet language & add an interface to TCC once I finish
debugging my tree implementation...), but such a project should be
separate from the TCC C compiler in the same way that the TCC
assembler is.

reply via email to

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