-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCHANGELOG
483 lines (416 loc) · 17.8 KB
/
CHANGELOG
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
From 3.2 to 3.2.2
-----------------
Minor changes:
* small improvements in the test directory
* use Stdlib instead of Pervasives
From 3.2 to 3.2.1
-----------------
Minor changes:
* Adding new ordered iter and fold function in Ptmap and GenericMap
* Making remove_invokedynamics more predictable during class generations
From 3.1.1 to 3.2
-----------------
Major changes:
* Rewriting invokedynamic instructions
- forging Callsite objects capturing lambdas environments in private fields
during object construction, and implementing their functional interfaces
Bug fixes:
* generics signature parser: *, + and - are allowed in class names.
From 3.1 to 3.1.1
-----------------
Minor changes:
* removing unnecessary camlp4 dependency
Bug fix : correcting inconsistent META file
From 3.0 to 3.1
---------------
Major changes:
* Java 9 compatibility:
- adding constant pool tags ConstantModule and ConstantPackage
- a module is represented as a class with no methods and fields, and contains only attributes
- except for the tag ConstantDynamic, Javalib should be able to parse Java 11 classes
(the tag ConstantDynamic never appears in openjdk11 and it is not clear if the java compiler can generate it)
* Stackmaps:
- reverting to low level format of stackmap frames to ensure correctness
- fixes a bug after unparsing because the trick of replacing all frames by a FullFrame was not correct
Minor changes:
* JFile: sep is now a char, not a string anymore
* Permissive: if JBasics.get_permissive() is true, we allow a class that is not Object to have no super class
Bug fixes:
* JParseSignature:
- bugfix for parsing the signature of a class starting by 'L'
From 2.3.5 to 3.0
-----------------
Major changes:
* Java 8 compatibility:
- implementation of method handles and bootstrap methods
- adding InvokeDynamic instruction
- interfaces can now implement concrete methods
- invokestatic and invokespecial intructions can refer to interface methods
- new attribute MethodParameters
Minor changes:
* integration of ptrees inside Javalib_pack
TODO:
* The new attributes RuntimeVisibleTypeAnnotations and RuntimeInvisibleTypeAnnotations have no high-level representation.
From 2.3.4 to 2.3.5
-----------------
Minor changes:
* extlib-compat dependences replaced by extlib+camomile (solve an issue with UTF8 manip)
* no more print_jasmin function for printing a class file in Jasmin format.
The Jasmin project seems to be out of date with recent JVM evolutions.
See https://sourceforge.net/projects/jasmin/
From 2.3.3 to 2.3.4
-----------------
Minor changes:
* Parsing does not crash anymore when a method has an
empty array of bytecodes. These changed are
based on a patch submitted by Sam Blackshear.
From 2.3.2 to 2.3.3
-----------------
Minor changes:
* new (experimental) support for Java 8 format. These changed are
based on a patch submitted by Sam Blackshear. Some features, as
implementations in interfaces, are not supported yet.
From 2.3.1 to 2.3.2
-----------------
Minor changes:
* Licence: we now use LGPL v2.1 with an special exception on linking
(described in file LICENCE). We follow exactly the same licence as
library ptrees.
* Some cleaning, remove warnings found by ocaml 4.02.3
Bug fixes:
* jParse now properly closes opened channels when a
Class_structure_error error is raised
FROM 2.3 to 2.3.1
-----------------
Minor changes
* Ptrees
- remove redundant code about GenericSet and GenericMap.
* Javalib
- Update source codes related to GenericSet and GenericMap.
- Remove control over the class name extracted from a class file
From 2.2.2 to 2.3
-----------------
Minor changes:
* Ptrees:
Provide GenericMap and GenericSet interfaces. They use as argument a
module specifying how to get a hash of the element.
* compilation/installation:
- Do no longer provide extLib, users should install it themself. configure
script accordingly changed.
- Do no longer provide camlzip, users should install it themself. configure
script accordingly changed.
* Javalib:
Some cleaning, remove warnings found by ocaml 4.0.1.
From 2.2.1 to 2.2.2
-----------------
Minor changes:
* Ptmap:
- add find_element and findi_element functions
- add inter_map2 function
* Camlzip: add zlib interfaces in camlzip findlib installation
* JBasics:
- add of_list and of_array functions in Maps
* Javalib:
- add functions map_*_with_native* which provide a way to transform
the implementation type
- add Java method printing functions using a formatter in JPrint
module
* configure script:
- add check of versions for camlzip, ptrees, extlib to configure.sh
- add a check on presence of zlib C library necessary for camlzip
- remove option '-l default'.
Bug fixes:
* JClass/Javalib: is_final_field was returning always false for fields
of interface but it is the opposite (w.r.t. JVM specification and the
ocamldoc of interface_field)
* JUnparse/Javalib: several bugfixes in unparse_class function
regarding Java annotations (if present):
- unparsing was failing when annotations were present on an abstract
method
- unparsing of annotations was not correct (annotation type index
was referencing a wrong element in the constant pool)
- runtime visible annotations were not unparsed if no runtime
invisible annotation was present (on a method parameters only)
From 2.2 to 2.2.1
-----------------
Minor changes:
* Javalib:
- add several iterators for methods and fields
- add the is_final function to test if a class is final
* JCode: add the [get_source_line_number'] function which operates on
the LineNumberTable instead of on the code
Bug fixes:
* The Java string constants were not escaped before manipulation. We
now have an abstract datatype JBasics.jstr, and the corresponding
setter and getter functions.
* Fix some checks in configure script
* Fix some broken links in documentation
From 2.1.1 to 2.2
-----------------
New feature:
* adding support for the attribute LocalVariableTypeTable which is the
LocalVariableTable for generics added in Java 5
Bug fixes:
* JPrint: the function [class_name ~jvm:true cn] was returning the
type of an object of class cn (e.g. "Ljava/lang/Object;") instead of
the name of class cn (e.g. "java/lang/Object") in the JVM
representation. Now it returns the class's name format, to obtain
the type of an object use the [value_type ~jvm:true] function.
* JDumpJasmin: the Jasmin output has been corrected, see bug report #11314
Minor change:
* JCode: modifying function [get_local_variable_info] that uses the
local_variable_table: JVM specification has been corrected and
indicates that variable name scope is [start,start+length) instead of
[start,start+length]
From 2.1 to 2.1.1
-----------------
Minor changes:
* removing some debugging messages from JFile.iter (display number of classes)
* Version number of Sawja in FindLib was indicated 2.0.1 for version 2.1,
now it is the correct number (2.1.1)
From 2.0.1 to 2.1
-----------------
Compilation & Installation changes:
* installation process now rely on ocamlfind (more homogeneous installation,
easier to use as dependencies are automatically linked in)
* add a configure script into the compilation routine that automatically
generate the appropriate Makefile.config file. Local installation is now an
easy option.
New features:
* parsing and unparsing of Java 5 annotations
* new function Javalib.extract_class_name_from_file to recover a class name and
a class path from a .class file
Minor changes:
* add ~force in Javalib.map_* functions to force the evaluation of lazy values
* now using indexed method_signature and field_signature in the constant pool
(time and memory footprint improved)
* improving internal comparison on class_field_signature_data and
class_method_signature_data
* zip files can be given when jar files are excepted
Bug fixes:
* bugfix in JCode.get_local_variable_info: local variable spreading over 0
instruction (written at one point, never read) were causing problems
* bugfix in JCode.get_source_line_number.
* bugfix in classname checking: '-' (minus) is used in some class names
* bugfix in JLow2High: some correct classes were rejected during checking.
* others bugfixes (in JFile)
From 2.0 to 2.0.1
-----------------
Minor fixes:
* bugfix in JCode.get_local_variable_info
* minor correction in the tutorial
* installation procedure should run more smoothly
From 1.8.1 to 2.0
-----------------
Main changes:
* the library has been refocused on the class representation: everything dealing
with the program representation has been removed (and put into Sawja).
New features:
* adding maps and sets for all indexed types: their implementation is based on
Patricia trees which are must more efficient that the balanced trees of OCaml
* Ptrees library optimized
* adding printing function to Jasmin format
* adding support for Java 6 stackmaps
Changes in the interfaces:
* adding a user interface: the standard user should now only need 3 files
(javalib.mli, jCode.mli and jBasics.mli)
* class names, method signatures and field signatures are now abstract and
indexed: impoved efficiency and memory footprint
* the bytecode representation can be changed by the user: methods and classes
are now polymorphic
* module interfaces have been partly re-written and more documented
Minor changes:
* javaLib renamed in javalib
* improving error messages and exception handling
* adding some printing functions to more easily print data in a JVM or Java
representation
* various bugfixes
From 1.8 to 1.8.1
-----------------
New features:
* new HTML printer function for programs (cleaner and easier to
navigate through)
* stub generator for native methods for RTA (only for Linux)
Changes in the interface:
There should be no change in the interface
Minor changes in the code:
* Printing a warnings when parsing native methods in RTA and no stub
is found
* Removing some dead code in JRTA
* Improving some error messages (in JLow2High)
Bugfixes:
* bugfix (under windows): class path separator is now a semi-colon on
windows
* bugfix (RTA): load java.lang.Class when encountering ldc instruction
* bugfix: when (un)parsing some code, the bytecode representation
could change if the first was not optimal in terms of size (eg. an
iload_1 coded as an iload 1)
* bugfix (get_local_variable_info): a heuristic was used to determined
the length of the store instruction, it is now the proper length
* bugfix (jDumpLow): jsr and ret were printed as goto
* bugfix: retw(209) not documented => removed
From 1.7.1 to 1.8
-----------------
The licence has been changed from the GPL to the LGPL.
New features:
* efficient RTA implementation for program loading and callgraph
computation
* much more efficient (and precise, and simpler to use) static lookup
functions (in JControlFlow) (based on JRTA)
* JPrint can now output the local variable names in the bytecode output
* a Patricia Tree library has been added and can be used by the client
code
Changes in the interface:
* numbering of class names, field signature and method signature in
the program representation (which implies changes in loads of
function signatures)
* JProgram has been splited in 2 : JProgram and JCRA. JRTA (a
replacement for JCRA) has been added.
* adding a function to retrieve the name and signature of a local
variable
* adding a function to retrieve the source line number corresponding
to a bytecode instruction
* adding JDumpBasics.arraytype2shortstring
* JProgram.get_fields now returns the list of fields instead of the
list of indexes (same price, more information)
Minor changes in the code:
* adding a way to tune javalib to be either more or less
permissive (some consistency checks are only done in permissive
mode)
* pprint_*_to_html_file now takes the introduction string instead
of a file as first argument. It is more flexible as the user
can also load the string from a file.
* very small optimizations (avoid recomputing some operations, use a
unsafe_get instead of get, order some tests based on their costs)
* using Patricia Trees instead of Sets or Maps when applicable
* adding the method called by SUN's VM at startup in the list of entry
points
Bugfixes:
* several bugfix in JControlFlow
From 1.7 to 1.7.1
-----------------
Bugfixes:
* the JFile.mkdir function could produce a stack overflow if the
directory passed as argument is not a sub-directory of the current
directory. Bug reported by Samuel Hym. This bug is present in
JavaLib 1.5, 1.6 and 1.7.
* the JHigh2Low.h2l_code2attribute function was using lazy functions
that were evaluated after that the constant pool were modified,
which could cause bugs if the constant pool was emptied before
unparsing the class. Bug reported by Samuel Hym. This bug is present
in JavaLib 1.7.
From 1.6 to 1.7
---------------
New features:
* add lazy code parsing: the compiled code attribute is copied into
the memory but not parsed before it is actually needed. Copying the
code attribute allows not to refer to the .class file anymore so
they can be garbage collected. Tests that load classes without
looking at the actual code attributes shows an improvement of 22%
and 23% of time and memory consumption, respectively.
* it is now possible for JFile.class_path to load the .jar files that
the given directories contain (so the CLASSPATH environment variable
can be used as the argument of the function)
Changes in the interface:
* adding version numbers to class file representations (so JUnparse
output the right version number). (Note: the current implementation
does not check that the features actually used match the declared
version number)
* merge Parse_error, Illegal_value and Class_structure_error
exception into Class_structure_error exception.
* handling Java 5 signatures for generics (some old signature or
name_and_type have been renamed to descriptor when appropriate) to
jProgram, jClass and jClassLow and update handling code (jPrint,
jDumpLow, jParse, jUnparse, jH2L, jL2H)
* adding attribute EnclosingMethod (introduced with Java 5 for local
classes) (jProgram, jClass, jClassLow) and update handling code
(jPrint, jDumpLow, jParse, jUnparse, jH2L, jL2H)
* adding attribute SourceDebugExtension (jProgram, jClass, jClassLow)
and corresponding handling code (jPrint, jDumpLow, jParse, jUnparse,
jH2L, jL2H)
Minor changes in the code:
* closing the class_path when the program is loaded (should free some
memory)
* tableswitch and lookupswitch instructions are now printed
with all the details (instead of just <...>)
* adding a constraint check on the maximum size of the code attribute
(65536)
* when an error occurs in low2high_class, it now gives the class name
in the error message
* improving the documentation
Bugfixes:
* bugfix: replace IO.nread with IO.really_nread as it would be an
error to read less bytes than what is excepted.
* bugfix: it is now be possible to have more than one
LocalVariableTable per code attribute (there can be one per local
variable)
From 1.5 to 1.6
---------------
New features :
* adding a representation for complete programs
* adding a printing module for programs that can output text and html
code, along with user information
* adding a JPrintHierarchy to print information about the class
hierarchy, inheritance, overloading, etc.
* adding a ControlFlow module to have some control flow information
more easily
* adding a lookup function for (loading and writing) individual
classes in .jar files
* add support for Java 5 flags (enum, synthetic, annotation, bridge,
varargs, etc.) and improve handling of those flags in general.
* enriching dumping modules to print classes in high or low level
representation
Changes in the interface :
* classes and interfaces have now different type
* renamed jConsts to jBasics
* moved the definitions of jClassLow also used in jClass to jBasics
* merging OpConst and OpLdc (JDump/JClass/JInstruction) in high level
class representation
* signatures added to fields and classes in JClass
* the return type has been included in the signature (useful for
bridge methods)
* method_signature renamed to method_descriptor as it includes the
return type wich is not part of the signature
* more accurate (and cumbersome) typing for access flags in JClassLow
* some renaming so names should be more 'logic'
Minor changes in the code :
* add more access functions to classes and interfaces
* more consistent treatment of exceptions in all the library
* adding some checks on bytecode generation (JCode)
* adding some checks on conversion (JLow2High)
* some code factorizing (is_dir/is_file) in JFile, for the constant
pool accesses and in the representation of abstract and concrete
classes
Bug fix :
* bugfix : in unparsing line number tables
* bugfix : in JDumpBasics.object_value_signature
* bugfix : in JFile, correct a bug when trying to open an nonexistent
file
* bugfix : in (un-)parsing of BIPush
* bugfix : a ConstantValue attribute was expected for non-static
fields
* bugfix : in JLow2High : unexpected attributes were causing the
conversion to fail (it now works and prints a warning)
* bugfix : in JLow2High
* bugfix : in JHigh2Low : correcting some bugs with abstract classes
and methods
* fix encoding problems in documentation
* Removed the extlib patch (included in extlib 1.5.1)
From 1.4 to 1.5
---------------
* new type for bytecode instructions (more generic opcodes)
* the low level instructions are still available, and even more low
level
* change many base types to reflect more accurately the constraints of
the specification
* fix bugs and change some small other stuff
From 1.0 to 1.4
---------------
This version adds a lot of features (and fixes some bugs) to the latest
version (1.0) distributed by Nicolas Cannasse while keeping an almost
compatible interface. The differences in the compatible interfaces
includes :
- a few changes in the instruction set
- the AttributeStackMap constructor
- the AccRFU constructor
- an additional parameter in the function JCode.parse_opcode