Commit Graph

42 Commits

Author SHA1 Message Date
dolby-oss 44e7a02ac3 improve handling of binary expressions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4544 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-03-08 17:35:04 +00: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 a1a62d4793 Fixed a longstanding bug in the handling of arguments: both v1 _and_ v2
should be ignored when setting up the arguments array (the former is the
invoked function, the latter is the receiver).

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4480 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:18:32 +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 c40917c3da remove unused imports
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4421 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 23:31:16 +00:00
msridhar1 7d6fe1d943 make field private again
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4403 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:47:23 +00:00
msridhar1 ce72e0fb93 make __proto__ not enumerable
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4391 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:44:25 +00:00
msridhar1 22f6ba3e0c extra diagnostics
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4354 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:31:44 +00:00
msridhar1 3172ba6b0f Fixed data flow propagation code for the arguments array: arguments[0]
is not the receiver, it is the first real argument.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4328 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:24:53 +00:00
msridhar1 eb73fac9e4 documentation of global object handling
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4326 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:24:25 +00:00
msridhar1 8ce7db97ea more global object handling; needs documentation
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4324 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:23:56 +00:00
msridhar1 306bc98bf5 progress on modeling the global object
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4321 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:22:58 +00:00
msridhar1 409a8f83b5 a little more debug info
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4206 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-07-02 15:34:21 +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
msridhar1 1f97edecc7 formatting, minor refactoring
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4168 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-05-04 21:06:35 +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
dolby-oss 6b47bc0bd1 fix import warning
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4100 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-04 17:31:19 +00:00
dolby-oss 684524e4bc added recording of script tag locations from which script code is included into the analysis of a Web page
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4097 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-04 17:16:18 +00: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
sjfink fa825de846 refactoring of fixpoint API
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4033 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-01-17 21:43:18 +00:00
dolby-oss c7558b3646 fixes for Rational
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3985 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-11-02 19:11:58 +00:00
dolby-oss 0ddb040987 bug fix for context-sensitive analysis of javascript functions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3935 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-09-14 20:28:04 +00:00
msridhar1 447823c629 kill unused supportRefinement option
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3833 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-05-12 18:30:55 +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
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 aa21ef9f58 adapt to core changes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3231 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-02-19 15:59:55 +00:00
dolby-oss f8d02b4541 fixes for JavaScript for Anders
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3191 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-01-27 17:40:11 +00:00
sjfink 8814ece4e2 delete PointerFlowGraph
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2610 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-24 00:05:19 +00:00
sjfink 2789df69e7 delete redundant method SSAAbstractInvokeInstruction.getSite()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2290 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-04 21:18:25 +00:00
sjfink e8543242d0 more generics
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2095 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-12-04 21:40:38 +00:00
sjfink 64c230a803 clean up TypeInference API
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1906 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-10-19 14:39:06 +00:00
yahave 2c8dd6d027 fixed bounds of iteration over symbol table using getMaxValueNumber. Loops should be iterating all the way to the MaxValueNumber returned (i.e., <=).
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1655 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-08-22 15:33:55 +00:00
sjfink 7f62dc3c04 decouple IR caching from AnalysisOptions with a new AnalysisCache object
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1519 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-20 15:20:23 +00:00
sjfink 433b943759 use Hash factories everywhere
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1439 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-11 21:08:21 +00:00
sjfink 1f94c82716 suppress a compiler warning
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1424 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-11 18:43:55 +00:00
sjfink 99a97fb477 massive overhaul of Warnings management
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1389 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-06 22:09:08 +00:00
dolby-oss 66b19b8666 support for cross-language call graphs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1216 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 03:32:56 +00:00
sjfink 553ee0faea change some Iterators in API to Collections
remove some unnecessary WarningSet parameters

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1207 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-31 02:38:28 +00:00
dolby-oss 07baba9290 Translator now generates property read prototype looping as a proper CAst loop rather than adding the loop in the IR. Use new AstIsDefinedInstruction to test for defined'ness. Better separation of primitive values versus objects that corresponds to primitives.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@987 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-04-19 13:53:31 +00:00
sjfink f1ac319ca0 squash remaining Eclipse warnings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@702 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-09 15:34:25 +00:00
dolby-oss d8f21f8ee5 Initial contribution of core script analysis code
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@622 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-02 17:25:09 +00:00