tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] VLA implementation


From: Edmund Grimley Evans
Subject: Re: [Tinycc-devel] VLA implementation
Date: Fri, 6 Nov 2015 07:37:01 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Sergey Korshunoff <address@hidden>:

> > Is this worth fixing? Or just document it as a limitation?
> I think this is very important. Don't using VLA and signal handler's
> at the same time is not acceptable. But  what the ways?

Firstly, don't commit any code until a plan has been agreed...

Then, I can see a lot of options:

1. Accept the limitations of the current implementation. I think this
   is probably the best plan.

2. Reset the SP at every label, making the generated code uglier even
   when the source code contains no VLAs.

3. Like 2, but only do it if VLAs have been enabled with a
   command-line option.

4. Like 2, but have a command-line option to disable VLAs.

5. Complicate the implementation significantly, because at the very
   least you have to record for each label whether the code at that
   label resets the SP. And there are a lot of suboptions here,
   depending on how you want to balance complexity of the
   implementation with ugliness of the generated code. Whatever
   suboption is chosen, if you take this route the first thing to
   implement would be a comprehensive test suite because there will
   probably be nasty interactions with computed gotos and switch
   statements that are not adequately tested by the current tests.



reply via email to

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