Commit Graph

30 Commits

Author SHA1 Message Date
Julian Dolby 533d392bda support for method argument default values 2018-10-17 19:44:44 -04:00
Julian Dolby d690d94cdd more use for object literals 2018-10-16 00:34:31 -04:00
Julian Dolby 0ad11fefc3 work on Wala with Yannis' group 2018-07-22 16:19:32 -04: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 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
Ben Liblit b012b21147 Remove "@return" for void-returning functions 2017-03-22 20:40:53 -05:00
Ben Liblit b8264b884d Remove "@param" tags for which there is no corresponding parameter 2017-03-22 20:40:52 -05:00
Julian Dolby ad64e958dc changes for language work 2015-12-15 12:53:36 -05:00
Julian Dolby 563b6ba6aa fixes for for ... in ... form in JavaScript 2015-07-24 22:44:10 -04:00
Julian Dolby e58ec4dba8 new special parent scope for cases where JavaScript redefines a variable using a reference to the existing definition 2014-06-26 11:05:43 -04: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
dolby 5f0b0ea956 Two fixes for mapping source positions to IR
1: get the right position for methods from the JDT AST
2: more seriously, there was a nasty bug in how source positions got
mapped in unwound code: mappings were wrong for instructions that
were the result of duplicating code to replicate unwind handling in
exceptional and non-local exits.
2012-08-30 12:10:30 -04:00
dolby dfe06b8ff3 changes to Web source mapping to exploit rhino 1.7R3 source offsets 2012-05-08 13:17:01 -04:00
dolby-oss a9ec87f360 Changes motivated by analysis issues in JavaScript. The main change is that calls of the form f.x() in JavaScript are now analyzed like 'method calls' so that the 'this' pointer in the receiver functions can be filtered based upon the types that actually have the method being invoked. This requires much more dynamic filtering than in a language like Java, since properties like 'x' are simply properties that happen to hold functions, and so can be assigned in a first-class manner. Thus, the filtering needs to handle variance in both the types and the values of their properties; this is implemented as multiple levels of abstract object directed side effect equations in the dataflow system.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4535 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-03-01 02:45:51 +00:00
dolby-oss 4c6d062dbb blunt force trauma to CAst frond end:
1) Structural changes in the AstTranslator to allow retranslation and generation of custom IR.  This is mostly moving state from the translator itself into the context.
2) Some refactoring to share some AST generation code across the Java and JavaScript front ends.
3) Switching to the latest Rhino, release 1.7R3; this is a pervasive change to the JavaScript Rhino translator, since it involves switching to the new AST interface in Rhino.
4) Common code to, as an option, translate Do-style loops by replicating the loop body.  This allows the use of CAstNode.LOOP forms for such loops.
5) Some bug fixes to the mechanisms of the CAstRewriter to handle weird control flow cases.
6) An example of retranslation to specialize JavaScript methods based on how many arguments they receive at call sites.


git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4425 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-27 20:15:33 +00:00
sjfink 9939142eae switch from Assertions._assert to Java assertions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3555 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-30 13:16:52 +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 3e198f8244 merge of development on internal branch. Support for cross-building JNI code for Windows, and refactoring of abstract loader support.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3242 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-02-26 16:54:30 +00:00
dolby-oss e509347a24 support for include-style constructs at the AST level
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2731 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-03-25 15:16:21 +00:00
dolby-oss d1294698bd committed patch from Evan Battaglia to support outer.new inner() form. Thanks!
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2590 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-18 15:16:16 +00:00
dolby-oss 8e46277e51 move echo instruction to CAst core; generalized invokes to deal with multiple return values; generalize function support to handle non-first-class functions, modeled as statics
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2131 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-12-10 04:26:21 +00:00
dolby-oss 0d32f296f4 bug fix to refactoring to array assignment
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1507 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-18 18:13:44 +00:00
rmfuhrer edad2d5b68 Factored handling of array ref nodes from visitAssignNodes() so that code can be shared with array handlers for derived languages.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1506 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-18 15:55:54 +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 0023341733 new instruction to represent checking whether a local or a field is defined
new abstract base for CAst rewriters, used by the CAstCloner



git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@985 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-04-19 13:48:01 +00:00
dolby-oss c51ad28e66 new CAstSymbol type for information about a symbol being declared. new support for default init values for unitialized variables
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@920 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-04-04 13:02:17 +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