Re: Compiler writers will love this language

genew@mail.ocis.net (Gene Wirchenko)
2 Jul 2003 00:40:16 -0400

          From comp.compilers

Related articles
[14 earlier articles]
Re: Compiler writers will love this language mwotton@cse.unsw.edu.au (2003-06-22)
Re: Compiler writers will love this language dot@dotat.at (Tony Finch) (2003-06-25)
Re: Compiler writers will love this language lex@cc.gatech.edu (Lex Spoon) (2003-06-25)
Re: Compiler writers will love this language firefly@diku.dk (Peter \Firefly\Lund) (2003-06-25)
Re: Compiler writers will love this language joachim.durchholz@web.de (Joachim Durchholz) (2003-07-02)
Re: Compiler writers will love this language strohm@airmail.net (John R. Strohm) (2003-07-02)
Re: Compiler writers will love this language genew@mail.ocis.net (2003-07-02)
Re: Compiler writers will love this language ericmuttta@email.com (2003-07-02)
Re: Compiler writers will love this language mwotton@cse.unsw.edu.au (2003-07-03)
Re: Compiler writers will love this language nmm1@cus.cam.ac.uk (2003-07-04)
Re: Compiler writers will love this language nmm1@cus.cam.ac.uk (2003-07-04)
Re: Storage management, was Compiler writers will love this language mwotton@cse.unsw.edu.au (2003-07-04)
Re: Compiler writers will love this language joachim.durchholz@web.de (Joachim Durchholz) (2003-07-13)
[2 later articles]
| List of all articles for this month |
From: genew@mail.ocis.net (Gene Wirchenko)
Newsgroups: comp.compilers
Date: 2 Jul 2003 00:40:16 -0400
Organization: Posted via Supernews, http://www.supernews.com
References: 03-05-211 03-06-015 03-06-054 03-06-057 03-06-078 03-06-106
Keywords: storage
Posted-Date: 02 Jul 2003 00:40:16 EDT

mwotton@cse.unsw.edu.au (Mark Alexander Wotton) wrote:


>On 20 Jun 2003 00:02:55 -0400, Eric posted:
>> mwotton@cse.unsw.edu.au (Mark Alexander Wotton) wrote


[snip]


>> I admit, reference-counting has its problems and I have been toying
>> around with an idea for what I call "compile-time
>> reference-counting". Basically, I am looking for a set of rules,
>> that will allow the compiler to figure out when to release memory
>> for an object, *without* having to allocate memory space for a
>> reference counter value. Instead, using these rules, the compiler
>> can analyse code at compile time and statically work out the
>> life-time of an object. Its a bit wishy washy at the moment but if
>> its at all possible, I will write a paper on it :)
>
>It smells a bit undecidable to me. At least for the complete case, I think
>this reduces to the halting problem.
>
> Object foo(Object x, Object y) {
> if (halts(x)) {
> return y;
> } else {
> return x;
> }
> }
>
>When do you release x's memory?


          if branch: yes, else branch: no.


          Your code would make sense to me if the return values were
switched. Is that what you meant, or am I missing something?


>You may be able to find some decent heuristics, but I suspect it's a lot
>harder than it looks.


          It does have that feel to me, too.


Sincerely,


Gene Wirchenko


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.