This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada subtypes and base types

Jeffrey A Law writes:
 > On Thu, 2006-03-30 at 18:39 +0100, Andrew Haley wrote:
 > > Jeffrey A Law writes:
 > >  > On Wed, 2006-03-29 at 14:28 -0700, Tom Tromey wrote:
 > >  > 
 > >  > > On irc today we were discussing handling 'this' in gcj.  We can add an
 > >  > > attribute to the argument to mark it as non-null... but strangely
 > >  > > there doesn't seem to be a way to mark other local variables as
 > >  > > known-non-null -- a curious deficiency.
 > >  > It seems to me that for other locals that the non-null property
 > >  > ought to be a property of how those locals are assigned a value.
 > >  > ie, if we're going to be able to derive a non-null for a local we
 > >  > should be able to derive it from the RHS of the assignment(s) to
 > >  > that local.
 > > 
 > > Right, that's true.  The idea is that a great many library functions
 > > either return a valid object or throw an execption, and we can
 > > propagate that information to VRP>
 > > 
 > >  > IIRC "this" is actually a parameter and thus there's no assignment
 > >  > we can derive information from.
 > > 
 > > Mmm, yeah.  The point is that we solved the problem for "this", but
 > > not for other things.

 > And I think the way to solve this is to mark those interesting
 > library functions, then fix VRP so that it's not so eager to ignore
 > function calls :-)

Well, it's not just functionss but also global variables.  AFAICS
there are three sources of data: args, retvals, and globals.  And
there are quite a few of these globals we can usefully tag as "known
never to be null".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]