escaping pointer to scope local array: bug or not?

Steven Schveighoffer schveiguy at yahoo.com
Wed Aug 19 03:47:59 PDT 2009


On Tue, 18 Aug 2009 18:08:56 -0400, Robert Jacques <sandford at jhu.edu>  
wrote:

> *sigh* That doesn't work. From the wikipedia article:
>> In traditional static compilation, method overriding can make escape  
>> analysis impossible, as any called method might be overridden by a  
>> version that allows a pointer to escape.
> For example: Let's take a 3rd party pre-compiled library with class A  
> and function f(A a), neither of which have any escapes. Now create a  
> subclass of A, B, which does contain escapes. Does f(B) escape or not?

It also says that Java 6, a language compiled as I proposed D could be,  
has escape analysis.

I don't think it's easy, but it's definitely possible.

Besides, this entire argument is moot if Walter doesn't want to do it...

-Steve



More information about the Digitalmars-d mailing list