-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog
904 lines (672 loc) · 38.3 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
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
LATEST
* Improved diamond type inference.
* More robust string concatenation code generation, handling
left-associative addition trees.
* Remove SuperClass component of PrimitiveType.
* More explicit subtyping rules for primitive types.
* Marked TypeDecl.instanceOf as deprecated.
* Replaced the instanceOf by subtype and removed redundant subtype
equations.
* Removed the EmptyType AST class.
* Refactored scanner specifications.
2018-12-12 Version 8.1.2
* The Options class has been moved from the aspect file
java4/frontend/Options.jadd to the plain Java file
src/frontend/org/extendj/ast/Options.java.
* Removed a JastAdd rewrite that normalized the TypeBound list of
TypeVariable nodes. The TypeBound list child of TypeVariable was renamed to
Bound, and attributes emulating the old TypeBound interface were added. The
new attributes getNumTypeBound(), getTypeBound(int), and getTypeBoundList()
are used to work with the normalized list of type variable bounds. If the
actual declared bounds are needed, use getNumBound(), getBound(int), and
getBoundList().
* Rewrote TypeVariable.firstBound() - it no longer returns the least upper
bound of the type variable. TypeVariable.firstBound() now returns the first
type bound or the Object type access if the type variable is unbounded. Use
TypeVariable.lubType() instead to get the least upper bound.
* Removed attribute TypeVariable.lowerBound() because the name was
misleading and it was only used in one place.
* Deleted SimpleSet.fullSet as it was unused.
* Removed ID token in ThisAccess and SuperAccess.
* Changed Expr.mayAccess(Variable) to a synthesized attribute (was
inter-type declared method).
* Removed method TypeDecl.mayAccess(Expr, Variable).
* Added attribute TypeDecl.mayAccess(TypeDecl, Variable).
* Added TypeDecl.keepAccessibleFields(TypeDecl, SimpleSet<Variable>) as a
helper method for field access control.
* Added attribute MethodAccess.hasUnknownArg() to check if any of the
arguments to a method call has unknown type.
2018-01-25 Version 8.1.1
* Unified diamond type inference with method type inference.
A synthetic method access is now used by DiamondAccess to infer type
arguments. This means that much more of the method type inference
implementation can be reused directly by the diamond implementation.
* Removed attributes:
- DiamondAccess.mostSpecific(_, _)
- DiamondAccess.potentiallyApplicable(_)
- DiamondAccess.applicableBySubtyping(_, _)
- DiamondAccess.applicableByMethodInvocationConversion(_, _)
- DiamondAccess.applicableByVariableArity(_, _)
* Changed the argument type of MethodAccess.maxSpecific() from Collection to Iterable.
* Changed the Argument type of MethodAccess.potentiallyApplicable() from
Collection to Iterable.
* Changed TypeDecl.bridgeMethods() from collection attribute to synthesized
attribute.
* Removed the attribute TypeDecl.localBridgeMethods() (renamed to
"bridgeMethods").
* The attribute SwichStmt.enumIndices() has been moved to TypeDecl.
This attribute is used to generate implicit enum switch maps.
* Elements in the SimpleSet datastructure is are now ordered by insertion
order. This makes the element order deterministic.
* Added NTA TryWithResources.closeAccess() to represent the implicit
resource closing method access in a TWR statement.
* Removed TryWithResources.lookupClose().
Use TryWithResources.closeAccess().decl() instead.
* Added attribute TypeDecl.methods(), which computes all visible method
declarations for a type (includes inherited methods).
* Removed TypeDecl.methodsIterator().
Use TypeDecl.methods().iterator() instead.
* Added attribute TypeDecl.interfacesMethods(), which computes all methods
inherited from superinterfaces (transitive).
* Removed TypeDecl.interfacesMethodsIterator().
Use TypeDecl.interfacesMethods().iterator() instead.
* Added attribute TypeDecl.localMethods(), which computes all local method
declarations for a type.
* Removed TypeDecl.localMethodsIterator().
Use TypeDecl.localMethods().iterator() instead.
* Removed TypeDecl.interfacesIterator().
Use TypeDecl.superInterfaces().iterator() instead.
2017-12-30 Version 8.1.0
* Many compatibility bug fixes.
* Type inference improvements.
* Pretty-printing improvements.
* Many attributes were renamed, removed, added, or redesigned.
* Stack Map Frames bytecode attributes are now generated by all Java 6+ backends.
* The Java 6 backend now outputs bytecode version 50 (was 49).
* The Java 7 backend now outputs bytecode version 51 (was 49).
* The Java 8 backend now outputs bytecode version 52 (was 49).
* The AbstractDot node type has been removed.
* Removed several side effects in attributes. Static semantic error checking
should now be mostly well-defined with respect to attribute purity and
circularity.
* Accessor methods are now generated by NTAs, replacing an imperative AST
transformation.
* Removed the FieldDecl list rewrite. Multiple field declarations are now
handled by using NTAs.
* Updated to build with JastAdd 2.2.2.
* Circular NTAs are now used as the rewrite implementation, for safer
rewrite evaluation.
* Fixed order dependencies in name classification rewrites.
* Replaced imperative enclosing variables transformation with on-demand
generation using NTAs during code generation.
* Replaced enum index transformations by using NTAs instead.
* Bridge methods are now generated on demand using NTAs, instead of using
imperative AST transformations.
* Replaced implicit enum member rewrites by NTAs.
* Replaced enum constructor transformation by NTAs.
2017-11-28 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Rewrote numeric literal handling in the Java 7 module.
The NumericLiteral type was changed into an interface, which
IntegerLiteral and LongLiteral inherit from.
The Java 7 module no longer replaces the Java 4 Literals.ast file,
instead the Java 7 module only adds the IllegalLiteral class to the
grammar. The rewrite that was used to specialize numeric literals
has been removed.
* Fixed an error that caused numeric literal constructors to
not properly initialize numeric literals.
* Removed java7/frontend/Constant.jadd (replaced by
java4/frontend/Constant.jadd).
2017-11-17 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* The attribute TypeDecl.toString() now returns the typeName() value.
This makes it easier to debug type analysis code.
2017-11-16 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* The attribute TypeDecl.enclosingMemberDecl() is now defined for
all member declarations (was previously undefined for fields).
2017-09-13 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed an error in parse name resolution that caused certain qualified
names to fail to resolve correctly.
* Removed the AbstractDot type from the abstract grammar. The Dot type
replaces any previous use of AbstractDot. This change simplifies
the abstract grammar, but it also means that extensions must be updated.
Extensions should be updated by replacing any use of AbstractDot by Dot.
2017-04-22 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Renamed TypeDecl.enclosingBlock() to enclosingMemberDecl.
* Added attribute enclosingBlock() in Expr, for computing
the directly enclosing statement block.
* Added TypeVariable.firstBound() to compute the first type bound of a
type variable.
2017-04-21 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Modified the typeName() attribute of WildcardType, WildcardExtendsType,
and WildcardSuperType to improve readability.
This removes the "wildcard." prefix.
* A new AST class has been added: SubstitutedTypeVariable.
This class represents type variables that should have their type bounds
substituted. A new NTA list child named SubstTypeParam has been
added to ParTypeDecl and ParInterfaceDecl, containing substituted type
variables.
2017-04-20 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added internal option type to handle missing/undefined values.
2017-04-12 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added ASTNode.toSet() to replace a null SimpleSet by an empty set.
2017-04-11 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added the method ASTNode.sourceLocation(), which returns
the location of a node in the format "filename:line".
2016-10-17 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added separate error messages for default constructor problems. This
removes the need for full error checking on default constructors and
enables generating more descriptive error messages.
2016-04-01 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Redesigned name resolution rewrites. ParseName nodes now contain
multiple name parts and they are rewritten together at the same time.
This simplifies the rewrite process for ParseName nodes during syntactic
classification, and removes the need for rewriting Dot nodes.
2016-03-30 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Redesigned generic type substitution. Type variables are no longer
substituted in the synthetic parameterized type declarations, instead
type variable substitution happens during type lookup.
Added two new AST node types: GenericMethodDeclErased and
GenericConstructorDeclErased.
The abstract grammar rules for ParClassDecl, ParInterfaceDecl,
RawClassDecl, and RawInterfaceDecl have been changed.
2016-03-22 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Removed the List subtype BodyDeclList because it could cause null
pointer exceptions when inherited attributes were evaluated on NTA
children of BodyDeclList.
* Added a new BodyDecl subtype named SubstitutedBodyDecl. This is used for
generic type substitution of body declarations in generic types. This
replaces the old BodyDeclList NTAs.
* Removed the unecessary node types
VariableArityParameterDeclarationSubstituted and
ParameterDeclarationSubstituted.
2016-03-08 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added helper methods to build default bytecode reader and Java parser:
Program.defaultBytecodeReader() and Program.defaultJavaParser().
2016-02-24 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Removed rewriting of EnumDecl. Implicit members in EnumDecl are now
generated using NTAs instead of by rewriting the EnumDecl.
* Removed side effects used to generate accessor methods. Accessor
methods are instead generated using declarative NTAs.
* Removed the ASTNode.transformation() method which walked over the AST
to add accessor methods etc.
* Removed ASTNode.clear() which was used to clear AST nodes after code
generation (used side effects).
2016-02-23 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Replaced enum constructor transformation side effects by using the new
nonterminal attribute ConstructorDecl.transformedEnumConstructor().
2016-02-22 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Replaced bridge method generation side effects by using an NTA and
collection attribute. Bridge methods are no longer generated during
the transformation phase. Bridge methods are now generated on demand
during code generation.
2016-02-20 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Replaced the side effects used to add the "$assertionsDisabled" field
to a class by using NTAs instead. Assert statements have a new NTA called
"transformed()" which evaluates to the transformed form of the statement.
The $assertionsDisabled field is also generated using an NTA.
2016-02-19 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Replaced enum switch transformation side effects. NTAs are now used to
generate extra fields and methods needed for enum switch statements
instead of using side effects to modify the BodyDecl list of a TypeDecl.
Also removed the side effects which modified the actual SwitchStmt and
nested ConstCase nodes.
* Removed side effects used to generate bytecode for ClassAccess in the
Java 4 backend module. This changes the bytecode generation in Java 4
mode, and may make it incompatible with Java 4 JVMs. ExtendJ should no
longer implicitly support Java 4, since we have not tested the Java 4
support for a long time and it is not reasonable to try to support Java 4
bytecode generation any longer.
2016-02-12 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Replaced FieldDecl list rewrites.
FieldDecl nodes were previously rewritten to individual FieldDeclaration
nodes in BodyDecl lists using a list rewrite. List rewrites are a complicated
feature in JastAdd with some performance and correctness problems. Migrating
from list rewrites has the potential of improving performance and enabling
some interesting optimizations in JastAdd attribute evaluation.
In order to remove FieldDecl list rewrites, the AST nodes FieldDeclaration and
VariableDeclaration were removed from the abstract grammar. These have been
replaced by FieldDeclarator and VariableDeclarator, both inheriting from the
abstract type Declarator. A FieldDecl node now has a Declarator list that
contains FieldDeclarator nodes and which correspond the individual fields
declared in a single FieldDecl. A VarDeclStmt has had its VariableDecl list
replaced by a Declarator list containing VariableDeclarator nodes.
EnumConstant nodes behave much like FieldDecl nodes, but like the old
FieldDeclaration nodes they declare only a single field. EnumConstant used to
inherit from FieldDeclaration due to the many similarities between these nodes
and due to the similar methods used in code generation. Since FieldDeclaration
has been removed, and the corresponding code generation methods were moved to
FieldDeclarator, which is not a BodyDecl subtype, EnumConstant had to be
changed a bit to work after the refactoring. EnumConstant now as some
additional attribute and method declarations that were previously inherited
from FieldDeclaration.
2016-02-04 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added Modifiers and TypeAccess:Access NTAs in VariableDecl. This
eliminated the need for the SingleDecl* NTA in VarDeclStmt. This also
made VariableDeclaration redundant, so it has been removed from the
abstract grammar. Extensions using VariableDeclaration should switch to
using VariableDecl instead, and extensions using
VarDeclStmt.getSingleDecl(x) should use VarDeclStmt.getVariableDecl(x).
2015-12-15 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added robust set org.jastadd.util.RobustSet. This is used to track
loaded compilation units in a way that allows simultaneous iteration
over compilation units. This happens in the Frontend.run method.
2015-10-14 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Refactored pretty printing. Pretty printing aspects are now generated
from template files in the new pretty-print/ directory.
2015-10-05 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added documentation comment parsing.
2015-07-30 Jesper Öqvist <joqvist@google.com>
* BytecodeParser methods now let IOExceptions escape instead of catching
them and calling System.exit(1).
* Moved common code from BytecodeParser classes to an abstract base class
named AbstractClassfileParser.
2015-06-18 Jesper Öqvist <joqvist@google.com>
* Isolated header part of java4/parser/Preamble.parser to
java4/parser/Header.parser. This makes it easier to change the parser
package and import declarations.
* Isolated header part of java4/scanner/Preamble.flex to
java4/scanner/Header.flex. This makes it easier to change the scanner
package and import declarations.
2015-05-31 Jesper Öqvist <joqvist@google.com>
* Removed deprecated Frontend.process method
* Program.lookupLibType is now an inter-type method (was syn attribute)
2015-04-16 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* The TypeDecl.isReifiable attribute was moved from the Java 7 extension
to the Java 5 extension and is now declared in the new file
java5/frontend/ReifiableTypes.jrag
2015-04-14 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* TypeDecl.isCheckedException() now returns true if the type is a subtype of
java.lang.RuntimeException or java.lang.Error.
* TypeDecl.isUncheckedException() is now exactly the inverse of
TypeDecl.isCheckedException().
* The two above attributes have approximately inverted their behaviour
and now work opposite to how they used to work. The naming of the
attributes was likely an error to begin with because isCheckedException
actually did the exact same thing that isUncheckedException should always
have done!
2015-03-31 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Implemented explicit type bounds checking. This was previously
part of the subtype checking which produced incorrect results in the
form of missing errors for incompatible types.
2015-03-09 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* The Program.LibCompilationUnit NTA should no longer be populated with
null values. The Program.getCompilationUnit method was changed to a lazy
attribute backing the LibCompilationUnit NTA. This attribute is checked
first for nullness before accessing the NTA.
* Program.lookupType(String,String) no longer returns null when the type
is not found, instead the UnknownType instance is returned.
2015-03-03 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* JavaDumpTree now ignores semantic errors
* Improved ParseName rewriting. Many identifiers are not classified during
parsing. The classification instead happens on demand during semantic
analysis using rewrites. Previously these classification rewrites had
several stages, for example, first rewrite to AmbiguousAccess and then
rewrite to the final access node. After some refactoring this rewrite
process is now single-staged. This makes the rewrite conditions for the
remaining rewrites simpler, and removes the need for the node types
AmbiguousAccess and PackageOrTypeAccess, so these have been removed from the
grammar. The NameType class was replaced by an enum, and the
NameType.NO_NAME constant is now replaced by NameType.NOT_CLASSIFIED. The
NameType.METHOD_NAME constant was removed due to not being used.
2015-02-24 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Frontend and backend main classes have been moved to the new source
directories src/frontend-main and src/backend-main, respectively. The
JastAddJVersion class which is used by these main classes to obtain a
version number was moved to src/frontend-main. This change makes it
easier for extensions to build without the ExtendJ main classes, which
may be undesired in extensions. Extensions that need these classes will
need to add the new source directories to their classpath.
2015-02-17 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Add duplicate entries in localMethodsSignatureMap to enable duplicate
inherited method checking.
2015-02-13 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Renamed the superinterfacesIterator method to interfacesIterator and
added declaration of interfacesIterator on TypeDecl. This means that
interfaces are now iterated over using the same iterator for both
ClassDecl and InterfaceDecl.
* Moved declaration of interfacesMethodsIterator from ClassDecl to
the superclass TypeDecl.
2015-02-11 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Renamed the [ConstructorInvocation] child of ConstructorDecl to
ParsedConstructorInvocation. This child should no longer be used to store
implicit constructor invocations. Added new NTA child
/ImplicitConstructorInvocation/ to represent the implicit constructor
invocations, if needed, and added attributes named
hasConstructorInvocation and getConstructorInvocation to mimic the former
ConstructorInvocation child. These changes allow for implicit constructor
invocations to be generated while still retaining the original, parsed,
constructor invocation in the AST.
2015-02-05 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Replaced emitEvalBranch by branchTrue and branchFalse.
* Throw error if the constant pool overflows.
2015-01-30 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added type lookup caches for improved type lookup.
* Fixed error where a library type could be incorrectly reported as
duplicate declarations when local declarations in source files on the
source path contained the same type. This issue was caused by library
type lookups only working as intended with types having the same name
as the containing compilation unit.
2015-01-29 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Improved numeric literal parsing and error messages
2014-08-11 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Replaced the errorCheck method by the errors and warnings methods.
The errorCheck method took collections as arguments, where the semantic
problems were inserted. The preferred method is to just fetch the
internal collections of the compilation unit.
2014-07-23 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added -XstructuredPrint flag to ExtendJ main class
2014-06-04 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Removed implicit constructor list rewrites
- Renamed isDefaultConstructor() to isImplicitConstructor()
* Removed variable declaration list rewrites
- VarDeclStmt is no longer rewritten to a separate VariableDeclaration
statements.
- VarDeclStmt now has an NTA list of single declarations named
SingleDecl
- VariableDeclaration no longer inherits from Stmt.
Since VariableDeclaration is now a child of VarDeclStmt some inherited
attributes needed to be changed in order to properly propagate values to
VariableDeclaration nodes.
2014-06-02 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Merged Erik Hogemans Java 8 module.
2014-05-13 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed errors in the Expr.canBeTrue() and Expr.canBeFalse() attributes.
* The code generator now tries to avoid redundant GOTOs after conditional
branches.
2014-05-05 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed pretty printing problem for annotation declarations
(the `@` in `@interface` was omitted)
* Added -XprettyPrint command-line flag which will cause pretty printing
of the source files
* Added -XdumpTree command-line flag which will cause dumping the abstract
syntax tree of the parsed source files
2014-04-15 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* The ClassDecl.superclass() method now returns non-null values. In the
case where the method would previously return null it now returns
unknownType() instead. The return type was also changed to TypeDecl.
2014-03-06 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Argument files expansion has been improved. Argument files are now
expanded in-place in the argument list, they may contain comments (`#`)
and quoted strings, and they can be escaped by a double
at-sign (`@@file` becomes `@file`).
2014-03-03 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Made conflicting interface method declaration error more descriptive.
2014-02-27 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed annotation-related bytecode generation error.
2014-02-26 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Improved method access type errors -- void type expressions
as a method argument now has its own error message.
* Fixed problem in this access and super access error checking
causing incorrect error messages to be reported for this/super
accesses in explicit constructor invocations.
2014-02-25 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Source file processing order is now determined by the command line
argument order.
2014-02-24 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* ExtendJ now reports all semantic errors in all compilation units
before aborting the compilation
* Fixed definite assignment analysis problem for assignment expressions.
Used fix suggested by Erik Hogeman.
* Fixed definite assignment analysis problem for method accesses.
Used fix suggested by Erik Hogeman.
* Fixed errors in effectively final analysis for various expressions.
* Fixed annotation element type analysis error.
2014-02-23 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added -debug option to abstract compiler frontend. This option debugs
extra debug checks during code generation for method binding correctness.
2014-02-22 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Changed final field assignment error messages to be more descriptive
2014-02-21 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Refactored field and variable initializer code generation
2014-02-19 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Removed the `AssignExpr.sourceType()` attribute
2014-02-07 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added method to initialize an empty ClassPath.
2014-01-16 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Gave instanceof expressions higher precedence than other relational
expressions. This solves a shift-reduce conflict in the parser grammar and
still parses all valid relational expressions because relational
expressions are in practice non-associative.
2014-01-15 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added `PathPart.getPath()` method which returns the path (to jar, folder
or file) that the `PathPart` represents.
2014-01-14 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* ExtendJ now gives an error message and fails to compile if something
not recognized as a valid option or a filename is given on the
command-line
* ExtendJ now fails to compile if the output directory does not exist
* Documented all methods in the `Frontend` class
* ExtendJ now uses the same exit codes as Javac
* Deprecated the `Frontend.process` method - will be replaced by
`Frontend.run` which returns compile error codes.
* Added `Frontend(String,String)` constructor taking the compiler name and
version so that it is not necessary to override the `name()` and
`version()` methods.
* The `Frontend.processArgs()` method now has return type int, rather than
void. Returning nonzero from `processArgs()` will abort the compilation
and cause the compiler to exit with an exit code indicating configuration
error.
2014-01-13 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Improved performance significantly by adding some caching back into the
classpath handling code.
* Renamed `FilePath` to `SourceFilePath`.
* Added `ClassPath` class which contains classpath configuration. This
class lazily initializes itself when needed.
* Replaced `PathPart.packages()` with `PathPart.hasPackage(String)`.
* `FolderPath` does not scan entire directory structure for packages, only
polls single directory for each `hasPackage` query.
* `JarFilePath` caches the package index so that subsequent `hasPackage`
queries are faster.
2014-01-11 Görel Hedin <gorel.hedin@cs.lth.se>
* Added option -nowarn for disabling warning messages.
2014-01-07 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed error where some things were not properly pretty-printed in
semantic error messages
* Changed the error messages for:
+ imported type conflicting with visible type error
+ method invocation type error (added argument index)
+ qualified this access error (added enclosing type name)
2013-12-19 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Refactored classpath handling. PathPart is now abstract and all concrete
subtypes are immutable. Classpaths must now be explicitly initialized
before parsing compilation units by calling Program.initPaths(). This
means that we can skip checking if the paths should be initialized before
every type lookup but it also means there is a bigger burden of making
sure the paths have been properly initialized before parsing.
2013-12-18 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Changed the semantics of TypeDecl.destinationPath and changed where
ExtendJ generates classfiles to better match the javac behaviour
2013-12-12 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Removed TestServer because it was unused
2013-11-20 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added ASTNode.prettyPrint() method which will replace toString as the
pretty-printing method
* ASTNode.toString() no longer pretty-prints AST nodes
2013-09-06 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added TokenCounter frontend class
2013-08-30 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* ExtendJ no longer generates JSR/RET bytecode instructions - finally
blocks are inlined where needed
* Empty finally blocks do not generate bytcode
* Added explicit AST node to generate code for the implicit
monitor exit call for synchronized blocks
2013-08-29 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* ExtendJ now generates classfiles for imported types that are imported
from source
* Split src/java directory into src/frontend and src/backend
2013-08-12 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Removed BranchPropagation interface
* Refactored branch target analysis
* Removed some `instanceof` use
2013-08-11 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Changed the branchTarget method into an inherited attribute and improved
its performance. Rather than collecting all branches for each potential
target statement and testing if any of those is the current branch it
simply tests the branch statement against each possible target statement
directly.
2013-08-10 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* The collectFinally method has been replaced by the
inherited enclosingFinally attribute. All enclosing finally
hosts can be found by repeatedly evaluating the new attribute.
This allows lazier evaluation and fixes some problems with the
old imperative method.
2013-06-04 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Renamed PlaceholderMethodDecl to StandInMethodDecl
2013-06-03 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed annotation bytecode bug affecting Class-valued annotation
attributes
2013-05-31 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed error that caused single static imports to work like
on-demand static imports
2013-05-30 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed generic method type inference error
* Reduced code duplication in Java 7 module by separating some
aspects into separate files in the Java 4 module
2013-05-25 Jesper Öqvist <jesper@llbit.se>
* Java support level is now included in the version string given by
-version
2013-05-22 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Added -profile option to generate profile data
2013-05-19 Jesper Öqvist <jesper@llbit.se>
* Renamed SuperClassAccess children to SuperClass
* Renamed SuperInterfaceId child to SuperInterface
2013-05-06 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Refactored AssertStmt: `AssertStmt ::= Condition:Expr [Message:Expr]`
2013-04-12 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Reorganized source tree
* Merged frontend/backend directories - one module per Java version
* Added Java 6 module
* Building of jar files and documentation is handled by toplevel
Ant script
* Only one toplevel ReadMe and license file
* Removed extraneous DiffTask class
2013-02-13 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Version 7.1 released
2013-01-25 Jesper Öqvist <jesper@llbit.se>
* Removed unused import java.util.LinkedHashSet
2013-01-23 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Moved PathPart and subclasses to separate .jadd file in Java1.4Frontend
* Improved name checking error messages for TypeDecl
* Package names are double-checked against canonical file names in
order to avoid some problems on case-insensitive file systems.
Trac ticket: http://svn.cs.lth.se/trac/jastadd-trac/ticket/99
2013-01-10 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed error in Java7Frontend/JavaPrettyPrinter.
Properly escape backslash file separator.
2013-01-07 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Don't add system property `java.class.path` to classpath
2012-11-26 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Version 7.0 released
2012-11-23 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Updated to JastAdd2 version R20121122 (r889)
2012-11-14 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Updated to JastAdd2 version R20121114 (r887)
2012-11-09 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Updated to latest JastAdd2 version
2012-11-06 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Fixed errors in parser rule for annotations, now it is closer to the JLS.
Trac ticket: http://svn.cs.lth.se/trac/jastadd-trac/ticket/87
2012-11-02 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* ExtendJ prints an error message and exits with nonzero exit code when
an unexpected exception occurs
* Fixed error causing NPE during ParMethodDecl type argument substitution
Trac ticket: http://svn.cs.lth.se/trac/jastadd-trac/ticket/86
2012-11-01 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* All type accesses in accessor methods should be qualified
Trac ticket: http://svn.cs.lth.se/trac/jastadd-trac/ticket/85
2012-09-20 (JO)
* Modified beaver.Symbol: made the value field non-final and added custom
clone method. This fixes a "memory leak" when cloning AST nodes.
2012-09-13 (JO)
* The addSourceFile method now returns the CompilationUnit representing
the added source file name
2012-09-12 (ES/JO)
* Applied patch from Emma which fixed a circular type lookup problem
for generic types. The patch added the new inExtendsOrImplements
attribute.
2012-07-18 (JO)
* ExtendJ now uses the relative path to identify compilation units.
The pathName attribute of compilation units may now be different due to
this change.
Using the relative path rather than the absolute path makes it simpler
for static analysis tools to support relocation between different
machines.
2012-06-29 (JO)
* Made field and variable initializer type errors more verbose
* Fixed error in type lookup that could cause duplicate compilation units
to be added in the AST (one as a from-source CU, the other as library CU)
See also http://svn.cs.lth.se/trac/jastadd-trac/ticket/74
2012-05-07 (JO)
Changed the name of the Java7Backend compiler to ExtendJ (JJ7)
Changed the name of the Java7Backend generated Jar file to JJ7.jar
2012-05-04 (JO)
An implementation of createQualifiedAccess was added to AbstractWildcardType
so that wildcard types do not use the default behaviour of creating a
qualified type access with package and type name which are undefined for
wildcard types.
If a corresponding class file and source file have the same last modified
timestamp, then the class file will be parsed rather than the source file.
Final non-static fields now also receive the ConstantValue attribute when
the value is constant.
Fixed error that caused faulty bytecode generation when compiling an
enhanced for statement where the loop variable was a boxed primitive type.
Fixed definite assignment not propagating to second expression in an
assert statement.
Set the ACC_VARARGS flag for variable arity constructors.
2012-05-03 (JO)
The hostType attribute now always returns the "original" TypeDecl, so for
example a method in a generic class may be the child of a ParClassDecl but
hostType will now point to the corresponding GenericClassDecl.
This fixes an error where extraneous accessor methods were generated for
some types of method access that did not require an accessor method.
2012-04-26 (JO)
ExtendJ exits with exit code 0 if it only prints version or help
information. The version string output by -version was also made shorter.
2012-03-24 (JO)
Updated to latest JastAdd2 and RagDoll.
2012-03-06 (JO)
Removed the TypeDecl.subclassWithinBody(TypeDecl) method since the
purpose of that method was to find an enclosing class inheriting from a
given superclass C while determining member accessibility.
Only looking at the directly enclosing subclass of C is not sufficient to
determine the accessibility of the field or method - all enclsing classes
must be checked until one that can access the member is found.
This is the puprpose of the new methods
TypeDecl.mayAccess(Expr, FieldDeclaration)
TypeDecl.mayAccess(MethodAccess, MethodDecl)
2012-02-18 (JO)
Moved the Java7Backend compiler main class to
org.jastadd.jastaddj.JavaCompiler. A main class with the same name remains
in the default package, for backwards compatibility.
2011-12-08 (JO)
Upgraded Beaver to version 0.9.9
The new version of Beaver uses a new naming convention for the Beaver jar
files, an effect of this is that the jar file used for Ant tasks is now
called beaver-ant.jar. Extensions using Beaver in their Ant scripts by
referencing Java1.4Frontend/tools/beaver.jar should be updated to reference
Java1.4Frontend/tools/beaver-ant.jar instead.
2011-11-23 (JO)
Added automatic version number update to build scripts for JJ7.
2011-09-24 (JO)
Updated the JastAdd2 tool to version R20110924.
2011-09-15 (JO)
Added isDefaultConstructor flag to ConstructorDecl. Pretty printing
now ignores auto-generated default constructors. Extensions that rely on
pretty printing to generate default constructors should refine the
setDefaultConstructor method to make it do nothing.
2011-06-03 (JO)
Refactored the Java AST. CatchClause is now an abstract base class
for BasicCatch, which fills the same role that CatchClause previously had.
Extensions that use the old CatchClause node type will have to in some
cases move attribute refines etc. to BasicCatch.
2011-05-12 (JO)
Modified build files to use more heap memory when running JastAdd2
using an exec task.
2011-04-01 (JO)
Errors and warnings are printed on the error stream instead of the
standard output stream.
2011-08-09 (JO)
Added build file to root ExtendJ directory with clean target that
cleans all ExtendJ modules.
2011-08-09 (JO)
Refactored VariableDeclaration.jrag - moved interface Variable to
Variable.jadd