Commit Graph

15 Commits

Author SHA1 Message Date
Ben Liblit ebfd885d22 Use modern for-each loops where possible
Java sources used as test data have been excluded from this mass
clean-up.
2017-11-28 14:44:53 -06:00
Ben Liblit e316471d88 Fix nearly all Eclipse warnings about using raw types
Along the way, I also converted many "for (;;)" loops into modern
"for (:)" loops.  I didn't systematically look for all opportunities
to do this, though.  I merely made this change where I was already
converting raw Iterator uses into modern Iterator<...> uses.

Better use of generics also allowed many casts to become statically
redundant.  I have removed all such redundant casts.

Only three raw-types warnings remain after this batch of fixes.  All
three involve raw uses of CallGraphBuilder.  I've tried to fix these
too, but it quickly snowballs into a cascade of changes that may or
may not eventually reach a statically-type-save fixed point.  I may
give these last few problem areas another go in the future.  For now,
though, the hundreds of other fixes seem worth keeping even if there
are a few stragglers.

This commit may change some public APIs, but only by making weaker
type signatures stronger by replacing raw types with generic types.
For example, we may change something like "Set" into "Set<String>",
but we're not adding new arguments, changing any
underlying (post-generics-erasure) types, etc.
2017-07-12 10:39:06 -07:00
Julian Dolby 080325b5f6 merge 2013-06-25 11:57:37 -04:00
dolby-oss 4da02a9125 Changes to extend supported context sensitivity to CPA-style:
1) extend ContextSelector interface to allow it to specify parameters of interest
  2) extend filtering mechanism at call sites to allow CPA-style filtering when requested by contexts
  3) various related fixes and extensions:
    a) removed redundant code to handle dispatch for JavaScript, so now it shares the core mechanism
    b) tighten types for operators that take an array of args - now the array is T[] at the cost of a few array allocation methods
    c) a bit more support for empty int sets
    d) void function objects
    e) bug fixes for lexical scoping support, and adaptation to work with core dispatch mechanism
    f) example of CPA-style sensitivity to handle nastiness in a JavaScript for(.. in ...) loop
    

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4150 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-27 13:58:56 +00:00
sjfink 957cb2b8ca deprecate Trace
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3432 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-09 20:31:14 +00:00
dolby-oss b2bae33bab generalize parsing of Descriptors to also handle languages other than Java
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3366 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-26 15:11:45 +00:00
sjfink ed13ddbb17 bug fix 2666538: make ClassLoaderReference immutable, and related API fixes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3302 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-13 14:20:35 +00:00
sjfink aa33858080 Simplify MethodTargetSelector and ContextSelector interfaces; delete optimizations based on allSitesDispatchIdentically and mayReturnSyntheticMethod.
Also some Cast bug fixes.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2654 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-03-03 21:32:31 +00:00
sjfink 9e79661c60 just refactoring ... introduce 2 new packages in wala.util.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2447 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-24 22:05:51 +00:00
sjfink c91caedab6 use Hash factories everywhere
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1435 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-11 21:07:32 +00:00
sjfink 39da63410a massive overhaul of Warnings management
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1390 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-06 22:09:29 +00:00
dolby-oss 03c523a52e fixes to pointer analysis to handle languages that have a separate 'null' type for which no one should be reading/writing fields; minor fixes to misc hack context selector
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1323 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-28 14:30:15 +00:00
dolby-oss 8472f026f5 support for cross-language call graphs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1215 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 03:31:35 +00:00
sjfink a92bff31bb some generics
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@692 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-08 20:45:07 +00:00
dolby-oss 3d9390a397 Initial contribution of core script analysis code
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@616 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-02 17:17:13 +00:00