Commit Graph

678 Commits

Author SHA1 Message Date
Julian Dolby 5137760580 fixes to field-based pointer analysis notion of all instance keys.
filter for only those actually present in the CG
2014-10-22 11:27:48 -04:00
Julian Dolby 981fc9a4a1 fix duplicate function name.
ø
2014-10-22 11:26:31 -04:00
Julian Dolby 1bb7610011 work toward pointer analysis based on the flowgraph from field-based
call graph builder
2014-10-19 22:44:03 -04:00
Julian Dolby c9ad359d65 new test to remind me that prototype no longer works with correlation tracking:
com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestPrototypeCallGraphShapeRhino.java
com.ibm.wala.cast.js.test/harness-src/com/ibm/wala/cast/js/test/TestPrototypeCallGraphShape.java
com.ibm.wala.cast.js.test.data/examples-src/pages/prototype.html

work (not yet finished) on fixes to property accesses for JavaScript:
com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstSSAPropagationCallGraphBuilder.java
com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/ipa/callgraph/AstJavaSSAPropagationCallGraphBuilder.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/JSSSAPropagationCallGraphBuilder.java

currently unused tests to remind me to fix bugs:
com.ibm.wala.cast.js.test/harness-src/com/ibm/wala/cast/js/test/TestSimpleCallGraphShape.java
com.ibm.wala.cast.js.test.data/examples-src/tests/loops.js
com.ibm.wala.cast.js.test.data/examples-src/tests/primitive_strings.js

fixes to exception handler code generation in JavaScript:
com.ibm.wala.cast.js.rhino/source/com/ibm/wala/cast/js/translator/RhinoToAstTranslator.java
com.ibm.wala.cast.js.test.data/examples-src/tests/try.js
com.ibm.wala.cast.js.test/harness-src/com/ibm/wala/cast/js/test/TestSimpleCallGraphShape.java

fixes to make the system build on both juno and luna
com.ibm.wala.cast.js.test.data/pom.xml
pom.xml
targets/e42/e42.target
targets/e44/e44.target
targets/pom.xml
com.ibm.wala.core.tests/META-INF/MANIFEST.MF
com.ibm.wala.dalvik.test/META-INF/MANIFEST.MF
com.ibm.wala.ide.jdt.test/META-INF/MANIFEST.MF
com.ibm.wala.ide.jdt/source/com/ibm/wala/cast/java/translator/jdt/FakeExceptionTypeBinding.java
com.ibm.wala.ide.jdt/source/com/ibm/wala/ide/util/JavaEclipseProjectPath.java
com.ibm.wala.ide.jsdt.tests/META-INF/MANIFEST.MF
com.ibm.wala.ide.jsdt.tests/src/com/ibm/wala/ide/jsdt/tests/AbstractJSProjectScopeTest.java
com.ibm.wala.ide/src/com/ibm/wala/ide/util/EclipseProjectPath.java
com.ibm.wala.ide/src/com/ibm/wala/ide/util/ProgressMonitorDelegate.java

beginnings of "pointer analysis" on top of field-based analysis
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/FlowGraph.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/vertices/PropVertex.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/vertices/RetVertex.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/vertices/VarVertex.java
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/callgraph/fieldbased/flowgraph/vertices/VertexFactory.java
com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/PointerAnalysis.java
com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/cfa/ExceptionReturnValueKey.java

fixes for crashes in correlartion tracking
com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/correlations/extraction/ClosureExtractor.java

fixes for Dalvik IR generation
com.ibm.wala.core/src/com/ibm/wala/cfg/BytecodeCFG.java
com.ibm.wala.core/src/com/ibm/wala/cfg/ShrikeCFG.java
com.ibm.wala.core/src/com/ibm/wala/ssa/SSACFG.java
com.ibm.wala.dalvik.test/source/com/ibm/wala/dalvik/drivers/APKCallGraphDriver.java
com.ibm.wala.dalvik.test/source/com/ibm/wala/dalvik/test/callGraph/JVMLDalvikComparison.java
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/classLoader/DexCFG.java
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/dex/instructions/UnaryOperation.java
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ssa/AbstractIntRegisterMachine.java
com.ibm.wala.dalvik/src/com/ibm/wala/dalvik/ssa/DexSSABuilder.java

fixes to stack map generation when instrumenting for Java 7
com.ibm.wala.shrike/src/com/ibm/wala/shrike/cg/DynamicCallGraph.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/ConstantInstruction.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/analysis/Analyzer.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/analysis/ClassHierarchy.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/analysis/Verifier.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeBT/shrikeCT/ClassInstrumenter.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeCT/StackMapConstants.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeCT/StackMapTableReader.java
com.ibm.wala.shrike/src/com/ibm/wala/shrikeCT/StackMapTableWriter.java
2014-10-15 16:01:38 +09:00
Julian Dolby 6c47da8091 Merge branch 'master' of https://github.com/wala/WALA
Conflicts:
	com.ibm.wala.core.tests/src/com/ibm/wala/core/tests/shrike/DynamicCallGraphTestBase.java
	com.ibm.wala.ide.jdt.test/launchers/JDTJava15IRTests.launch
2014-10-06 15:43:42 -04:00
Julian Dolby 36709b9d1a java 7 support, with much pain for stack maps :) 2014-10-06 15:34:16 -04:00
Julian Dolby a1bc84356d scandriod merge 2014-10-01 21:32:36 -04:00
Julian Dolby 774be73672 Merge https://github.com/jgf/wala-mirror 2014-09-11 10:43:13 -04:00
Julian Dolby 26f5254e3e more support for Java 7:
analysis now understands and propagates MethodHandle objects
  fixes to Shrike InvokeDynamic instruction


Former-commit-id: fb826f124423bcbca08f729cee1794fbda711d16
2014-08-07 16:02:48 -04:00
Juergen Graf 8f6ec6bc54 cleanup 2014-07-30 15:05:15 +02:00
Juergen Graf 357ac26dee fix bugs with instruction index of javascript ssa instructions 2014-07-29 19:46:24 +02: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 3910608d60 JavaScript slicer support 2014-07-11 11:55:02 -04:00
Julian Dolby dd3124479e allow control flow in induced cfgs, and various related fixes 2014-07-08 14:44:06 -04:00
Julian Dolby df0c94f718 string concat function 2014-07-08 14:39:38 -04:00
Julian Dolby 5c0285c410 fixes to source variable name tracking, and new test to verify fix 2014-07-01 21:23:52 +02:00
Michael Heilmann ea40719069 Merge branch 'master' of https://github.com/wala/WALA into development 2014-06-26 17:52:47 +02:00
Michael Heilmann 0bb5e6998e Remove redundant casts and imports, improve doc comments 2014-06-26 17:51:26 +02:00
Julian Dolby bdea38f6bc remove some printing 2014-06-26 11:11:00 -04:00
Julian Dolby eaca036730 fix build info for maven 2014-05-28 15:11:09 -04:00
Julian Dolby 9444d24f4c put commons-io-2.4 in more places 2014-05-28 14:17:55 -04:00
Julian Dolby 7227f1fcb6 use commons io library 2014-05-28 14:01:31 -04:00
Julian Dolby 6538514b86 use commons io library 2014-05-28 13:52:40 -04:00
Julian Dolby c916e41c7a tweaks to models 2014-05-28 13:36:07 -04:00
Julian Dolby 4469e06514 handle more cases with constructors 2014-05-28 13:35:40 -04:00
Julian Dolby c179b02238 split constructor logic out of target selector, so that it can be reused
more flexibly in the field-based builders
2014-05-28 13:35:11 -04:00
Julian Dolby dcfa05d922 ignore generated variables in hack for window state 2014-05-28 13:34:25 -04:00
Julian Dolby 50373e122d 1) handle files with byte order marks
2) ignore code in comment blocks
2014-05-28 13:33:49 -04:00
Juergen Graf 4772f36d47 add standard type parameter to most pointer analysis references. When it breaks we move back to ? extends InstanceKey. 2014-05-20 22:00:06 +02:00
Juergen Graf ef4513d377 revert PointerAnalysis hack that makes containsAny() and contains() methods in OrdinalSet unusable 2014-05-20 19:52:01 +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 92bec0cc0b move to Reader API to help with annoying /r/n issues is source mapping 2014-04-29 11:21:01 -04:00
Julian Dolby 6bb598e6dc fix for annyoing \r\n newline issues in text from html files 2014-04-29 11:19:14 -04:00
Julian Dolby 05cf4e4f66 Merge branch 'master' of https://github.com/wala/WALA
Conflicts:
	com.ibm.wala.core/.classpath
2014-04-29 09:21:18 -04:00
Julian Dolby 99512c5cd0 uuse PrinterWriter; make DOM model optional 2014-04-11 10:00:05 -04:00
Julian Dolby 26684af676 bug fix for finding primitive objects 2014-04-11 09:58:34 -04:00
Julian Dolby 893f4b7308 type in CAst var decls 2014-03-16 18:05:49 -04:00
Julian Dolby de043e0780 add type left out of commit 2014-02-09 19:10:55 -05:00
Julian Dolby 969a209f1e adaot to type generalization 2014-02-08 22:51:38 -05:00
Julian Dolby e04ac682f3 final class 2014-02-08 22:51:22 -05:00
Julian Dolby 0964104dde use java functionality to handle urls 2014-02-08 22:50:59 -05:00
Julian Dolby a1ca9203a6 flow graph handles some flow through the arguments array. also a fake
'pointer analysis' is constructed using the flow graph.
2014-02-08 22:50:32 -05:00
Julian Dolby e585e1d1c2 trivial final modifier 2014-02-08 21:35:30 -05:00
Julian Dolby 428d5a0005 find arguments array vns 2014-02-08 21:34:55 -05:00
Julian Dolby ec36f2f081 propagate source names in prototype lookups 2014-02-08 21:34:34 -05:00
Julian Dolby 026f04cbfc get more error information from Rhino 2013-11-26 17:20:16 -05:00
Julian Dolby 56236dec53 further work on analysis for JavaScript in Eclipse 2013-10-16 17:37:53 -04:00
Julian Dolby 26c2be5ffb skip unknown call sites rather than crashing 2013-09-26 13:13:05 -04:00
Julian Dolby dd4d794517 merge 2013-09-18 14:00:04 -04:00
Julian Dolby 42714d9bf3 fixes for getting original source code for included locations 2013-09-18 13:55:17 -04:00
Manu Sridharan 898e1c3810 add modeling of window.onload invocation 2013-09-16 09:37:18 -07:00
Julian Dolby e9cdd57fed make some prototype function names more explicit 2013-08-29 10:18:05 -04:00
Julian Dolby 1dd180cf93 no longer add prologue files implicitly, since this code cannot always
find them now that we allow all kinds of prologues to be used
2013-08-07 15:17:48 -04:00
Julian Dolby 0117b88698 reflect function statements into 'window' object. i have checked that
firefox does this.
2013-08-07 15:11:25 -04:00
Julian Dolby d528c16b0f refactoring to integrate field-based cg builders with Eclipse-based
JavaScript front end
2013-08-05 14:35:41 -04:00
Max Schaefer 7dd4dc7f2a Fixing project names in Ant build files. 2013-07-19 13:11:16 +08:00
Manu Sridharan 757ae95ef0 add getNumberOfUses() 2013-07-10 09:44:47 -07:00
Manu Sridharan e1e67e6b9f remove unused import 2013-07-10 09:44:46 -07:00
Manu Sridharan 059d841c8c removing lexical reads and writes from invoke instructions; WIP 2013-07-10 09:44:46 -07: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
Julian Dolby 3015d1c5f9 added container access to ModuleEntry 2013-06-25 11:53:58 -04:00
Manu Sridharan 162a001ce6 remove more code for older lexical access scheme 2013-06-07 09:58:25 -07:00
Manu Sridharan f268ca91fd remove precise lexical config options; we want this to just be on 2013-06-07 09:48:00 -07:00
Manu Sridharan 321695617c delete more code 2013-06-06 20:02:42 -07:00
Manu Sridharan 472a98d7cf delete some code 2013-06-06 20:02:42 -07:00
Manu Sridharan d4b252ad51 kill NEW_LEXICAL flag 2013-06-06 20:02:41 -07:00
Max Schaefer 79b12e332e Only introduce property name contexts for constant keys. 2013-06-07 08:29:24 +08:00
Max Schaefer ef0cf8589d Forgot to set translator factory; fixed. 2013-06-07 08:29:24 +08:00
Max Schaefer 79caece0c1 Introducing convenience method for creating a loader factory without a preprocessor. 2013-06-07 08:29:24 +08:00
Max Schaefer 3adaaf50ee Correlation finder now handles both HTML files and raw JS files as
input, doesn't use WebPageLoaderFactory to create CAst anymore.
2013-06-07 08:29:24 +08:00
Max Schaefer 3d974b8313 Temporary commit; things are broken, but I need to switch back to master for a bit. 2013-06-07 08:29:24 +08:00
Manu Sridharan 68db1cc279 avoid recursive apply contexts 2013-06-03 16:47:02 -07:00
Max Schaefer fcd28ee419 More refactoring of ParameterNameContextSelector, which is now called
PropertyNameContextSelector.
2013-06-03 14:13:37 +08:00
Max Schaefer 3a0741571f Some cleanup in ForInContextSelector; now renamed to
ParameterNameContextSelector.
2013-06-03 12:18:29 +08:00
Manu Sridharan c0bae5cf86 use maven-dependency plugin to copy dependencies 2013-05-30 14:44:00 -07:00
Max Schaefer 61c48fe1bc Fixed failing test case for field-based call graph construction:
visitJavaScriptPropertyRead/Write need to be able to handle static
property writes (weren't those encoded differently before?).
2013-05-29 08:41:55 +08:00
Manu Sridharan faff1a9125 add copyright headers 2013-05-22 16:21:33 -07:00
Manu Sridharan 54593a8f46 add code for field-based call graph 2013-05-22 16:04:25 -07:00
Manu Sridharan 3b1889121b add missing copyright headers 2013-05-22 15:39:19 -07:00
Manu Sridharan e6bef253ff Merge branch 'master' into maven 2013-05-02 10:58:55 -07:00
Manu Sridharan dcc7cd206d bug fix: allow each language to determine when a CGNode represents the "definer" method for a lexical access 2013-04-29 20:34:40 -07:00
Marcel Bruch c6e88b6d80 fixed classpath, added jericho jar to classpath 2013-04-29 13:18:36 +02:00
Marcel Bruch 87c164e402 added js projects to tycho build 2013-04-29 13:13:23 +02:00
Marcel Bruch 7c2d18cd58 [releng] added preliminary maven tycho build support 2013-04-29 13:13:22 +02:00
Julian Dolby 1cc5e5ce9c fixes for bug with dead code and exception handlers 2013-04-10 21:16:12 -04:00
Manu Sridharan 00eb1d2bd2 Set all projects to build against Java 6; no semantic change. Fixes #20 2013-04-10 16:01:27 -07:00
Manu Sridharan 4f7ec12edd Expose temporary file created by source extractor. Fixes #19 2013-04-10 12:22:57 -07:00
Manu Sridharan dae0b33233 Merge branch 'master'
Conflicts:
	com.ibm.wala.cast.java/src/com/ibm/wala/cast/java/loader/JavaSourceLoaderImpl.java
	com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestSimpleCallGraphShapeRhino.java
	com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestSimplePageCallGraphShapeRhino.java
	com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/test/TestSimplePageCallGraphShapeRhinoJericho.java
	com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/vis/JsViewerDriver.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/loader/JavaScriptLoader.java
	com.ibm.wala.cast/source/java/com/ibm/wala/cast/tree/CAstEntity.java
2013-04-09 15:56:47 -07: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
Juergen Graf 80920368ef incorporate changes from other branch
- remove extraneous printing
- fixes for parse errors in JS and HTML
- fixes for handling parse errors in JS and HTML
- update comments
- Change BitVectorRepository to use LinkedLists
- improve javadoc
- fix for for in contexts for NEVER case
- missing VectorKill println method
2013-03-12 00:21:26 +01:00
Julian Dolby 7c3e13d09f remove extraneous printing 2013-03-03 19:43:45 -05:00
Julian Dolby 6bb51a6e58 fixes for parse errors in JS and HTML 2013-03-01 10:08:30 -05:00
Julian Dolby 87b856928c fixes for handling parse errors in JS and HTML 2013-03-01 10:07:20 -05:00
Julian Dolby 189a251a93 fix for for in contexts for NEVER case 2013-02-08 08:54:24 +01: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
Julian Dolby afccdd2189 Annotation support 2013-02-02 21:27:45 -05: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
Manu Sridharan 730151956f organize imports 2013-01-04 12:00:26 -08:00
Manu Sridharan 6084f4ff61 Generate proper InstanceFieldKeys for property accesses with Numbers.
Note that this change actually breaks a couple of our unit tests.  But,
it seems they were only passing by accident before anyway, and this change
at least leads to a more consistent handling of dynamic property accesses
with String vs. Number property names.
2012-12-18 10:11:59 -08:00
Manu Sridharan 5bcdb30014 add method to get a PointerKey for a global 2012-11-30 13:37:34 -05:00
Manu Sridharan 4a87d7b145 compare FieldValueDispatch objects based on CGNode as well 2012-11-30 11:04:48 -05:00
Juergen Graf b82d5dba90 Merge branch 'wala' into master 2012-11-06 04:23:10 +01:00
Manu Sridharan 3ee6f9d229 Merge branch 'master' of github.com:wala/WALA 2012-10-08 13:34:04 -07:00
Manu Sridharan fae5d9f3dd weaken recursion check slightly 2012-10-08 13:33:45 -07:00
Manu Sridharan bcee68c412 bug fix in generated IR 2012-10-08 13:32:59 -07:00
dolby d8985fe60b Merge branch 'master' of https://github.com/wala/WALA.git 2012-10-03 10:53:39 -04:00
dolby f7a7d66b28 move loop unrolling code to wala from Miniatur/MemSAT 2012-10-03 10:53:04 -04:00
Manu Sridharan 695b9948a3 fix getNodes() to correctly return nodes corresponding to constructors 2012-10-02 12:27:31 -07:00
dolby fae5c86114 fixes for users of JDT interfaces, such as Miniatur/MemSAT 2012-10-01 13:11:10 -04:00
Manu Sridharan fadcbe538d Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis 2012-09-28 15:52:00 -07:00
Max Schaefer 69b93ca7a5 More principled way of checking whether a file belongs to the harness. 2012-09-24 14:01:47 -04:00
Manu Sridharan 27d9f65b63 add some Javadoc 2012-09-20 12:08:31 -04:00
Manu Sridharan 210d4c53ea improved Javadoc 2012-09-19 11:45:49 -04:00
Manu Sridharan a3efc8bbc3 Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis 2012-09-18 14:07:37 -04:00
Max Schaefer e130a5b963 Some refactoring of prologue.js and preamble.js to use more consistent
names.
2012-09-18 13:22:17 -04:00
Manu Sridharan e4c9c7ab91 add some javadoc 2012-09-12 11:36:54 -07:00
Manu Sridharan 24eb803211 organize imports; no semantic change 2012-09-04 16:24:37 -07:00
Manu Sridharan 60db861a5f complete conversion to Unix line endings 2012-09-04 16:05:49 -07:00
Manu Sridharan 56f3d847a5 more conversion to Unix line endings 2012-09-04 15:59:50 -07:00
Manu Sridharan 256cd06460 Convert all Java source files to use Unix line endings; no semantic change 2012-09-04 15:56:05 -07:00
Max Schaefer 2a13228e50 Fixed for-in loop body extractor after recent changes to CAst representation of for-in loops. 2012-08-30 10:55:19 -04:00
dolby 17ab92b8f2 assert that the first line number is always not -1 2012-08-28 21:49:04 -04:00
Manu Sridharan 5b8da4ad32 oops, really fix the merge conflict 2012-08-28 13:13:10 -07:00
Manu Sridharan 3e04aba5fb Merge branch 'master' of riverdale.watson.ibm.com:jsanalysis
Conflicts:
	com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/util/CallGraph2JSON.java
2012-08-28 13:12:01 -07:00
Manu Sridharan 419d1d50cc Merge branch 'github_master' and remove Eclipse dependencies.
Specifically, rewrite ProgressMaster to not depend on Eclipse, and move
to com.ibm.wala.util.  Now, we can use timeout-based code in packages
without introducing an Eclipse dependency.
2012-08-28 12:39:52 -07:00
Juergen Graf b8477d2144 incorporate changes from other branch
- basic compatibility with Java 7 (i.e., don't crash immediately)
- Added utility class for converting call graphs to JSON.
- add edgeExists CLI option to check if some edge exists in the call graph
2012-08-06 12:49:03 +02:00
Max Schaefer f091bb3aca Added utility class for converting call graphs to JSON. 2012-07-31 14:31:34 -04:00
Max Schaefer c9bdd48360 Added utility class for serialising call graphs to JSON. 2012-07-31 14:14:04 -04:00
Juergen Graf 4648f0404a Merge branch 'wala' into master 2012-07-17 13:57:43 +02:00
Manu Sridharan 9847bf21f4 Merge remote-tracking branch 'origin/master' 2012-07-12 10:30:56 -07:00
Manu Sridharan 9a0e105e51 fix so that new lexical scheme can be enabled with Java frontends 2012-07-12 10:27:24 -07:00
Max Schaefer ff3416a89f Be more careful when determining source-level names for SSA variable to
avoid index-out-of-bounds accesses.
2012-07-05 11:20:25 -04:00
Max Schaefer fca3999e9a Fixed rewriting of non-constant switch cases. 2012-07-05 09:37:47 -04:00
Manu Sridharan f6e52c9b93 Merge remote-tracking branch 'riverdale/master' 2012-07-04 10:27:13 -07:00
Max Schaefer 7bdc127ce5 Workaround for invalid end positions in CAst. 2012-07-04 12:19:05 -04:00
dolby d0d1ff1a2b Merge branch 'master' of https://github.com/wala/WALA.git 2012-07-03 19:22:37 -04:00
dolby f7eb9bd174 apply changes for WALA git issue 3 2012-07-03 19:22:08 -04:00
Manu Sridharan 1a5f8954f2 fix NPE 2012-07-03 15:55:14 -07:00
dolby 4b3cba710d changes from upstream 2012-06-29 15:47:54 -04:00
Juergen Graf 10792bec73 Merge branch 'wala' into master 2012-05-16 14:02:20 +02:00
dolby b2034ed90f extensions to HTML file source position tracking 2012-05-08 14:03:43 -04:00
dolby dfe06b8ff3 changes to Web source mapping to exploit rhino 1.7R3 source offsets 2012-05-08 13:17:01 -04:00
Juergen Graf c71fa6674a Merge branch 'wala' into master 2012-04-19 14:39:05 +02:00
Manu Sridharan 2edb070437 changed FileProvider to have instance methods 2012-04-16 14:57:14 -04:00
Juergen Graf 7477b1730b Merge branch 'wala' into master 2012-03-19 13:33:48 +01:00
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 8f4ddd6920 remove warnings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4537 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-03-03 00:25:47 +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 3a5013d8e5 generalize hack for finding 'base' variables. fix bugs in renaming arguments.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4526 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-23 17:44:09 +00:00
msridhar1 ec7be6dc39 Got rid of IntegerContextItem and BooleanContextItem and replaced them
by uses of ContextItem.Value.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4514 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:27:16 +00:00
msridhar1 1ae581819f add one level of caller-site sensitivity for call() and apply(); experimental
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4513 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:27:03 +00:00
msridhar1 5c2ca88ba2 more comments
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4511 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:26:36 +00:00
msridhar1 5bc7fb3e44 Within for/in bodies, use a marker for/in context instead of a CallerSiteContext
to better handle certain recursion.  Still needs better Javadoc

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4510 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:26:24 +00:00
msridhar1 d1974d8b54 new context selector that just checks for recursion instead of bounding it
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4509 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:26:14 +00:00
msridhar1 a840e068d6 When extracting correlated pairs, check that the extraction region does
not reference the "arguments" variable.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4506 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:25:39 +00:00
msridhar1 a3d0b45eef Added support for localising variables through which correlated reads
flow. This somewhat compensates for the lack of SSA form for closure
variables under the new lexical scheme.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4505 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:25:22 +00:00
msridhar1 5106842f30 fix memory leak
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4504 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:25:06 +00:00
msridhar1 efcbdd625c Merge remote-tracking branch 'riverdale/extractor-fix' into lexical-again
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4502 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:24:48 +00:00
msridhar1 e60be259ae avoid crashes in LoadFileTargetSelector
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4500 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:24:08 +00:00
msridhar1 1eb7236267 use a CallStringContext when hitting the recursion bound with constructors
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4499 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:23:57 +00:00
msridhar1 e9d2ad598a move recursion bound selector to HTMLCGBuilder; a temporary solution
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4497 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:23:37 +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 59d602e9b7 added a recursion check
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4490 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:20:36 +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 5c0c7eb7f8 pref off generating separate call methods per site; better handled in a context selector, as this was causing non-termination
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4487 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:19:49 +00:00
msridhar1 bd71761645 Un-finalled flag WARN_ABOUT_IMPRECISE_CALLGRAPH to make it configurable
from TestUtil.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4486 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:19:40 +00:00
msridhar1 6d2f186f36 re-enable ScopeMappingContexts
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4482 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:19:03 +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
msridhar1 8988ff3b0f more precise model of Function.prototype.apply(); read correct properties from arguments array
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4479 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:18:16 +00:00
msridhar1 197ec11f35 small optimization: avoid calling TypeName.toString() in some cases
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4478 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:18:07 +00:00
msridhar1 19bd95238a Adding a context item containing the index.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4477 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:17:55 +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 21e17b0928 some cleanup
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4475 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:17:30 +00:00
msridhar1 fcf0aa824d in the Function.apply() context selector, only add one-level of call strings when an ApplyContext is also being used
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4474 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:17:22 +00:00
msridhar1 fe9dbe1128 Added optional one-level callstring sensitivity for
Function.prototype.apply

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4471 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:16:47 +00:00
msridhar1 dd2a04e1a7 Fixed a bug where the index of the argument to check for use as a
property name was ignored.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4470 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:16:36 +00:00
msridhar1 49bd12c0ec no need for ScopeMappingContexts with new lexical scheme
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4469 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:16:26 +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 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 c9ee502acc another bug fix
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4464 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-17 20:15:02 +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
Max Schaefer aa00b04c00 Some more fixes to the closure extractor; now only a single test fails. 2012-02-09 08:21:10 -05:00
msridhar1 6449da85df Some final fixes to the for-in body extractor; it now seems to work as
before.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4451 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:35:32 +00:00
msridhar1 6e1d5783e6 Fixed search for closest enclosing block, which could run into an
infinite loop.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4446 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:33:58 +00:00
msridhar1 0c07531918 Make WARN_ABOUT_IMPRECISE_CALLGRAPH non-final so we can flip it at
runtime.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4445 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:33:45 +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 12b68c9a11 Some more changes to the closure extractor to make it play better with
Rhino 1.7.3.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4441 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:32:59 +00:00
msridhar1 96263c8736 Adapted generation of fixup code for return and goto to Rhino 1.7.3.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4440 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:32:46 +00:00
msridhar1 39297b0c3d More adjustments to Rhino 1.7.3 CAst.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4439 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:32:32 +00:00
msridhar1 174a30454c Started to update the closure extractor to work with Rhino 1.7.3.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4438 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-02-08 15:32:15 +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 8e94f4fb96 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@4427 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-27 20:23:57 +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 4442683421 Better fix for the issue with null instance keys in the
ForInContextSelector: turn them into ConcreteTypeKeys for LUndefined.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4413 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:50:22 +00:00
msridhar1 b9ff3d0857 Removed bailout on null argument, which breaks jQuery tests.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4412 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:50:08 +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 30dbcd1e0b ForInContextSelector can now be parameterised on the argument index on
which to specialise.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4409 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:49:08 +00:00
msridhar1 c18cc405f7 fix disabling of call / apply for ajaxslt test
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4408 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:48:53 +00:00
msridhar1 da746ac8a4 add disabling of load target selector to options
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4407 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:48:28 +00:00
msridhar1 ea7be296c8 create JSAnalysisOptions, and use to add proper option to disable handling of call / apply
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4405 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:48:01 +00:00
msridhar1 bbbc93d8c6 Introduced extra switch to turn off the LoadFileTargetSelector.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4404 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:47:37 +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 a12194cc92 fix handling of Function.prototype.apply. Disable testAjaxslt, which blows up with the fix enabled
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4402 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:47:09 +00:00
msridhar1 207d40811f add flag to disable handling of Function.prototype.call
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4401 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:46:50 +00:00
msridhar1 59fae9a7e9 Added very crude handling of addEventListener.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4400 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:46:36 +00:00
msridhar1 9e386ff310 re-implement delegating context, to ensure we have a proper equals() and hashCode()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4398 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:46:08 +00:00
msridhar1 48fd56f3ee use call string contexts for constructors rather than the enclosing CGNode. also, fix an imprecision with passing ScopeMappingContexts
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4396 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:45:35 +00:00
msridhar1 723cab3e42 don't add a bunch of irrelevant Java-specific context selectors
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4393 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:44:53 +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 5f6fc74836 Forgot to add equals/hashCode to ArgumentInstanceContext before.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4387 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:43:22 +00:00
msridhar1 df30320720 Cosmetic change.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4386 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:43:09 +00:00
msridhar1 4c4d83ed5b Getting rid of two low-level hacks for now.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4385 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:43:00 +00:00
msridhar1 fbbd401c9a Added optional object sensitivity for functions returning 'this'.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4384 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:42:47 +00:00
msridhar1 ee11f7481a Some temporary hacks to make MooTools analyse.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4383 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:42:31 +00:00
msridhar1 0486cea6bb Warn about call graph imprecision if an unlikely use of
Function.prototype.call is detected.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4380 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:37:49 +00:00
msridhar1 5608a3ce73 Function is a function.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4379 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:37:36 +00:00
msridhar1 c48935c0b9 Improved target selector for Function.prototype.call to handle cases
where it is invoked as a constructor. As this is almost certainly due to
call graph imprecision, we optionally emit a warning when this happens.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4372 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:35:52 +00:00
msridhar1 6e922aac6a Shouldn't use IMethods as keys in maps.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4371 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:35:38 +00:00
msridhar1 fc57c3b878 small optimizations; don't call toString() as much
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4370 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:35:24 +00:00
msridhar1 f874332a9d Bug fix: only use ToString conversion if we are sure the variable is
only ever used as a property name.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4369 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:35:08 +00:00
msridhar1 74502bafb8 Cleaner handling of for-in context selection: instead of matching on
function name, we now use a for-in context for every function that
uses its first argument as a property name. There is a flag to restore
the old behaviour.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4368 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:34:54 +00:00
msridhar1 3388b8dc7b Removing custom context selector for Function.prototype.call; it doesn't
seem worth having.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4367 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:34:40 +00:00
msridhar1 df0525d55c Extending for-in context selector to also provide contexts for functions
that perform for-in iteration on their first parameter.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4366 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:34:27 +00:00
msridhar1 7026301ed4 Fixed unsoundness in the context selector; unsurprisingly, this makes
the analysis explode on MooTools again...

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4363 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:33:48 +00:00
msridhar1 e62fdc5b1f Added custom context selector for uses of Function.prototype.call, which
adds object sensitivity on such uses.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4362 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:33:34 +00:00
msridhar1 46dc767549 Minor change.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4361 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:33:19 +00:00
msridhar1 f0bee15f9f Minor change.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4360 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:33:06 +00:00
msridhar1 87ea0760cf Additional check to ensure that the expected number of arguments is
provided.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4359 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:32:51 +00:00
msridhar1 899824081e always add one level of call-string sensitivity for constructors
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4356 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:32:12 +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 6e4db282b6 undo change
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4351 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:30:59 +00:00
msridhar1 a55135831e fix missing semi-colon
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4347 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:30:02 +00:00
msridhar1 fc1a961c4c undo hacks
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4346 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:29:52 +00:00
msridhar1 48b42a18a0 tinkering with jquery
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4345 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:29:42 +00:00
msridhar1 2989bc2e6a add flag to disable handling of Function.apply()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4344 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:29:27 +00:00
msridhar1 fa1f572d60 add one level of call-string sensitivity for Function.apply()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4342 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:29:01 +00:00
msridhar1 8c2fd9cb10 kill some old code and rename a class
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4340 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:28:34 +00:00
msridhar1 6a2dc42d49 fix a couple of NPEs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4338 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:28:02 +00:00
msridhar1 efa0efa796 fix bad method overriding
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4334 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:26:41 +00:00
msridhar1 c250331e78 more work on Function.apply(), but regression tests aren't passing yet
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4333 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:26:23 +00:00