Bug 323438 - Minor improvements
Summary: Minor improvements
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 1.6.10   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-23 16:20 EDT by Abraham Nevado CLA
Modified: 2012-04-03 16:17 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (21.27 KB, patch)
2010-08-23 16:21 EDT, Abraham Nevado CLA
aclement: iplog+
Details | Diff
This is the patch to fix the bug (871 bytes, patch)
2010-08-25 06:51 EDT, Abraham Nevado CLA
aclement: iplog+
Details | Diff
This is the patch to add the proper test. (2.29 KB, patch)
2010-08-25 06:51 EDT, Abraham Nevado CLA
aclement: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.