1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html> <head>
<title>AspectJ 1.2.1 Readme</title>
<style type="text/css">
<!--
P { margin-left: 20px; }
PRE { margin-left: 20px; }
LI { margin-left: 20px; }
H4 { margin-left: 20px; }
H3 { margin-left: 10px; }
-->
</style>
</head>
<body>
<div align="right"><small>
© Copyright 2004 Contributors.
All rights reserved.
</small></div>
<h1>AspectJ 1.2.1 Readme</h1>
<p>AspectJ 1.2.1 is largely a bug-fix release and the definition of the
AspectJ language is unchanged from the 1.2.0 release (with the exception
that AspectJ 1.2.1 permits the use of the '+' operator to concatenate
the messages for declare error and warning statements).
This document describes the tools differences between AspectJ versions 1.2 and 1.2.1.
Users familiar with AspectJ 1.2 may find this document
a quicker way to learn what changed in the tools.
</p>
<p>This document summarizes changes in:
<ul>
<li>Weaver messages</li>
<li>Dump support</li>
<li>JDT Compiler version</li>
<li>Line number information for join points</li>
<li>Runtime performance</li>
<li>String concatentation in declare error and warning statements</li>
<li>Load-time weaving support</li>
<li>Use of aspect libraries generated by ajc 1.2.1 with earlier versions of ajc</li>
</ul>
</p>
<p>
See the <a href="changes.html">changes document</a> for more details, or
<a href="#allchanges">all the changes</a> as detailed in the bugzilla
database.
</p>
<h2>Weaver Informational Messages</h2>
<p>
The AspectJ 1.2.1 compiler can produce informational messages about the
weaving process. To see these messages, use the -showWeaveInfo compiler
option, or set showweaveinfo=true in the iajc ant task.
</p>
<p>The following is an example of the messages produced when this option is enabled:</p>
<pre>
C:\aspectj1.2.1\doc\examples\tjp>ajc -showWeaveInfo *.java
Type 'tjp.Demo' (Demo.java:20) advised by around advice from 'tjp.GetInfo'
(GetInfo.java:26) [RuntimeTest=true]
Type 'tjp.Demo' (Demo.java:30) advised by around advice from 'tjp.GetInfo'
(GetInfo.java:26) [RuntimeTest=true]
Type 'tjp.Demo' (Demo.java:34) advised by around advice from 'tjp.GetInfo'
(GetInfo.java:26) [RuntimeTest=true]
</pre>
<h2>Dump Support</h2>
<p>In the event of a compiler crash, AspectJ 1.2.1 will produce a dump file giving
important information about the state of the compiler at the time of the crash.
These dump files should enable us to analyze problems more effectively. In the
rare event that you witness a compiler crash, please attach the dump file to
the bug report.</p>
<p>In addition to producing a dump file when an abort condition is detected, the
AspectJ 1.2.1 compiler can also be requested to create a dump file on detection
of a compilation error. Set the property org.aspectj.weaver.Dump.condition=error to
enable this behaviour.</p>
<h2>JDT Compiler Version</h2>
<p>AspectJ 1.2.1 is based on the Eclipse 3.0 final JDT compiler.</p>
<h2>Line Number Information for Join Points</h2>
<p>For source files compiled by ajc (as opposed to binary inputs to the compiler
compiled with some other java compiler), ajc now emits better line number information
for execution join points. In particular, for a method, constructor or advice
execution join point (as matched for example by a declare error or declare warning
statement), ajc 1.2.1 reports the first line number of the declaration,
as opposed to the line number of the first line of code in the body. </p>
<h2>Runtime Performance</h2>
<p>AspectJ 1.2.1 contains a small number of runtime performance optimisations, including
optimisations of if(true) and if(false) pointcut expressions, caching of getSignature()
and toString() results on JoinPoint objects, and an optimised implementation of cflow.</p>
<p>In the case where there are no arguments bound in
the cflow pointcut, programs compiled under AspectJ 1.2.1 and that make
heavy use of cflow will run significantly faster. Thanks to the abc compiler team
for detecting this performance related bug and for piloting the fix. </p>
<h2>String Concatentation in Declare Error/Warning Statements</h2>
<p>String concatentation in declare error and warning statements is now supported.
For example, you can write:</p>
<pre>
declare warning : jdbcCall() && !inDataLayer()
: "Please don't make calls to JDBC " +
"outside of the data layer.";
</pre>
<h2>Load-time Weaving Support</h2>
<p>
The AspectJ 1.2.1 distribution contains a new jar in the lib directory,
aspectjweaver.jar, that contains the subset of aspectjtools.jar needed
for weaving only. This jar may be used in situations where you wish to
exploit AspectJ's binary weaving capabilities, but do not want the full
aspectjtools.jar around (aspectjweaver.jar is approx. 5 times smaller).
</p>
<p>
In addition, the load-time weaving "aj" script which was included in the
doc/examples/ltw directory in the 1.2 distribution has been moved into
the regular bin directory. See <a href="README-12.html">README-12</a> for
details of using this script.
</p>
<h2>Binary Compatibility</h2>
<p>AspectJ 1.2.1 introduces a backwards-incompatible change to the class
file format generated by the AspectJ compiler. Classes generated by
ajc v1.2.1 cannot be used on the inpath or aspectpath of a weaver from
a prior version of the compiler. Classes generated by prior versions of
the compiler can of course be placed on the inpath or aspectpath of the
1.2.1 weaver.</p>
<p>
As ever, you should use the AspectJ runtime library (aspectjrt.jar) that
comes with the distribution you used to build your application.
</p>
<hr/>
<a name="allchanges"></a>
<h2>All changes are listed in the bug database</h2>
For a complete list of changes in the 1.2.1 release, search for
<code>target 1.2.1</code> in the bug database:
<a href="https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler&target_milestone=1.2.1">
https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&target_milestone=1.2.1&bug_status=RESOLVED&resolution=FIXED
</a>
</body> </html>
|