Escape analysis
Sergey Gromov
snake.scaly at gmail.com
Wed Oct 29 14:21:20 PDT 2008
Wed, 29 Oct 2008 15:23:12 -0400, Steven Schveighoffer wrote:
> "Sergey Gromov" wrote
>> If you compile two files for the first time, and the first file imports
>> the second one, where do you get that meta-data for the second file?
>> What if you compile only one file, and that file imports another which
>> wasn't compiled yet? Either you construct meta-data on the fly, or
>> require it included in the source, or assume it's not present (worst
>> case).
>
> My vote would be for compiling it on the fly. The compiler already does
> parsing of the source file, so it can also generate this graph data. It
> shouldn't be too hard a task.
>
> Look, I agree that a graph analysis is the best possible solution. It
> requires no work from the user, no extra specification, and it will solve
> the problem accurately.
>
> But the current mode of compliation doesn't allow for that easily. That's
> all I was saying.
I do understand that. I just wanted to discuss whether it is possible
to approach this problem incrementally, so that relatively simple
changes significantly improve the situation without breaking safety.
And I thought that a dispute was a nice way for probing an idea for
hidden flaws.
More information about the Digitalmars-d
mailing list