[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Lua strictlessness
- From: Dan Tull <dtull@...>
- Date: Wed, 28 Aug 2013 08:49:34 -0700
> > if not foo == "bar" then
> >
> > end
> I've seen a few "false positives" on this one...
In my case, I'm analyzing the bytecode and only flag it as a hit if
the right hand side is a constant pool entry of a type other than
boolean, which I think is a pretty solid assurance that the if body
will never execute because the types will mismatch.
It means I may miss some "bad" cases, but false positives haven't
come up so far.
> because our build includes a Lua macro processor, and sometimes
> you end up with constructs like this only because the part after the
> "not" is hidden inside a (perfectly valid) macro.
Interesting. Yeah, we don't use macros. I guess if we did I'd probably
have to analyze the bytecode after replacement.
DT
- References:
- Lua strictlessness, Rafis DoctorInfo
- Re: Lua strictlessness, Leo Razoumov
- Re: Lua strictlessness, Rafis DoctorInfo
- Re: Lua strictlessness, Leo Razoumov
- Re: Lua strictlessness, Tangent 128
- Re: Lua strictlessness, Tim Hill
- RE: Lua strictlessness, Thijs Schreijer
- Re: Lua strictlessness, Rafis DoctorInfo
- Re: Lua strictlessness, Coda Highland
- Re: Lua strictlessness, steve donovan
- Re: Lua strictlessness, Sven Olsen
- Re: Lua strictlessness, Tim Hill
- Re: Lua strictlessness, Andrew Starks
- Re: Lua strictlessness, Tim Hill
- Re: Lua strictlessness, Sven Olsen
- Re: Lua strictlessness, Thijs Schreijer
- Re: Lua strictlessness, steve donovan
- Re: Lua strictlessness, Tim Hill
- RE: Lua strictlessness, Dan Tull
- Re: Lua strictlessness, Tim Hill