Commit Graph

26 Commits

Author SHA1 Message Date
Ben Liblit 191904d607 Remove "throws XYZ" declarations where XYZ cannot be thrown
Unnecessary "throws" declarations tend to cascade.  If foo() calls
bar() and bar() falsely declares that it might throw IOException, that
often leads a programmer to declare that foo() might throw IOException
as well.  Fixing the bar() throws declaration then reveals that we can
fix the foo() throws declaration too.  By the time we reach a fixed
point with cleaning these up, we have removed roughly 320 unnecessary
throws declarations.

In a few cases, this cleanup even lets us remove entire "try
... catch" statements where the only thing being caught was an
exception that we now statically know cannot be thrown.  Nice!

In Eclipse project configurations, upgrade any future such shenanigans
from warnings to errors.  Now that we've fixed this, we don't want it
coming back again.

There is a potential drawback to this change.  Conceivably some public
WALA API entry point might have declared that it could throw some
exception merely to reserve the *option* of throwing that exception in
third-party code that subclasses and overrides the API entry point in
question.  I have no idea whether this is a significant concern in
practice, though.
2017-07-28 10:20:28 -07:00
Ben Liblit 72c754e874 Declare private methods static wherever possible
If a method is private, there's no risk that a subclass elsewhere
might be overriding it and depending on dynamic dispatch to choose the
right implementation.  So all of these private methods can safely be
declared static without risk of regression in either WALA code or
unseen third-party code.
2017-06-07 08:29:23 -07:00
Manu Sridharan 064fa9a503 Merge pull request #140 from liblit/remove-execute-bits-from-non-scripts
Remove execute bits from many non-executable (i.e., non-script) files
2017-03-12 10:27:08 -07:00
Julian Dolby f595eb357e add some abstraction to IR, using IRView 2017-03-11 13:22:45 -05:00
Ben Liblit 5a5cccc062 Strip execute bits from many non-executable (i.e., non-script) files 2017-02-23 06:10:08 -06:00
Julian Dolby d24519e974 cross-cutting changes to make more of WALA runnable with TeaVM. The biggest change is refactoring to AnalysisCache and friends; since TeaVM does not support SoftReference, I needed to add a layer of interfaces so that I can use a more simpleminded caching implementation for TeaVM. There are other changes to Module and friends to break connections with File and URL, which also cause TeaVM grief. I also organized imports in many places to remove unused types that caused trouble. 2017-02-02 20:33:27 -05:00
Julian Dolby ab22d9abb0 enable specialization of source extractor for Web pages 2015-11-30 21:28:40 -05:00
Julian Dolby 0799bffc84 clean ups 2013-08-29 10:16:38 -04:00
Max Schaefer fcd28ee419 More refactoring of ParameterNameContextSelector, which is now called
PropertyNameContextSelector.
2013-06-03 14:13:37 +08:00
Max Schaefer 3a0741571f Some cleanup in ForInContextSelector; now renamed to
ParameterNameContextSelector.
2013-06-03 12:18:29 +08:00
Manu Sridharan 3b1889121b add missing copyright headers 2013-05-22 15:39:19 -07:00
Manu Sridharan 11c6619c7f Variety of changes to JS front end.
- crash fixes
- small enhancements to prologue and preamble
- tighter handling of timeouts during CG construction
2013-04-09 15:47:22 -07:00
msridhar1 a3826f23a8 refactoring: rename some Util classes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4492 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:21:59 +00:00
msridhar1 92d8dc1e3d Revert "refactor context selectors: extract delegation into ComposedContextSelector"
This reverts commit 7ff1219c5baed388a82d14fcf81d2b1f456c4e95.  That commit broke
a dojo test, and I'm not sure why.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4491 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:21:18 +00:00
msridhar1 edd300cf00 refactor context selectors: extract delegation into ComposedContextSelector
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4489 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:20:26 +00:00
msridhar1 677fc96aec add a test
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4485 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:19:32 +00:00
msridhar1 e149af8a13 Some more tests.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4381 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:41:57 +00:00
msridhar1 c815519025 ignore jquery test; no longer works due to proper handling of || construct
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4315 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:20:55 +00:00
msridhar1 1673a200e5 default to dumping files in temp directory
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4312 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:20:13 +00:00
msridhar1 cb37e60635 make classes abstract, so their tests are not run directly
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4287 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-10-31 18:47:14 +00:00
msridhar1 c316309900 add a test
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4211 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-07-04 21:21:29 +00:00
dolby-oss a8e79f92aa adapt to for...in context changes, and use new test
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4205 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-07-02 15:16:38 +00:00
msridhar1 2b443852fc pull out hacked for-in context selector. add some debugging output
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4200 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-07-01 16:48:18 +00:00
dolby-oss 3e573a992d upgrades to lexical soping implements to address some performance issues
fixes to HTML model to capture use of local vars as window state in scripts


git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4176 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-05-23 16:27:07 +00:00
dolby-oss 7adce5daf7 change to dump api to make usable in other places, without a builder
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4160 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-28 19:08:06 +00: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