Commit Graph

309 Commits

Author SHA1 Message Date
Erik Derr ee13713c4d Impl of IMethod.is(Wala)Synthetic and IClass.isSynthetic (#359)
* Impl of IMethod isSynthetic and isWalaSynthetic

So far IMethod.isSynthetic referred to WALA-generated helper functions
and there was no equivalent to check whether an IMethod is synthetic in
terms of compiler-generated.

To make naming consistent this patch first renames the isSynthetic to
isWalaSynthetic to clearly indicate that a given IMethod was generated
by WALA. Then, we re-introduce isSynthetic that from now on checks
whether an IMethod is synthetic/compiler-generated (referring to the
synthetic flag in bytecode)

* Implementation of IClass.isSynthetic

Complementary to IMethod.isSynthetic, this method checks whether
an IClass is compiler-generated.

* updated JavaDoc
2018-10-02 22:28:21 -07:00
Manu Sridharan 49628fdf44 Start new development version 2018-08-22 12:01:19 -07:00
Manu Sridharan 6b46ce4faa Version 1.5.0 2018-08-22 11:19:51 -07:00
Julian Dolby 0ad11fefc3 work on Wala with Yannis' group 2018-07-22 16:19:32 -04:00
Ben Liblit 5336a08af2 Avoid using deprecated boxing constructors
Boxing a primitive using the constructor ("new Integer(4)") always
creates a distinct new boxed instance.  That's rarely what you need,
and in fact all of those constructors have been deprecated in Java 9.
Using the static "valueOf" method instead ("Integer.valueOf(4)") can
give better performance by reusing existing instances.  You no longer
get a unique boxed object, but generally that's OK.
2018-06-05 14:44:59 -05:00
Julian Dolby d2852beebf
Merge pull request #312 from liblit/gradle-load-plugins-modernization
Load Gradle plugins using “plugins” closure rather than “apply plugin”
2018-06-04 12:22:33 -04:00
Julian Dolby 196f7cb153 fix for nasty bug in decoding dup2_x2 2018-05-31 19:32:02 -04:00
Ben Liblit e2ce6a84b0 Load plugins using "plugins" closure rather than "apply plugin"
Apparently the latter is considered a "legacy method":
<https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application>.
2018-05-23 16:47:58 -05:00
Ben Liblit 209086f068 Bump version to 1.5.0-SNAPSHOT before merging with WALA master
This gives the WALA maintainers the option of doing future 1.4.5+
releases from of a pre-Gradle branch if these merged Gradle changes
turn out to be more disruptive than expected.
2018-04-18 11:29:29 -05:00
Ben Liblit b14804bfdc Don't put fixed-name, writable files into "java.io.tmpdir"
If multiple tests both write to "/tmp/cg.txt" (for example), then
these tests cannot safely run concurrently.  That never used to be a
problem with Maven, since our Maven tests were all strictly sequential
anyway.  But parallelized testing using Gradle requires that we do
better.  Fortunately, Java has perfectly reasonable APIs for
generating uniquely-named temporary files and directories.
2018-04-18 11:29:29 -05:00
Ben Liblit 6bcca003a2 Tweak output dirs to match what Buildship puts into ".classpath" 2018-04-18 11:29:25 -05:00
Ben Liblit 89860b53bb Let Buildship create new settings files when importing
These settings files currently are generated with an initial timestamp
comment line, which is not something we'd want to track in version
control.  Fortunately, the contents of these files are entirely
mundane, so there should be no problem with having Buildship generate
them anew each time a developer imports WALA into Eclipse as an
existing Gradle project.
2018-04-18 11:29:25 -05:00
Ben Liblit 4b48f8ee4d Have Buildship add Eclipse plugin (PDE) nature to some subprojects
Specifically, we need this for subprojects that build included plugins
for any of the "*_feature" subprojects.
2018-04-18 11:29:25 -05:00
Ben Liblit 310ef1daa5 Exclude Eclipse ".project" and ".classpath" from version control
Apparently Buildship generates these when one uses Import -> Existing
Gradle Project:
<https://discuss.gradle.org/t/buildship-eclipse-plug-in-multiproject-builds/24030/5>.
We can use the Gradle "eclipse" plugin if customizations are
necessary, but my impression is that the intent is to treat ".project"
and ".classpath" as generated files, not sources to be tracked in
source control.
2018-04-18 11:29:25 -05:00
Ben Liblit 5d5fa18b5f Replace source directories rather than appending to them
I was confused about the differences among:

	srcDir 'foo'
	srcDirs ['foo']
	srcDirs = ['foo']

As it turns out, the first two append to the set of source
directories, while the last replaces this set entirely.  I generally
want replacement, since WALA's current directory layout never matches
Gradle's assumed defaults.
2018-04-18 11:29:25 -05:00
Ben Liblit 530d74929f Many improvements to Gradle build support, including within Eclipse 2018-04-18 11:29:24 -05:00
Sungho Lee 50d0f7ee71 Change build.gradle files for proper format and delete all tests 2018-04-18 11:29:24 -05:00
Sungho Lee 4a31927b00 Gradle build scripts 2018-04-18 11:29:24 -05:00
Ben Liblit 99c2493e37 Revert "Build WALA using Gradle instead of Maven" (#298) 2018-04-18 12:15:56 -04:00
Ben Liblit 6639d8b93a Bump version to 1.5.0-SNAPSHOT before merging with WALA master
This gives the WALA maintainers the option of doing future 1.4.5+
releases from of a pre-Gradle branch if these merged Gradle changes
turn out to be more disruptive than expected.
2018-04-17 15:32:01 -05:00
Ben Liblit 7886fa13dc Don't put fixed-name, writable files into "java.io.tmpdir"
If multiple tests both write to "/tmp/cg.txt" (for example), then
these tests cannot safely run concurrently.  That never used to be a
problem with Maven, since our Maven tests were all strictly sequential
anyway.  But parallelized testing using Gradle requires that we do
better.  Fortunately, Java has perfectly reasonable APIs for
generating uniquely-named temporary files and directories.
2018-04-17 15:02:36 -05:00
Ben Liblit d14d40ee3f Tweak output dirs to match what Buildship puts into ".classpath" 2018-04-17 15:02:35 -05:00
Ben Liblit efd3a6ab18 Let Buildship create new settings files when importing
These settings files currently are generated with an initial timestamp
comment line, which is not something we'd want to track in version
control.  Fortunately, the contents of these files are entirely
mundane, so there should be no problem with having Buildship generate
them anew each time a developer imports WALA into Eclipse as an
existing Gradle project.
2018-04-17 15:02:35 -05:00
Ben Liblit da27efec97 Have Buildship add Eclipse plugin (PDE) nature to some subprojects
Specifically, we need this for subprojects that build included plugins
for any of the "*_feature" subprojects.
2018-04-17 15:02:35 -05:00
Ben Liblit be11083cd8 Exclude Eclipse ".project" and ".classpath" from version control
Apparently Buildship generates these when one uses Import -> Existing
Gradle Project:
<https://discuss.gradle.org/t/buildship-eclipse-plug-in-multiproject-builds/24030/5>.
We can use the Gradle "eclipse" plugin if customizations are
necessary, but my impression is that the intent is to treat ".project"
and ".classpath" as generated files, not sources to be tracked in
source control.
2018-04-17 15:02:35 -05:00
Ben Liblit 651f40c170 Replace source directories rather than appending to them
I was confused about the differences among:

	srcDir 'foo'
	srcDirs ['foo']
	srcDirs = ['foo']

As it turns out, the first two append to the set of source
directories, while the last replaces this set entirely.  I generally
want replacement, since WALA's current directory layout never matches
Gradle's assumed defaults.
2018-04-17 15:02:35 -05:00
Ben Liblit 401fbaf89a Many improvements to Gradle build support, including within Eclipse 2018-04-17 15:02:35 -05:00
Sungho Lee 6dceb3d8ef Change build.gradle files for proper format and delete all tests 2018-04-17 15:00:03 -05:00
Sungho Lee 04923544f0 Gradle build scripts 2018-04-17 15:00:03 -05:00
Ben Liblit 4bb4a3104a WALA uses Git, so CVS ignore patterns are moot 2018-04-14 19:08:14 -05:00
Julian Dolby cd944a8f12 refactoring of CAst front end machinery to allow more reuse 2018-01-25 14:42:27 -05:00
Ben Liblit f60c164ec1 Escape "<" and ">" in Javadoc when not used as HTML tag syntax 2017-12-19 16:53:52 -06:00
Julian Dolby d29e278291 more instrumentation fixes
remove junk from dominators
2017-12-08 11:19:41 +08:00
Julian Dolby 5a02cde690 more flexibility to not extract calls for invokedynamic. Potentially, this will break instrumented methods that have massive numbers of invokedynamics in them, but that seems unlikely to happen at least with Java use of invokedynamic so far. We can burn this bridge when we come to it. 2017-12-06 19:04:27 +08:00
Ben Liblit b25e461bfe Convert a few more loops into modern for-each loops 2017-12-04 14:04:39 -08:00
Julian Dolby b68ff20c82
Merge pull request #269 from liblit/modernization-java-8-lambdas-and-method-references
Use Java 8 lambdas and method references wherever possible
2017-12-03 09:54:09 +08:00
Julian Dolby 803243ea53 Merge branch 'master' of https://github.com/wala/WALA 2017-12-01 20:02:00 +08:00
Julian Dolby 7cd2a2acf8 Fixes for instrumentation of invoke dynamic 2017-12-01 20:01:16 +08:00
Ben Liblit 9c83e87cc1 Merge branch 'master' into modernization-java-8-lambdas-and-method-references 2017-11-29 10:51:33 -06:00
Ben Liblit ebfd885d22 Use modern for-each loops where possible
Java sources used as test data have been excluded from this mass
clean-up.
2017-11-28 14:44:53 -06:00
Ben Liblit 6261880264 Remove unnecessary casts of lambda expressions 2017-11-27 11:31:15 -06:00
Ben Liblit 74e0640771 Replace simple lambdas with method references wherever possible 2017-11-27 11:31:15 -06:00
Ben Liblit 790d37781b Convert many single-method anonymous classes to lambdas
Eclipse's automated code clean-up tool did most of the heavy lifting
here: it specifically has a clean-up option for converting functional
interfaces to lambdas.  I merely had to revert the automated changes
for a single enumeration class for which it produced invalid results,
and for a few test inputs that apparently aren't set up to be compiled
with Java 8.
2017-11-27 11:31:15 -06:00
Ben Liblit 9ef6ff1a9c Remove "build.xml" files not used by corresponding "pom.xml" files 2017-11-26 18:11:56 -06:00
Ben Liblit ded9e880b1 Update Maven Central configurations to also use Java 8 (#264)
E-mail exchanged with Julian Dolby suggests that this is the right
thing to do, and that it should have been done back when we converted
other parts of the build configuration to Java 8.
2017-11-23 12:55:05 -08:00
Julian Dolby d124256835 remove java 7 support 2017-11-11 21:20:41 -05:00
Karim Ali 423db824b3 adding support for the dynamic call graph experiments
currentSite should be ThreadLocal because not having this screws up a lot of the instrumentation-based dynamic call graphs we generate for the shootout benchmarks.

I have also conditionally changed how the string of the currentSite is created based on the output format that Julian came up with for the dynamic call graph. This support is necessary, because the Java std libraries are not instrumented. Therefore, they would appear as if calls from them show up from nowhere in the log that WALA generates for the dynamic call graph. This fix make those calls originate from a fake library BLOB node in the call graph.
2017-10-23 17:54:01 -06:00
Julian Dolby 26d354d1fc remove debug printing 2017-10-19 17:38:37 -04:00
Julian Dolby 11120329e1 fix messages about final; these vaiables do not need to be final in Java 8, really. 2017-10-19 15:02:19 -04:00
Julian Dolby 0f2d9b7635 fixes to dynamic CG to minimize bloating of methods 2017-10-19 13:12:21 -04:00