Commit Graph

335 Commits

Author SHA1 Message Date
msridhar1 1d28b2dc26 fix for bug reported by Juergen Graf: handle multiple fields with the same name in a JVM class
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4552 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-04-03 22:26:12 +00:00
dolby-oss a93dc6fcc5 minor cleanup
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4543 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-03-08 17:34:36 +00:00
dolby-oss 70678e1e4a add type parameters
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4536 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-03-01 13:18:59 +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
dolby-oss 9b2b4c6f51 remove unused declaration on public method
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4528 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-23 17:45:20 +00:00
dolby-oss 2f7107ac44 remove import warning
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4527 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-23 17:44:39 +00:00
dolby-oss f4a1544a2d fix overly-restrictive assertions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4521 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-20 16:04:48 +00:00
msridhar1 0d0d2b89a9 improve toString()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4508 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:26:00 +00:00
msridhar1 1dfacdfe4c make it easier to identify ArgumentInstanceContexts
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4507 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:25:49 +00:00
msridhar1 cafc761a7c bug fix
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4503 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:24:56 +00:00
msridhar1 5f2733bd0e fix some compile errors
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4501 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:24:32 +00:00
msridhar1 965896c210 add general recursion bounding via an additional context selector. Also, completely eliminate dependence on contexts for correct pointer analysis with new lexical scheme.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4496 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:23:21 +00:00
msridhar1 954a1f091b more work on precise lexical configuration
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4495 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:22:55 +00:00
msridhar1 4037ef9b02 add new analysis option JSAnalysisOptions.usePreciseLexical(), which allows for a less precise handling of lexical accesses
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4494 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:22:30 +00:00
msridhar1 a3826f23a8 refactoring: rename some Util classes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4492 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:21:59 +00:00
msridhar1 92d8dc1e3d Revert "refactor context selectors: extract delegation into ComposedContextSelector"
This reverts commit 7ff1219c5baed388a82d14fcf81d2b1f456c4e95.  That commit broke
a dojo test, and I'm not sure why.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4491 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:21:18 +00:00
msridhar1 edd300cf00 refactor context selectors: extract delegation into ComposedContextSelector
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4489 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:20:26 +00:00
msridhar1 1ac2dc110e better recursion check
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4484 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:19:22 +00:00
msridhar1 3b5ba61cc0 add recursion check
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4483 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:19:13 +00:00
msridhar1 16c798c790 bug fix: only generate one synthetic method representing Function.prototype.apply
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4476 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:17:44 +00:00
msridhar1 300377a428 disabled LexicalScopingResolverContexts with new scheme
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4468 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:16:15 +00:00
msridhar1 2dda77a0fb another bug fix; looking good...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4467 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:15:57 +00:00
msridhar1 bfb24934af another bug fix; getting closer...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4466 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:15:38 +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
msridhar1 3445c0b090 renaming of exposed parameters
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4460 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:14:03 +00:00
msridhar1 1d4f5ff639 initial code to compute exposed names
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4459 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:13:52 +00:00
msridhar1 24574114b9 Taught CAstPrinter about EACH_ELEMENT_GET and EACH_ELEMENT_HAS_NEXT.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4436 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:31:52 +00:00
msridhar1 3f26b1d108 New node pattern to express alternatives.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4435 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:31:40 +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 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 aa5cf116be Bug fix for lexical_broken.js
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4416 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:51:11 +00:00
msridhar1 533344e43f Amended toString of ReflectedFieldPointerKeys to also print information
about the container object.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4414 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:50:36 +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 2f86937ae1 some more diagnostic code in TestUtil, related changes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4399 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:46:27 +00:00
msridhar1 67b2103a49 no scoping contexts for built-in Object and Array constructors
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4397 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:45:49 +00:00
msridhar1 caf83a7857 don't use lexical scoping contexts for the array constructor
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4395 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:45:22 +00:00
msridhar1 f8132eab21 optimize recursion check
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4392 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:44:39 +00:00
msridhar1 2a61536747 fixed recursion check for lexical scoping contexts
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4390 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:44:11 +00:00
msridhar1 082607327d test case for bad recursion check bug
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4389 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:43:58 +00:00
msridhar1 16317238ff Print call graph information more compactly.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4378 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:37:27 +00:00
msridhar1 6051baf5fb fix bug exposed by wrap3.js: we were not recusring properly in ScopeMappingInstanceKey.getFunargNodes()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4377 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:37:13 +00:00
msridhar1 ed37d9ee5d another failing test case for scoping and closures
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4376 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:36:59 +00:00
msridhar1 eb508d52f1 polishing of fix for wrap2.js issue
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4375 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:36:37 +00:00
msridhar1 22fa1d4692 initial version of bug fix for wrap2.js; needs to be commented / polished
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4374 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:36:23 +00:00
msridhar1 63c20d5f8d reset default timeout in TestUtil; kill CGNodeResolver.toString()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4357 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:32:25 +00:00
msridhar1 9aabf5c042 extra javadoc
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4355 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:31:57 +00:00
msridhar1 e4bab37a82 bug fix with cached DefUse in AstCGNode
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4353 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:31:30 +00:00