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

RE: DeadAssignmentEliminator



Oops.. I meant !method.isStatic()...
The idea is that the NullPointerException can never happen in an instance
method,
because this is always defined, right??

> -----Original Message-----
> From: Patrick LAM [mailto:plam@sable.mcgill.ca]
> Sent: Monday, June 25, 2001 4:19 PM
> To: Stephen Andrew Neuendorffer
> Cc: soot-list@sable.mcgill.ca
> Subject: Re: DeadAssignmentEliminator
>
>
> On Mon, 25 Jun 2001, Stephen Andrew Neuendorffer wrote:
>
> > Perhaps better would be something like:
> > if(rhs instanceof InvokeExpr ||
> >    rhs instanceof ArrayRef)
> >
> >     isEssential = true;
> > } else if(rhs instanceof InstanceFieldRef) {
> > 	if(method.isStatic() &&
> > 		lhs == body.getThisLocal()) {
> > 		isEssential = false;
>
> When do you get a read from this.foo in a static method?  Is that even
> valid?
>
> pat
>
>
>