Commit Graph

34 Commits

Author SHA1 Message Date
Julian Dolby b2503628a4 1) a bit more source mappimg information
2) fixes to how Contexts are combined
2018-10-13 08:42:08 -04:00
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
Julian Dolby 9aed4e058d more tracking of sourse positions for function parameters 2018-06-05 15:00:31 -04:00
Julian Dolby 6b2db3e190 more-detailed source mapping information 2018-05-08 08:01:35 -04:00
Ben Liblit a888a49fdd Fix all Eclipse warnings about unnecessary semicolons
I have *not* upgraded this problem to be treated as an error in the
future.  Unfortunately Eclipse uses a single configuration setting for
both unnecessary semicolons and also for empty control-flow statements
like `while (p) ;`.  I'm not convinced that it's worth rewriting all
instances of the latter into `while (p) { }`.  So this is just going
to stay as a warning for now.
2017-07-14 22:39:01 -07:00
Ben Liblit e316471d88 Fix nearly all Eclipse warnings about using raw types
Along the way, I also converted many "for (;;)" loops into modern
"for (:)" loops.  I didn't systematically look for all opportunities
to do this, though.  I merely made this change where I was already
converting raw Iterator uses into modern Iterator<...> uses.

Better use of generics also allowed many casts to become statically
redundant.  I have removed all such redundant casts.

Only three raw-types warnings remain after this batch of fixes.  All
three involve raw uses of CallGraphBuilder.  I've tried to fix these
too, but it quickly snowballs into a cascade of changes that may or
may not eventually reach a statically-type-save fixed point.  I may
give these last few problem areas another go in the future.  For now,
though, the hundreds of other fixes seem worth keeping even if there
are a few stragglers.

This commit may change some public APIs, but only by making weaker
type signatures stronger by replacing raw types with generic types.
For example, we may change something like "Set" into "Set<String>",
but we're not adding new arguments, changing any
underlying (post-generics-erasure) types, etc.
2017-07-12 10:39:06 -07:00
Ben Liblit 4cef26162c Add @Override annotations wherever possible (#178)
* Fix warnings about unset javacProjectSettings build entries

Specifically, these are all warnings of the form "The
'javacProjectSettings' build entry should be set when there are project
specific compiler settings".

* Add @Override annotations to all methods that do override

This fixes 287 Eclipse code style warnings.

* Cannot add @Override annotations here, so suppress warnings instead

We should be able to add these @Override annotations in the future,
one Eclipse Mars and earlier are no longer supported.  For now,
though, they have to go away in order to be compatible with older
Eclipse releases.
2017-05-08 07:39:49 -07:00
Julian Dolby a8a3699ee1 type cleanups 2017-02-23 10:10:39 -05:00
Julian Dolby d85226fa93 nnotation 2017-01-03 20:55:46 -05: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
Manu Sridharan d2933d49b2 delete a little more code and javadoc 2013-06-06 20:02:42 -07:00
Julian Dolby 1cc5e5ce9c fixes for bug with dead code and exception handlers 2013-04-10 21:16:12 -04: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 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
Juergen Graf 7477b1730b Merge branch 'wala' into master 2012-03-19 13:33:48 +01: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 aa94e28908 some javadoc
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4348 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-06 21:30:17 +00:00
Juergen Graf f5ac0c543f Merge branch 'wala' into master 2011-07-12 19:50:39 +00:00
dolby-oss b27fd8de26 performance work on lexical scoping
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4192 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-06-30 15:45:58 +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
Juergen Graf 47711fd310 read enhanced bytecode postions from class attributes 2011-03-30 13:03:16 +02:00
msridhar1 05744fe19b change isVolatile() in IMethod to isBridge(), better reflecting Java spec
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3777 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-12-03 16:56:49 +00:00
dolby-oss e877067710 Ishizaki-san's patch for hasMonitorOp
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3733 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-07-17 13:58:55 +00:00
sjfink 9939142eae switch from Assertions._assert to Java assertions
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3555 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-30 13:16:52 +00:00
msridhar1 5fd0909a7d changed execution environment to J2SE1.5. Fixed some warnings.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3113 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-02 17:01:50 +00:00
dolby-oss 309a9b6d72 enhancements to handling of lexical scoping
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3109 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-02 14:08:12 +00:00
dolby-oss 42ffd051dc optimization of getAllExposedUses for lexical scoping
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3046 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-10-03 20:10:09 +00:00
sjfink 9e79661c60 just refactoring ... introduce 2 new packages in wala.util.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2447 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-24 22:05:51 +00:00
egeay 44d92505c6 Fixed getSignature method in order to return the usual scheme for method signatures in WALA.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1742 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-09-11 15:36:38 +00:00
dolby-oss 1812d506bd fix to isInit predicate in AstMethod
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1277 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-14 17:43:30 +00:00
dolby-oss d958868f41 a but more javadoc; added accessor for getting all value numbers exposed to lexical scoping; allow scopes during translation to ask for parent scopes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1274 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-12 13:43:16 +00:00
dolby-oss 25a4b64c12 Added source position information for entire code bodies as a whole
Rewrote to the mechanism for invoking the callbacks for lexical scoping to not suck as much as before, i.e. it is somewhat less inefficient

adapt to filter instance key changes

bug fixes to IR generation for switch statements


git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@839 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-03-12 02:00:43 +00:00
dolby-oss 3d9390a397 Initial contribution of core script analysis code
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@616 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-02 17:17:13 +00:00