Commit Graph

37 Commits

Author SHA1 Message Date
Erik Derr ee13713c4d Impl of IMethod.is(Wala)Synthetic and IClass.isSynthetic (#359)
* Impl of IMethod isSynthetic and isWalaSynthetic

So far IMethod.isSynthetic referred to WALA-generated helper functions
and there was no equivalent to check whether an IMethod is synthetic in
terms of compiler-generated.

To make naming consistent this patch first renames the isSynthetic to
isWalaSynthetic to clearly indicate that a given IMethod was generated
by WALA. Then, we re-introduce isSynthetic that from now on checks
whether an IMethod is synthetic/compiler-generated (referring to the
synthetic flag in bytecode)

* Implementation of IClass.isSynthetic

Complementary to IMethod.isSynthetic, this method checks whether
an IClass is compiler-generated.

* updated JavaDoc
2018-10-02 22:28:21 -07:00
Julian Dolby e1def2ffb5 more generalization for reuse 2018-02-17 22:08:09 +01:00
Julian Dolby c8cdaf8616 further refactoring to enable more reuse
eliminate all non-jva 8 compilation
2018-02-05 15:18:37 -08:00
Ben Liblit 6087b73cee Fix or suppress all 242 Eclipse warnings about unused parameters
In general, my approach was to try to eliminate each unused parameter
using Eclipse's "Change Method Signature" refactoring.  That did not
always succeed: a parameter may be unused in some base class method,
but then be used in subclass's override of that method.  In cases
where refactoring to eliminate a parameter failed, I instead annotated
the parameter with '@SuppressWarnings("unused")' to silence the
warning.

Note: this group of changes creates a significant risk of
incompatibility for third-party WALA code.  Some removed parameters
change externally-visible APIs.  Furthermore, these changes do not
necessarily lead to Java compilation errors.  For example, suppose
third-party code subclasses a WALA class or interface, overrides a
method, but does not annotate that method as @Override.  Removing a
parameter means that the third-party method no longer overrides.  This
can quietly change code behavior without compile-time errors or
warnings.  This is exactly why one should use @Override wherever
possible, but we cannot guarantee that third-party WALA users have
done that.
2017-07-31 15:29:00 -07:00
Ben Liblit 4cef26162c Add @Override annotations wherever possible (#178)
* Fix warnings about unset javacProjectSettings build entries

Specifically, these are all warnings of the form "The
'javacProjectSettings' build entry should be set when there are project
specific compiler settings".

* Add @Override annotations to all methods that do override

This fixes 287 Eclipse code style warnings.

* Cannot add @Override annotations here, so suppress warnings instead

We should be able to add these @Override annotations in the future,
one Eclipse Mars and earlier are no longer supported.  For now,
though, they have to go away in order to be compatible with older
Eclipse releases.
2017-05-08 07:39:49 -07:00
Juergen Graf cdaaddf88b Merge branch 'wala' into master 2013-07-02 14:23:24 +02:00
Julian Dolby 080325b5f6 merge 2013-06-25 11:57:37 -04:00
Juergen Graf d77cfc60fc incorporate changes from other branch
- Annotation support
- Properly fix path-with-spaces bug.
- fix bug involving paths with spaces
- add a simple driver for building a call graph via a scope file
- Properly return null as default constructor of an array.
- organize imports
- better handling of missing bytecodes
- javadoc
- test fix
- small Javadoc fix
- added date-property.js
- 1) added InstanceKey.getCreation sites and its implementations 2) fixes for issues with keys representing dynamic properties   i) all properties are converted to strings,
- publicize method makeClasspath().  deprecate quoteStringIfNeeded()
- organize imports
- javadoc
- renamed classes to make relationship to mod-ref analysis clearer
- add support for lexical writes
- Code to compute transitive lexical accesses of methods.
- extract some generally useful code from ModRef
- Generate proper InstanceFieldKeys for property accesses with Numbers.
- rewrite to make hardest test appear last
- fix test to properly check reachability
- add an array test that doesn't quite work
- add method to get a PointerKey for a global
- compare FieldValueDispatch objects based on CGNode as well
- Handle duplicate field names between subclass and superclass.
2013-02-06 12:34:25 +01:00
Julian Dolby afccdd2189 Annotation support 2013-02-02 21:27:45 -05:00
Juergen Graf b82d5dba90 Merge branch 'wala' into master 2012-11-06 04:23:10 +01:00
Manu Sridharan 256cd06460 Convert all Java source files to use Unix line endings; no semantic change 2012-09-04 15:56:05 -07:00
Juergen Graf 47711fd310 read enhanced bytecode postions from class attributes 2011-03-30 13:03:16 +02:00
msridhar1 05744fe19b change isVolatile() in IMethod to isBridge(), better reflecting Java spec
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3777 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-12-03 16:56:49 +00:00
sjfink 933043fccf deprecate SyntheticMethod.getStatements(options)
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3717 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-07-02 19:19:25 +00:00
sjfink 2bf8eab491 tweak comments
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3494 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-21 19:31:33 +00:00
sjfink 407f61a2c3 more IllegalArgumentExceptions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3294 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-12 17:29:42 +00:00
sjfink b001a5d2f5 more IllegalArgumentExceptions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3292 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-12 16:02:13 +00:00
sjfink 8a39de940b bug fix in equals/hashcode
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2739 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-04-01 21:45:38 +00:00
sjfink 745fd7d5a4 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@2656 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-03-03 21:32:45 +00:00
msridhar1 bf8549d599 added context parameter to SyntheticMethod.makeIR()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2652 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-03-03 04:02:33 +00:00
sjfink 32a7543322 fix bug with phi instructions in synthetic IRs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2637 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-29 21:42:17 +00:00
sjfink e6a904b715 just refactoring ... introduce 2 new packages in wala.util.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2446 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-24 22:05:28 +00:00
sjfink 19a0c8a5ad more IllegalArgumentExceptions and declared exceptions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1665 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-08-24 15:57:40 +00:00
sjfink ff1c0ea48b more IllegalArgumentExceptions and related refactoring
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1657 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-08-22 16:33:45 +00:00
sjfink da7aa76217 more precondition checking
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1640 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-08-21 02:46:01 +00:00
sjfink a013bb006e cleanups for illegal arguments and unsupported operations
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1635 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-08-20 20:16:43 +00:00
sjfink 5eb76541f0 massive overhaul of Warnings management
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1382 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-06 22:08:13 +00:00
sjfink 8864b70d50 miscellaneous housekeeping
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1364 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-06 03:07:14 +00:00
dolby-oss 0ed8d96d55 Changes to allow cross-language call graphs. The three biggest changes are as follows:
1) The visitors nested in the SSAPropagationCallGraph have become static classes so that they can be reused in a delegation pattern for the cross-language call graph builder.
2) The ClassHierarchy is now encapsulated behind an IClassHierarchy interface to allow for a CrossLanguageClassHierarchy that delegates to a set of child hierarchies, one for each language.  The internals of the ClassHierarchy are almost entirely unchanged
3) There is now a new Language interface in com.ibm.wala.classLoader, and all IClassLoader objects have to know what language they load for.  This language object now encapsulates a few language-specific options that were previously hacked into the AnalysisOptions object.


git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1212 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 03:26:18 +00:00
sjfink 9c58d8e2a8 change some Iterators in API to Collections
remove some unnecessary WarningSet parameters

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1208 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-31 02:38:49 +00:00
sjfink ea3caa1e8a mostly clean up old comments.
also rename InferGraphRootsImpl to InferGraphRoots

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1200 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-30 19:05:23 +00:00
sjfink fdb7a17af3 add @Overrides annotations and nuke unnecessary casts
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1197 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-30 15:16:05 +00:00
sjfink b0598a95f4 more argument checking
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1133 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-15 19:35:57 +00:00
sjfink 2870d1dbc8 soft caching of bytecode info and small API changes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@881 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-03-22 15:48:54 +00:00
sjfink b85c5fc3a5 a little immature generics support
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@560 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-01-11 17:51:29 +00:00
sjfink 59f5f9d69e introduce ClassHierarchyDweller
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@516 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2006-12-21 19:03:50 +00:00
sjfink df97f42b7e attempt to introduce tags and trunk
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@490 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2006-11-22 17:38:46 +00:00