Commit Graph

67 Commits

Author SHA1 Message Date
Julian Dolby 9aed4e058d more tracking of sourse positions for function parameters 2018-06-05 15:00:31 -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 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
Ben Liblit aaf66705e1 Fix 65 Eclipse warnings about unused exception parameters
In the cases addressed here, the caught exception was being "handled"
by throwing some new exception.  Instead of discarding the old
exception, pass it to the new exception's constructor to indicate the
original cause of the newly-created exception.  This practice, called
"exception chaining", can often be useful in debugging.
2017-03-20 00:44:39 -05:00
Julian Dolby a8a3699ee1 type cleanups 2017-02-23 10:10:39 -05:00
Julian Dolby 7a69f752d0 type cleanups 2017-01-11 08:04:37 -05:00
Julian Dolby 5cc870dd77 fixes to Dalvik support, and work on running Dalvik tests on Travis 2015-02-26 09:34:03 -05:00
Juergen Graf ccc2cf1506 small cleanup in wala.cast 2014-07-29 19:45:24 +02:00
Juergen Graf 6f8aee80c6 Merge branch 'wala' into master 2014-07-28 17:09:02 +02:00
Julian Dolby dd3124479e allow control flow in induced cfgs, and various related fixes 2014-07-08 14:44:06 -04:00
Michael Heilmann 0bb5e6998e Remove redundant casts and imports, improve doc comments 2014-06-26 17:51:26 +02:00
Juergen Graf 428a3975ed Merge branch 'wala' into master
Conflicts:
	com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/loader/JavaSourceLoaderImpl.java
	com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/AstJavaInstructionFactory.java
	com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ssa/AstJavaInvokeInstruction.java
	com.ibm.wala.cast.js.test/harness-src/com/ibm/wala/cast/js/test/TestSimpleCallGraphShape.java
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/html/WebPageLoaderFactory.java
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/loader/JavaScriptLoader.java
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ssa/JSInstructionFactory.java
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ssa/JavaScriptInvoke.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstCallGraph.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/AbstractLexicalInvoke.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/AstInstructionFactory.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/AstLexicalRead.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/AstLexicalWrite.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/ssa/FixedParametersInvokeInstruction.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/ir/translator/AstTranslator.java
	com.ibm.wala.core/.classpath
	com.ibm.wala.core/.settings/org.eclipse.jdt.core.prefs
	com.ibm.wala.ide/src/com/ibm/wala/ide/util/ProgressMonitorDelegate.java
	com.ibm.wala.util/src/com/ibm/wala/util/NullProgressMonitor.java
	com.ibm.wala.util/src/com/ibm/wala/util/ProgressMaster.java
2014-05-20 17:59:16 +02:00
Julian Dolby a2f4f3b238 type in CAst var decls 2014-05-20 13:10:57 +02:00
Julian Dolby cab44f0cae propagate source names in prototype lookups 2014-05-20 13:09:27 +02:00
Julian Dolby 893f4b7308 type in CAst var decls 2014-03-16 18:05:49 -04:00
Julian Dolby ec36f2f081 propagate source names in prototype lookups 2014-02-08 21:34:34 -05:00
Julian Dolby 56236dec53 further work on analysis for JavaScript in Eclipse 2013-10-16 17:37:53 -04: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
Manu Sridharan 162a001ce6 remove more code for older lexical access scheme 2013-06-07 09:58:25 -07:00
Manu Sridharan d4b252ad51 kill NEW_LEXICAL flag 2013-06-06 20:02:41 -07:00
Julian Dolby 1cc5e5ce9c fixes for bug with dead code and exception handlers 2013-04-10 21:16:12 -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
Manu Sridharan 1d06b2f764 organize imports 2013-01-22 15:42:04 -08:00
Julian Dolby 9aa474fdb1 1) added InstanceKey.getCreation sites and its implementations
2) fixes for issues with keys representing dynamic properties
  i) all properties are converted to strings, in an approximation of JS
semantics
3) fix to handling of instance keys representing numbers in binary +;
now it understands that adding constant keys of type Number requires
adding a non-constant Number key to the lval
2013-01-07 20:18:27 -05:00
Juergen Graf 7477b1730b Merge branch 'wala' into master 2012-03-19 13:33:48 +01: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
msridhar1 78ef6e3a03 further work
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4465 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:15:26 +00:00
msridhar1 8982d35800 fixed one CG building bug with useLocalsForLexicalVars() disabled
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4463 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:14:51 +00:00
msridhar1 9ad5c55d85 generate lexical access instructions for methods accessing their own exposed vars. still need to fix call graph construction
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4461 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:14:26 +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
msridhar1 f9d6e38eea Removed spurious "arguments" property on function objects.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4329 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:25:06 +00:00
Juergen Graf f5ac0c543f Merge branch 'wala' into master 2011-07-12 19:50:39 +00:00
Juergen Graf f8d6f5b917 Merge branch 'wala' into master 2011-05-27 12:25:53 +02: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
msridhar1 cbd5613a35 javadoc, formatting, move a DEBUG flag
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4163 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-05-02 22:11:27 +00:00
msridhar1 3fffba2c87 javadoc and formatting
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4149 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-26 18:44:49 +00:00
dolby-oss 9006fce690 some bug fixes to CAst IR generation, especially in handling exceptions
cleanup of how JDT analysis engines work, to make using the JDT front end more modular
bug foxes to JavaScript handling, most notably fixing scoping of functions

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4123 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-13 16:27:15 +00:00
Juergen Graf ee3c56b9e9 instruction index in SSAInstruction for javascript 2011-04-13 12:56:36 +02:00
dolby-oss cdd42a68b6 updates to processing of Web pages:
1) adopted the code from Rational for HTML handling
    i) extended it to integrate better source mapping into IR
    ii) integrated fixes from the old html processing to collect more info on forms
    iii) added some copyright comments
  2) updated version of jericho
  3) added support for nu.validator for html5
  4) added script to fetch html parser jars, and removed binary jar
  

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4090 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-04 15:23:58 +00:00
dolby-oss 658598e82b fix to handle redefinition of 'undefined' (yuck)
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3970 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-10-11 14:25:52 +00:00
dolby-oss e4b9d03be5 bug fixes for unicode names and to prevent analysis from modifying the symbol table
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3936 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-09-14 20:29:05 +00:00
dolby-oss dec3802c1c fixes for symbols that are used by the call graph builders
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3928 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-09-10 22:33:47 +00:00
dolby-oss 2e724aac3e fixes for JavaScript motivated by Web examples
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3823 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-04-28 19:38:28 +00:00
dolby-oss e877067710 Ishizaki-san's patch for hasMonitorOp
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3733 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-07-17 13:58:55 +00:00
dolby-oss c3769d5717 performance and other fixes driven by models of Web pages for JavaScript
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3562 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-05-04 14:11:31 +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 77101da20f misc. cleanups
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3434 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-10 19:48:32 +00:00
dolby-oss e80dc6ef8c refactor handling of constants in Shrike to abstract away from Java bytecode
introduce factories to create SSAInstruction objects


git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3433 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-10 18:33:07 +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