Commit Graph

47 Commits

Author SHA1 Message Date
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 00b51cd14c make more stuff into BLOCK_STMT
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4454 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 17:10:24 +00:00
msridhar1 a52455972c Adding support for unary "void" operator.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4447 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:34:10 +00:00
msridhar1 daf36902bd Avoid plugging in the same AST node twice when creating code for a
method call.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4444 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:33:35 +00:00
msridhar1 1e0ad9dbc6 Put stderr output under DEBUG flag.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4437 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:32:03 +00:00
dolby-oss f557348885 make some expression into statements
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4434 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 02:49:21 +00:00
dolby-oss 79946e98d6 purported fixes for Max's latest bugs (with some tests)
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4433 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-07 13:50:08 +00:00
dolby-oss 3113f14e23 handling for delete exprs, and a test
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4432 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-06 13:54:10 +00:00
dolby-oss b1c8a6bb6d fixes for max
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4431 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-01 17:35:32 +00:00
dolby-oss f5fc9a3c56 set source position for whole function
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4430 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-31 12:37:17 +00:00
msridhar1 cf44d3999e switch to http url to make ant happy
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4429 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-29 23:46:14 +00:00
dolby-oss d2a92ae6b3 get rhino 1.7R3
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4428 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-29 23:35:27 +00:00
dolby-oss 6ae955cf89 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@4426 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-27 20:22:43 +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 8b547b4812 Split up ForInLoopRewriter in preparation for merging changes back into
open-source WALA. The extraction code is now in com.ibm.wala.cast.js,
with some more general stuff moved to com.ibm.wala.cast and
com.ibm.wala.util. The tests are in com.ibm.wala.cast.js.test and
com.ibm.wala.cast.js.rhino.test. ForInLoopRewriter itself only contains
the framework specific tests and the copies of the frameworks
themselves.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4418 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:52:26 +00:00
msridhar1 ea76fd31ab Extraction of correlated read/write pairs needs to be done _before_
property read expansion. Extended TranslatorToCAst to support this.
Various other changes to make it possible to plug in the correlated pair
extractor.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4411 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:49:48 +00:00
msridhar1 d33880c5ce Storing more position information.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4410 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:49:19 +00:00
msridhar1 ec28aca253 Bug fix for translation of 'in' expressions.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4382 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:42:18 +00:00
msridhar1 063ddd32cd Renamed temporary variable "base" used when expanding property reads to
"$$ base" to avoid name clashes with user-defined variables.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4358 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:32:38 +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 02c1b80605 update Eclipse prefs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4325 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:24:07 +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 3d07fcb3a8 Cosmetic changes.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4305 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:18:41 +00:00
msridhar1 2ca41027c5 Fixed CAst representation of || and &&.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4304 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:18:30 +00:00
msridhar1 b517c6ca85 Started testing on MooTools.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4299 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:17:15 +00:00
msridhar1 201b28eea0 bug fixes for handling of prototype and __proto__
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4188 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-06-22 21:23:49 +00:00
msridhar1 bb445b387c javadoc
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4142 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-22 19:55:41 +00:00
msridhar1 f347c93f61 avoid storing a pointer to the Rhino AST in the object returned from walkEntity()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4141 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-22 19:55:26 +00:00
msridhar1 a7f99801b6 change BaseCollectingContext to only track one expression
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4140 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-22 19:55:09 +00:00
msridhar1 010332620f javadoc, refactoring
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4139 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-22 18:15:10 +00:00
msridhar1 e608633a51 javadoc
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4137 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-22 18:14:26 +00:00
msridhar1 1db949cdc1 javadoc, cleanup some types and remove some unnecessary code
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4136 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-22 18:14:09 +00:00
msridhar1 cf13f9f071 refactoring, javadoc, formatting
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4135 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-21 21:34:15 +00:00
dolby-oss beefde9ecb handle 'const' decls in Rhino (extension, treated like 'var' decls)
model type errors from property reads

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4114 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-13 16:16:43 +00:00
dolby-oss 5f47938e7e allow more bad javascript code
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4110 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-07 16:57:45 +00:00
dolby-oss a55a25595e turn unneeded field into local
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4109 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-07 16:57:03 +00:00
dolby-oss 78ae5ffece update to latest Rhino, 1.7R2
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4107 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-05 19:18:14 +00:00
dolby-oss b20b7d2b91 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@4098 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-04 17:17:01 +00:00
dolby-oss 79b44cc3bc 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@4092 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-04 15:27:11 +00:00
msridhar1 13ca8a7aa8 grab external deps via ant
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4073 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-03-10 22:06:18 +00:00
dolby-oss bfb9abe0c0 fix to handle redefinition of 'undefined' (yuck)
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3973 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-10-11 14:28:24 +00:00
yinnon_haviv fc0d5ecc47 - Fix the cast rewriter to rewrite labels too.
- Fix the translation of switch statements to keep the labels "alive" (part of the AST).
- Added test case for the bug.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3960 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-10-02 20:27:17 +00:00
yinnon_haviv 1d4d158de3 Replace manual creating of URL (using, e.g., "file:" + f.getAbsolutePath() ) with progrematic one.
(File.toURI().toURL()). Good for cross platform (Mac vs. Windows)

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3953 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-09-28 16:22:08 +00:00
dolby-oss eede2f13db bug fix for exceptions out of functions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3933 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-09-14 20:25:10 +00:00
msridhar1 8b41d7fc88 update to JUnit 4
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3747 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-07-27 23:21:22 +00:00
msridhar1 7911c6d9a8 remove jars from repository
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3745 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-07-27 22:51:30 +00:00
dolby-oss a3dc6411ae separate Rhino-specific portions of javascript analysis
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3731 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-07-16 18:09:54 +00:00