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

Re: Boolean Constants



Patrick LAM wrote:

On Fri, 23 Apr 2004, Leon Krupkin wrote:



How would I create a boolean constant? I know I can use
jimple.IntConstant, but I need the type to BooleanType.



I can't see any way to manufacture a constant with type BooleanType. You could modify Jimple and create a jimple.BooleanConstant class which would have the appropriate type, if you really need that. It seems that inside Jimple, booleans do tend to get IntConstant values, e.g.

       boolean z0;
       z0 = 1;

pat




i've had luck with the following. granted the addition of a BooleanType as pat described is probably the correct solution.

DIntConstant.v(0, BooleanType.v())

nall.