Bug 93253 - -XlazyTjp should be default, and -XlazyTjp Lint warning not always given
Summary: -XlazyTjp should be default, and -XlazyTjp Lint warning not always given
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: 1.5.0RC1   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-29 06:03 EDT by Andrew J Huff CLA
Modified: 2005-11-02 03:27 EST (History)
0 users

See Also:


Attachments
Fix to make Xlazytjp the default (3.10 KB, application/octet-stream)
2005-05-03 09:39 EDT, Andrew Clement CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew J Huff CLA 2005-04-29 06:03:51 EDT
First off the -XlazyTjp option works and either makes the AspectJ program faster
or doesn't make it slower, so it should be the default rather than having to be
specified by a command line option.

Next, the lint message that is supposed to be generated when a piece of before
advice could have been lazy but isn't, due to a piece of around advice on the
same join point, isn't generated if that around advice uses 'thisJoinPoint'.

A Code example:

public aspect Scenario5 {

    public static boolean enabled = true;

    pointcut toBeTraced() : execution(* *(..)) && !within(Scenario5);

    before () : toBeTraced() && if(enabled) {
        Object[] args = thisJoinPoint.getArgs(); // because of the around advice
below this isn't made lazily
        System.out.println(thisJoinPoint + ", arg's: " + args.length);
    }

	Object around() : toBeTraced() && if(enabled) {
		Object[] args = thisJoinPoint.getArgs(); // only with this line commented out
is the Xlint warning produced though!
        return proceed();
    }
	
}

class Test{
  static void main(String [] args){
 }
Comment 1 Andrew Clement CLA 2005-05-03 05:42:24 EDT
Have patch from Andrew - integrate for M3.
Comment 2 Andrew Clement CLA 2005-05-03 09:39:53 EDT
Created attachment 20633 [details]
Fix to make Xlazytjp the default

Needs a deprecated style message if the option is used - to indicate it is now
the default.  personally, I might have made it 'default' to true further down
the infrastructure rather than in the options parsing code.
Comment 3 Andrew J Huff CLA 2005-05-12 08:52:20 EDT
Also:
Note that the help printed out when you call ajc with just the -X switch
should be updated (it should say (depricated) after the bit about -XlazyTjp).
- I forgot to add this in the patch I made
Comment 4 Andrew Clement CLA 2005-08-24 03:52:43 EDT
moving to do before 1.5.0 final..
Comment 5 Adrian Colyer CLA 2005-09-27 05:43:43 EDT
assigning P2 for run-up to AJ 5 RC 1
Comment 6 Andrew Clement CLA 2005-10-28 04:47:58 EDT
I'm currently integrating this patch.
Comment 7 Andrew Clement CLA 2005-11-01 16:57:59 EST
committed!

I'm not positive the new lint warnings are correct, but they are a start.  They
are all on ignore by default - we'll see how people get on with them.
Comment 8 Andrew Clement CLA 2005-11-02 03:27:35 EST
Ok - this is now the default in AspectJ.  Build is available.  The usefulness of
any xlints can be addressed in other bugs....