Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323438

Summary: Minor improvements
Product: [Tools] AspectJ Reporter: Abraham Nevado <info>
Component: LTWeavingAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: aclement
Version: unspecified   
Target Milestone: 1.6.10   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Proposed patch
aclement: iplog+
This is the patch to fix the bug
aclement: iplog+
This is the patch to add the proper test. aclement: iplog+

Description Abraham Nevado CLA 2010-08-23 16:20:33 EDT
Build Identifier: 1.6.10

I believe it would be interesting, according to Andy's suggestions, to:
1) Use LDC instead of classForName if Java 1.5 enabled.
2) Collapse calls to makeSJP avoiding calling to makeMethodSig when the flag is enabled.
3) Create a new makeSJP method not including exceptions when exceptions are not returned by the woven methods.

These modifications may improve LTW time, define time and reduce woven class size.

Find attached the patchs for the modifications including unitary tests.

Thanks and regards.


Reproducible: Always
Comment 1 Abraham Nevado CLA 2010-08-23 16:21:00 EDT
Created attachment 177263 [details]
Proposed patch
Comment 2 Andrew Clement CLA 2010-08-23 16:43:25 EDT
changes are all in.

Slightly reworked them:
- in bcel-builder I changed it to only use the wide form of LDC if the constant pool index needs it (>255).  Uses addClass rather than lookupClass.
- option handling slightly changed to fit in better with what we already use for X options.  Changed name to -Xset:targetRuntime1_6_10 
- new test class had to be referenced from the existing suite to ensure it is pulled in when running everything
- javadoc on the new runtime factory methods.
- slight refactoring in lazyclassgen, but basically what you had.
Comment 3 Abraham Nevado CLA 2010-08-25 06:51:04 EDT
Andy, after performing our internal backward compatibility tests for 1.4 JVMs we realized there is a minor bug in the changes already committed at CVS (also in the proposed patch) that prevents working it in the right way when Weaving under AJ12 mode and 1.6.10 enhancements on

I am attaching the patch to fix it. As well as the patch for the tests to test it and avoid regression issues.
Comment 4 Abraham Nevado CLA 2010-08-25 06:51:35 EDT
Created attachment 177403 [details]
This is the patch to fix the bug
Comment 5 Abraham Nevado CLA 2010-08-25 06:51:58 EDT
Created attachment 177404 [details]
This is the patch to add the proper test.
Comment 6 Andrew Clement CLA 2010-08-25 11:16:44 EDT
changes are in, thanks.