forked from daveshields/jikes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChangeLog
More file actions
8710 lines (7017 loc) · 265 KB
/
ChangeLog
File metadata and controls
8710 lines (7017 loc) · 265 KB
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
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2004-10-02 Elliott Hughes <enh@acm.org>
* NEWS: describe 1.22 and the bugs fixed between 1.21 and 1.22.
2004-09-26 Bu FeiMing <phileas_bu@hotmail.com>
* src/symbol.h (InsertDirectorySymbol): bug #495; subdirectories
of a class directory should not be considered source directories.
2004-09-26 Elliott Hughes <enh@acm.org>
* src/decl.cpp, src/error.cpp, src/error.h: bug #4046; warn when
overriding a deprecated method.
2004-09-13 Elliott Hughes <enh@acm.org>
* src/decl.cpp: bug #4042; constructors and default constructors
of strictfp classes should be strictfp themselves (JLS2 8.1.1.3).
2004-09-13 Elliott Hughes <enh@acm.org>
* src/class.cpp: the release candidate Java 1.5's javac uses
UTF-8 constants instead of Class constants for annotations.
This patch lets us work with the rt.jar from 1.5-rc.
2004-08-20 Elliott Hughes <enh@acm.org>
* configure.ac, src/config.h.in, src/platform.h: bug #4018;
include <errno.h> to fix FreeBSD 4.8 build problems.
* Makefile.in, aclocal.m4, config.guess, config.sub,
configure, depcomp, install-sh, doc/Makefile.in,
src/Makefile.in: regenerated.
2004-08-18 Elliott Hughes <enh@acm.org>
* src/body.cpp, src/decl.cpp, src/semantic.h: bug #3947; ignore
static variables if we're looking for shadows of a non-static
variable, and vice versa.
2004-06-25 Elliott Hughes <enh@acm.org>
* src/decl.cpp: a fix to my fix for bug #3986; still regresses
on the same Jacks tests, but is better practically. Now, as
well as rejecting invalid 1.4 source, we can compile against
the 1.5 rt.jar classes.
2004-06-22 Elliott Hughes <enh@acm.org>
* src/decl.cpp: bug #3424; distinguish between invalid types
and placeholders for not-found types (i.e. keep saying "type not
found" rather than switching to "a candidate was found, but it is
invalid and needs to be fixed before this type will successfully
compile."
2004-06-21 Elliott Hughes <enh@acm.org>
* src/decl.cpp: bug #3986; don't compile covariant return types
in .java files when -source is less than 1.5. This breaks
the Jacks tests 13.1-covariance-[123], but I think they're wrong
and should only be run with "-source 1.5".
2004-06-20 Elliott Hughes <enh@acm.org>
* src/system.cpp: bug #3934 and bug #3989; don't try to create
a placeholder for unfound system methods and fields. It's
likely to be too late. (I wonder if we should use tests such
as "control.Throwable_initCauseMethod() != NULL" instead of
the usual "control.option.target < JikesOption::SDK1_4", the
better to cope with unusual targets such as MIDP-1.0, and cases
where the user has forgotten "-target 1.3"? The current patch
stops us crashing; the alternative patch would let us "just work".)
2004-06-02 Elliott Hughes <enh@acm.org>
* src/double.cpp, src/double.h: it's impossible to implement
"T& operatorO(const T&)" correctly where O isn't an assignment
operator. (In our case, we were leaking memory.)
Implement "T operator(const T&)" instead.
2004-06-02 Elliott Hughes <enh@acm.org>
* src/definite.cpp: remove redundant test from
DefinitePair::operator=(const DefiniteAssignmentSet&).
* src/double.cpp: fix leak in BigInt::operator=(const BigInt&).
* src/double.h: fix BitInt(BigInt&).
2004-05-31 Elliott Hughes <enh@acm.org>
* src/definite.cpp, src/double.cpp, src/set.h: fix operator=
implementations missing self-assignment checks (found while
investigating bug 3973).
2004-05-20 Elliott Hughes <enh@acm.org>
* src/bytecode.cpp: Bug 3974 - don't assume that a string literal
has type java.lang.String; it may have been cast to java.lang.Object
or one of String's implemented interfaces in valid (if strange) code.
2004-05-17 Elliott Hughes <enh@acm.org>
* src/expr.cpp: Bug 3972 - don't assume that a constant is an int
literal just because it's not one of the other literals we were
expecting; check explicitly. Invalid source may mean that we're
actually looking at a string constant, say.
2004-05-16 Chris Abbey <jikes@cabbey.net>
Release 1.21
2004-05-13 Chris Abbey <jikes@cabbey.net>
* configure.ac: bump version
* configure: regen
2004-05-04 Chris Abbey <jikes@cabbey.net>
* src/m4/ac_check_iconv.m4: enable --without-iconv
* aclocal.m4:
* config.guess:
* config.sub:
* configure:
* depcomp
* install-sh
* Makefile.in
* src/Makefile.in
* doc/Makefile.in: regen
2004-05-04 Chris Abbey <jikes@cabbey.net>
* autogen.sh: made more user friendly
2004-05-03 Elliott Hughes <enh@acm.org>
* src/init.cpp: fix bug #3948 by ignoring fields of array types
when looking for final fields that could be made static.
2004-05-03 Elliott Hughes <enh@acm.org>
* src/class.cpp, src/error.cpp: ensures we also print the path to
the class file within the JAR file (i.e. include the package) in
diagnostics about invalid class files.
2004-05-03 Elliott Hughes <enh@acm.org>
* src/class.h: fixes compilation with libgcj3.3.jar; gcj-compiled
classes have an extra attribute "gnu.gcj.gcj-compiled". A fencepost
error in GetN was causing us to reject the class file. (Also fixes
the analogous error in SkipN.)
2004-05-03 Elliott Hughes <enh@acm.org>
* src/class.h, src/class.cpp: Always call MarkInvalid rather than
sometimes manipulating the field directly, and switch from a simple
boolean to a description of the problem we found...
* src/error.cpp: ...so we can give a potentially useful diagnostic.
2004-05-01 Elliott Hughes <enh@acm.org>
* src/control.cpp: it's the import that's unused, not the name.
Let the user's editor highlight the whole import declaration,
not just the name.
2004-04-18 Chris Abbey <jikes@cabbey.net>
Release 1.20.
2004-04-17 Chris Abbey <jikes@cabbey.net>
* src/expr.cpp: convert ExtremaForType, ReportOverflow, and
CheckIntegerAddition from static to inline to allow compilation
on AIX.
2004-04-17 Eric Blake <ebb9@byu.net>
* src/m4/ac_cxx_exceptions.m4: Delete - this file is no longer
needed, because jikes doesn't use exceptions.
* src/Makefile.in: Regenerate.
2004-04-16 Chris Abbey <jikes@cabbey.net>
* src/Makefile.in: trivial hand patch, looks like src/m4/
was not up to date the last time this was regen'd.
2004-04-15 Eric Blake <ebb9@byu.net>
* NEWS: More news blurbs.
* configure.ac: Bump jikes version, and update to automake 1.8.3.
* config.guess: Regenerate.
* config.sub: Regenerate.
* configure: Regenerate.
* install-sh: Regenerate.
* mkinstalldirs: Regenerate.
2004-04-14 Chris Abbey <jikes@cabbey.net>
* src/error.cpp (SemanticError::InitializeMessageGroups): turn
the defaults down for Effective Java and Naming Conventions
diagnostics.
2004-04-14 Eric Blake <ebb9@byu.net>
* NEWS: My shot at 1.20 release notes.
2004-04-13 Chris Abbey <jikes@cabbey.net>
* src/symbol.ccp: revert to using strcmp and wcscmp instead of
comparing just the first char. Fixes bug 3920. Thanks to Elliott
for pointing out the subtle difference of the equivalent to
changing from s.equals(".") to s.startsWith(".").
2004-04-12 Eric Blake <ebb9@byu.net>
* src/error.h (STATIC_TYPE_ACCESSING_MEMBER_TYPE): New error.
* src/error.cpp: Ditto.
* src/decl.cpp (FindType): Emit it when appropriate.
2004-04-11 Eric Blake <ebb9@byu.net>
* src/symbol.cpp (UnlinkFromParents): Fix compile-time error with
poor choice of identifier.
2004-04-11 Elliott Hughes <enh@acm.org>
* AUTHORS: Credit where credit's due.
2004-04-11 Elliott Hughes <enh@acm.org>
* src/diagnose.cpp: Remove an extraneous endl that caused blank
lines to appear in +E or +D output when there were syntax (rather
than lexical or semantic) errors. There are still some cases where
Jikes outputs extra blank lines in its regular output, but they're
less noticeable when the output isn't very tight anyway, and I haven't
found them in the source, either.
2004-04-11 Phil Norman <cuvy.abezna@virgin.net>
* src/symbol.h, src/symbol.cpp: Fix bug 3446. Added a method
TypeSymbol::UnlinkFromParents which removes references from the
subtypes and dependents sets of the TypeSymbol's 'super' and set
of implemented interfaces. Used this method in the method
SymbolTable::DeleteAnonymousTypes so that destroyed anonymous
types will be properly unlinked. Bug 3446 was caused by things such
as the TypeSymbol representing java.lang.Object keeping references
to a destroyed TypeSymbol, and so causing segfaults.
2004-04-08 Eric Blake <ebb9@byu.net>
* src/class.cpp (Init) [!JIKES_DEBUG]: Fix regression in non-debug
builds from previous patch.
2004-04-07 Eric Blake <ebb9@byu.net>
* src/depend.cpp (AddDependence): Move array, primitive processing
here from elsewhere. Once again allows int[].class in a package.
* src/expr.cpp (ProcessAmbiguousName, ProcessFieldAccess),
(ProcessMethodName, GetAnonymousType): Use updates to
AddDependence.
2004-04-04 Eric Blake <ebb9@byu.net>
* src/class.cpp (Init): Silence compiler warning.
2004-04-04 Musachy Barroso <insanus@bellsouth.net>
Jikes patch 432.
* src/control.cpp (Control): Check for system I/O errors.
* src/control.h (general_io_errors, general_io_warnings): New
fields.
* src/error.cpp (SafeArray): New method for persistent strings.
* src/error.h (IO_WARNING, IO_ERROR): New errors.
* src/system.cpp (ProcessBootClassPath):
* src/system.cpp (ProcessExtDirs):
* src/system.cpp (ProcessClassPath):
2004-04-04 Eric Blake <ebb9@byu.net>
* src/class.h (GetN): Return NULL-terminated byte arrays.
(CPUtf8Info::Bytes): Change to reflect the actual contents of the
bytes array rather than debugging view - fixes bug 3913.
(CPUtf8Info::contents, Init): Use contents only when debugging.
* src/class.cpp: Update all callers.
* src/symbol.cpp (UnboxedType): Adds missing Byte.
* src/error.cpp: Fix some typos.
(PrintFile): Be forgiving of NULL filename.
2004-04-04 Elliott Hughes <enh@acm.org>
* src/symbol.cpp (BoxedType): Adds the missing primitive type 'byte'.
2004-04-04 Elliott Hughes <enh@acm.org>
* src/expr.cpp (GetAnonymousType): Fix bug 3692. If we failed to
get a default constructor, we should give up before we require it.
2004-04-03 Elliott Hughes <enh@acm.org>
* src/error.cpp: Correctly fix the text of *all* package-related
errors.
2004-04-03 Elliott Hughes <enh@acm.org>
* src/diagnose.cpp, src/error.cpp: Fix +D so that it outputs the
correct column numbers, instead of always reporting column 0
because we hadn't re-read the input to be able to translate token
indexes into column numbers.
2004-04-02 Elliott Hughes <enh@acm.org>
* src/error.cpp: Fix a few package-related errors; packages should
be reported as "java.lang", not "java/lang".
2004-03-31 Eric Blake <ebb9@byu.net>
* src/ast.cpp [JIKES_DEBUG]: Move stream.h include outside of the
namespace.
* src/depend.cpp: Formatting.
(BoxedTypeForPrimitiveType, AddStringConversionDependence): Delete
- with autoboxing in JSR 201, this information better belongs in
TypeSymbol.
* src/semantic.h: Ditto.
* src/expr.cpp (ReportVariableNotFound): Use NULL, not 0, when we
mean a pointer.
(ProcessClassLiteral): Restore class dependence on non-primitive
types, that Elliott's patch regressed on.
(ProcessPLUS): Depend on the boxed type.
(CreateAccessToScopedVariable, ProcessAmbiguousName): Don't allow
static class to access constant instance variable of enclosing
class, bug 3536.
* src/symbol.h (BoxedType, UnboxedType): New methods.
* src/symbol.cpp: Implement.
2004-03-31 Elliott Hughes <enh@acm.org>
* src/expr.cpp: Fix a null-pointer access caused by trying to be too
clever; all that effort I put into not crashing on valid source, and
not a thought given to invalid source like "class C{C(){this.c=0;}}".
2004-03-28 Elliott Hughes <enh@acm.org>
* src/decl.cpp: Compiling GNU Classpath from CVS and looking at Jikes'
complaints was a good reminder that we shouldn't warn about hiding of
the serialVersionUID field; that's the way it's supposed to be used.
2004-03-28 Elliott Hughes <enh@acm.org>
* src/init.cpp: Warn about non-static final fields initialized by a
constant expression; these can be made static to save space in each
instance.
* src/error.cpp, src/error.h: The new diagnostic.
2004-03-28 Elliott Hughes <enh@acm.org>
* src/decl.cpp: Accept default access for serialVersionUID; it's
common existing practice.
* src/error.cpp: Put all the serialization-related warnings
together in the +Pserial group.
2004-03-28 Elliott Hughes <enh@acm.org>
* src/expr.cpp: Fix another assertion compiling Sun's
JDK 1.4.1 source; don't ask FindInaccessibleType to try with an
AstName whose base_opt is non-null, because it doesn't handle
that case. We can now compile the JDK as well as javac again.
2004-03-28 Elliott Hughes <enh@acm.org>
* src/expr.cpp: Fix an assertion compiling Sun's
JDK 1.4.1 source; it looks like the call to AddDependence in
ProcessClassLiteral was lifted too high, and the dependence should
be on the java.lang class that wraps the primitive type, not
the primitive type itself.
* src/depend.cpp, src/semantic.h: A new method to translate from
a primitive type to its java.lang wrapper type.
2004-03-28 Elliott Hughes <enh@acm.org>
* src/class.h (CPUtf8Info): Fix uninitialized member data.
2004-03-27 Eric Blake <ebb9@byu.net>
* src/depend.cpp (AddDependence): Don't create dependencies on
null, jikes bug 3701.
* src/class.h (ClassFile::GetN): Make more robust (I crashed my
system by 0-filling several megabytes on a short but invalid
.class file).
(UnknownAttribute): New class, split out from AttributeInfo to
reduce attribute memory needs.
* src/class.cpp: Ditto.
2004-03-26 Eric Blake <ebb9@byu.net>
* src/definite.cpp (DefiniteSwitchStatement): Fix problems with
switch statements without a default label.
2004-03-25 Eric Blake <ebb9@byu.net>
* configure.ac (AC_CXX_RTTI): Compilers have improved in 2 years,
don't cripple the RTTI check.
* aclocal.m4: Regenerate with automake 1.8.3.
* Makefile.in: Regenerate.
* configure: Ditto.
* doc/Makefile.in: Ditto.
* src/Makefile.in: Ditto.
* src/stream.h (TokenIndex, BadToken): Move to...
* src/platform.h (TokenIndex, BAD_TOKEN): ...here. This reduces
the number of files that depend on stream.h.
* src/ast.cpp: Use the new TokenIndex.
* src/ast.h: Ditto.
* src/body.cpp: Ditto.
* src/class.cpp: Ditto.
* src/control.cpp: Ditto.
* src/decl.cpp: Ditto.
* src/depend.cpp: Ditto.
* src/diagnose.cpp: Ditto.
* src/diagnose.h: Ditto.
* src/error.cpp: Ditto.
* src/error.h: Ditto.
* src/expr.cpp: Ditto.
* src/incrmnt.cpp: Ditto.
* src/init.cpp: Ditto.
* src/java.g: Ditto.
* src/lpginput.h: Ditto.
* src/modifier.cpp: Ditto.
* src/option.cpp: Ditto.
* src/parser.cpp: Ditto.
* src/parser.h: Ditto.
* src/scanner.cpp: Ditto.
* src/scanner.h: Ditto.
* src/semantic.h: Ditto.
* src/stream.cpp: Ditto.
* src/symbol.cpp: Ditto.
* src/symbol.h: Ditto.
* src/system.cpp: Ditto.
* src/table.h: Ditto.
* src/unparse.cpp: Ditto.
* src/javaact.cpp: Regenerate.
2004-03-23 Eric Blake <ebb9@byu.net>
* src/ast.h (AstEnumDeclaration, AstEnumConstant),
(AstAnnotationDeclaration): Final new classes to fully parse JDK
1.5 grammar (but semantics are still a ways off).
* src/error.h (ANNOTATION_TYPE_UNSUPPORTED, ENUM_TYPE_UNSUPPORTED),
(SUPER_IS_ENUM, CANNOT_CONSTRUCT_ENUM): New errors.
* src/error.cpp: Ditto.
* src/ast.cpp: Rough support for enum and annotation types.
* src/body.cpp: Ditto.
* src/control.h: Ditto.
* src/decl.cpp: Ditto.
* src/expr.cpp: Ditto.
* src/java.g: Ditto.
* src/modifier.cpp: Ditto.
* src/parser.h: Ditto.
* src/scanner.cpp: Ditto.
* src/semantic.h: Ditto.
* src/symbol.cpp: Ditto.
* src/symbol.h: Ditto.
* src/system.cpp: Ditto.
* src/unparse.cpp: Ditto.
* src/javaact.cpp: Regenerate.
* src/javaact.h: Ditto.
* src/javadcl.h: Ditto.
* src/javadef.h: Ditto.
* src/javasym.h: Ditto.
2004-03-23 Eric Blake <ebb9@byu.net>
* src/control.h: Reorder accessor cache variables.
(FIELD_ACCESSOR): Similar to TYPE_ACCESSOR, to access fields like
Integer.TYPE and ElementType.FIELD.
* src/control.cpp: Ditto.
* src/system.cpp (ProcessSystemField): New.
* src/expr.cpp (ProcessClassLiteral): Use field accessors.
(GetAnonymousType): Use '-' instead of '$' in 1.5 anon types.
* src/platform.cpp (US_MI): New.
* src/platform.h: Ditto.
2004-03-16 Eric Blake <ebb9@byu.net>
* src/ast.cpp: Backport the ability to parse JSR 14 from the
generics-branch (but not the semantic passes). Now mainline and
generics are in sync on the grammar.
* src/ast.h: Ditto.
* src/body.cpp: Ditto.
* src/bytecode.cpp: Ditto.
* src/decl.cpp: Ditto.
* src/error.cpp: Ditto.
* src/error.h: Ditto.
* src/expr.cpp: Ditto.
* src/java.g: Ditto.
* src/jikes.cpp: Ditto.
* src/jikesapi.cpp: Ditto.
* src/parser.cpp: Ditto.
* src/parser.h: Ditto.
* src/scanner.cpp: Ditto.
* src/semantic.h: Ditto.
* src/symbol.cpp: Ditto.
* src/unparse.cpp: Ditto.
* src/javaact.cpp: Regenerate.
* src/javaact.h: Ditto.
* src/javadcl.h: Ditto.
* src/javadef.h: Ditto.
* src/javasym.h: Ditto.
2004-03-14 Elliott Hughes <enh@acm.org>
* src/decl.cpp, src/semantic.h: Bug 3378 - the previous fix made the
diagnostic worse in the case where the problem was an inaccessible
field, because it would report 'type not found' rather than
'no accessible field'. A new method, FindInaccessibleType, finds only
inaccessible types (unlike FindType), and doesn't report anything
directly (unlike MustFindType). MustFindType uses the newly-extracted
method.
* src/expr.cpp (ReportVariableNotFound): use new method.
2004-03-14 Elliott Hughes <enh@acm.org>
* src/expr.cpp (ReportVariableNotFound): fix for bug 3378; if we can't
find an accessible type, look for an inaccessible one as a plausible
cause of the error.
2004-03-13 Elliott Hughes <enh@acm.org>
* src/control.cpp: only check for unused imports if compilation
is successful. Seemingly unused imports may well be used by code
we couldn't compile, so we can't be sure they're unused.
2004-03-12 Eric Blake <ebb9@byu.net>
* src/ast.h (AstMethodInvocation): Split method into base_opt and
identifier_token.
* src/ast.cpp (Clone, Print): Use updated AST.
* src/bytecode.cpp (MethodTypeResolution),
(EmitAssignmentExpression, EmitMethodInvocation): Ditto.
* src/definite.cpp (DefiniteMethodInvocation): Ditto.
* src/expr.cpp (Header, FindMisspelledMethodName),
(FindMethodInType, FindMethodInEnvironment, CreateAccessToType),
(CreateAccessToScopedVariable, CreateAccessToScopedMethod),
(FindVariableMember, FindMethodMember, ProcessMethodName): Ditto.
* src/java.g (MethodInvocation): Ditto.
* src/parser.h: Ditto.
* src/unparse.cpp (Unparse): Ditto.
* src/javaact.cpp: Regenerate.
* src/javaact.h: Ditto.
* src/javadcl.h: Ditto.
* src/javadef.h: Ditto.
2004-03-11 Elliott Hughes <enh@acm.org>
* src/error.cpp: Bug 3896 - failure to find .java files mentioned
on the command-line should be an error, not a warning. Non .java
files should also be treated as errors (most likely incorrect
arguments).
2004-03-11 Elliott Hughes <enh@acm.org>
* src/body.cpp, src/semantic.h: add warnings about boolean assignment
used as a truth value in an if, while, or do expression.
* src/error.cpp, src/error.h: new diagnostic.
2004-03-10 Eric Blake <ebb9@byu.net>
* src/decl.cpp (ReadType): Bug 3852 - fix at least the simple test
case, where valid A referring to valid B referring to invalid C
was not caught in A.
2004-03-09 Elliott Hughes <enh@acm.org>
* src/expr.cpp (GetAnonymousType): Fix invalid assertion that was
triggering during placeholder types - bug 3884.
2004-03-07 Elliott Hughes <enh@acm.org>
* src/decl.cpp (ProcessInstanceInitializers),
(ProcessStaticInitializers):
fix compilation of classes such as Sun's implementation of
java.lang.Character which use field declarations that declare more
than one field. The misleading names NumInstanceVariables and
NumClassVariables actually give the number of field declarations,
not the number of variables declared (i.e. "int i = 0, j = 1;" was
being treated as one rather than two).
2004-03-05 Eric Blake <ebb9@byu.net>
* src/ast.h (AstMemberValue, AstMemberValuePair, AstAnnotation),
(AstModifierKeyword): New classes.
(AstModifiers): Redo, to annotations in addition to keywords, per
JSR 175.
(AstPackageDeclaration): Add modifiers_opt.
(AstLocalVariableStatement, AstLocalClassStatement),
(AstClassCreationExpression): Rename to be shorter names.
* src/decl.cpp (CheckPackage): Check for package annotations,
although this needs more work.
* src/error.h (ANNOTATION_MODIFIER_UNSUPPORTED),
(RECOMMENDED_ANNOTATION_ORDER, DUPLICATE_ANNOTATION): New errors.
* src/error.cpp: Ditto.
* src/stream.h (PackageToken): New method, to allow for package
modifiers.
* src/stream.cpp: Reflect changes to stream.
* src/parser.cpp (PackageHeaderParse): Ditto.
* src/parser.h: Ditto.
* src/scanner.cpp (ClassifyIdOrKeyword): Ditto.
* src/semantic.h (ProcessPackageModifiers): New method.
* src/ast.cpp: Reflect changes to AST.
* src/body.cpp: Ditto.
* src/bytecode.cpp: Ditto.
* src/bytecode.h: Ditto.
* src/definite.cpp: Ditto.
* src/expr.cpp: Ditto.
* src/modifier.cpp: Ditto.
* src/symbol.cpp: Ditto.
* src/symbol.h: Ditto.
* src/unparse.cpp: Ditto.
* src/java.g: Ditto.
(CompilationUnit, PackageDeclaration, Modifier): Parse annotation
modifiers (but not yet for annotation types).
* src/javaact.cpp: Regenerate.
* src/javaact.h: Ditto.
* src/javadcl.h: Ditto.
* src/javadef.h: Ditto.
* src/javaprs.h: Ditto.
* src/javasym.h: Ditto.
2004-03-02 Elliott Hughes <enh@acm.org>
* src/control.cpp, src/decl.cpp: remove checks for +P from referenced
import checks; as long as +Punused-package-imports doesn't imply +P --
which it's hard to envisage as long as +P also turns on the anonymous
pedantic checks -- having +Punused-package-imports seemingly
non-functional is going to get us more bug reports.
* src/error.cpp: fix the diagnostic text to output the package name
in Java source form rather than internal form.
2004-03-02 Elliott Hughes <enh@acm.org>
* src/option.cpp: Implement -Werror as a javac-compatible synonym
for +Z2.
* src/jikes.cpp, doc/jikes.1: Document new -Werror option.
2004-03-01 Eric Blake <ebb9@byu.net>
* src/ast.h (Ast, StoragePool): Backport improved type-safety,
reduced object size, and placement operator new from
generics-branch. Affects all Ast classes.
* src/ast.cpp: Ditto.
* src/body.cpp: Ditto.
* src/bytecode.cpp: Ditto.
* src/control.cpp: Ditto.
* src/definite.cpp: Ditto.
* src/expr.cpp: Ditto.
* src/java.g: Ditto.
* src/parser.cpp: Ditto.
* src/javaact.cpp: Regenerate.
2004-02-29 Elliott Hughes <enh@acm.org>
* src/error.cpp: Also allow +Pno-all to turn off all named groups. This
is useful to turn off any named groups enabled by default, without
having to know what they are or explicitly list them.
* doc/jikes.1: Better document new +Pno-all option.
2004-02-29 Elliott Hughes <enh@acm.org>
* src/error.cpp: Fix "jikes --help" to show which +P groups are enabled
by default, rather than misleadingly trying (and failing) to show what
bare +P does. This whole area is something of a mess, so I expect to
be back soon.
Also add a new +Pall option to allow command-lines of the form "jikes
+Pall +Pno-redundant-modifier +Pno-modifier-order +Pno-serial", for
people who'd rather enable everything and explicitly disable what they
don't like than explicitly enable everything they want.
* doc/jikes.1: Document new +Pall option. The whole +P section was
rather misleading and inaccurate, so I've rewritten it to correspond
jikes' current behavior.
2004-02-28 Elliott Hughes <enh@acm.org>
* NEWS: Try to keep track of what I've done, so I don't have to
read through the ChangeLog when we're getting ready to release 1.20.
2004-02-28 Elliott Hughes <enh@acm.org>
* src/error.cpp: Implement upgrading of warnings to errors, as well
as the old optional upgrading of cautions. Fixes bug 665.
* src/jikesapi.cpp, jikesapi.h: Replace the nowarn and zero_defect
boolean fields with a new field that represents the level of tolerance
we show towards warnings and cautions.
* src/option.cpp: Parse +Z0, +Z1 and +Z2, and re-implement -nowarn, +Z
and --zero-cautions in terms of the new tolerance level.
variable; or hiding of fields when declaring a field.
* src/stream.cpp: Tracks the API change for testing whether warnings
should be generated.
* src/jikes.cpp, doc/jikes.1: Document new +Z sub-options.
2004-02-27 Elliott Hughes <enh@acm.org>
* src/body.cpp, src/semantic.h: Add a method to check for an
accessible field with a given name (WarnOfAccessibleFieldWithName).
* src/error.cpp, error.h: New error messages, and +P[no-]shadow.
* src/body.cpp, src/decl.cpp: Check for shadowing of fields
when declaring a local variable, a foreach variable, a catch
variable; or hiding of fields when declaring a field.
* doc/jikes.1: Document +P[no-]shadow.
2004-02-27 Eric Blake <ebb9@byu.net>
* src/ast.h (AstImportDeclaration::static_token_opt): New field.
* src/ast.cpp (AstImportDeclaration::Clone, Print): Support it.
* src/unparse.cpp (AstImportDeclaration::Unparse): Ditto.
* src/decl.cpp (ProcessImports): Note that static imports are not
supported yet.
* src/error.h (STATIC_IMPORT_UNSUPPORTED): New error.
* src/error.cpp: Ditto.
* src/java.g (ImportDeclaration): Parse static imports, from JSR
201.
* src/javaact.cpp: Regenerate.
* src/javaact.h: Ditto.
* src/javadcl.h: Ditto.
* src/javadef.h: Ditto.
* src/javasym.h: Ditto.
2004-02-27 Eric Blake <ebb9@byu.net>
* src/option.cpp (SaveCurrentDirectoryOnDisk, nocleanup): Fix
mingw build.
* src/symbol.cpp (ReadDirectory): Ditto.
* src/system.cpp (ProcessExtDirs): Ditto.
2004-02-26 Eric Blake <ebb9@byu.net>
* src/ast.h (AstFormalParameter::ellipsis_token_opt): New field.
* src/ast.cpp (AstFormalParameter::Clone, Print): Support it.
* src/unparse.cpp (AstFormalParameter::Unparse): Ditto.
* src/body.cpp (ProcessForeachStatement, ProcessTryStatement):
Ditto.
* src/decl.cpp (ProcessFormalParameters): Note that varargs are
not supported yet.
* src/error.h (VARARGS_UNSUPPORTED): New error.
* src/error.cpp: Ditto.
* src/parser.h: Forward declare AstFormalParameter.
* src/java.g (FormalParameter, FormalParameterList),
(LocalVariableDeclaration): Parse varargs, from JSR 201.
* src/javaact.cpp: Regenerate.
* src/javaact.h: Ditto.
* src/javadcl.h: Ditto.
* src/javadef.h: Ditto.
* src/javasym.h: Ditto.
2004-02-26 Eric Blake <ebb9@byu.net>
* src/expr.cpp (ProcessPLUS): Remove bad assertion ('true +
false', while illegal, can reach this point).
2004-02-26 Eric Blake <ebb9@byu.net>
* AUTHORS: Give credit where due.
* src/bytecode.cpp (EmitAssignmentExpression),
(EmitBinaryExpression, ConcatenateString, EmitStringAppendMethod):
Use faster StringBuilder (added in 1.5) when available.
* src/control.h (*_name_symbol): Rearrange the name_symbols to be
in alphabetic order.
(GetPrimitiveType): Improve the signature.
* src/system.cpp: Implement changes to control.h.
* src/platform.h: Delete lots of unused string constants, now that
they are more easily generated in system.cpp.
* src/control.cpp: Whitespace cleanup, and use changes in
control.h and platform.h.
* src/decl.cpp: Ditto.
* src/error.cpp: Ditto.
* src/error.h: Ditto.
* src/expr.cpp: Ditto.
* src/lookup.cpp: Ditto.
* src/platform.cpp: Ditto.
* src/symbol.cpp: Ditto.
2004-02-23 Emil Ong <emilong@cs.berkeley.edu>,
Mark Richters <mr@Informatik.Uni-Bremen.DE>
* doc/jikes.1: Documented new pedantic flags unused-type-imports
and unused-package-imports; originally by Mark Richters for 1.12,
ported to current by Emil Ong, ported to cvs HEAD by cabbey.
* src/control.cpp (ProcessBodies): If pedantic option is turned
on, call CheckForUnusedImports after all types of a body have been
processed.
(CheckForUnusedImports): New method checks and warns about
unnecessary import declarations.
* src/control.h (class Control): Declare new method
CheckForUnusedImports.
* src/decl.cpp (ImportType): If pedantic option is set, keep track
of packages from which types are imported as a result of a
type-import-on-demand.
(FindType): If pedantic option is set, keep track of types which
are found by a single-type-import.
* src/error.cpp (StaticInitializer): Initialize new named warnings
UNUSED_TYPE_IMPORT and UNUSED_PACKAGE_IMPORT.
(named_errors[]): Added new named warnings UNUSED_TYPE_IMPORT
and UNUSED_PACKAGE_IMPORT.
(InitializeMessages): Added messages for new named warnings
UNUSED_TYPE_IMPORT and UNUSED_PACKAGE_IMPORT.
* src/error.h (class SemanticError): Added UNUSED_TYPE_IMPORT and
UNUSED_PACKAGE_IMPORT to enum SemanticErrorKind.
* src/semantic.h (class Semantic): Added SymbolSets
referenced_package_imports and referenced_type_imports.
2004-02-23 Eric Blake <ebb9@byu.net>
* configure.ac: Fix typo in --enable-source15 test.
* configure: Regenerate.
* src/config.h.in: Ditto.
* src/access.h (Print): Minor improvement.
* src/expr.cpp (CastValue): Ditto.
* src/parser.h: Ditto.
* src/control.h (system_package, unnamed_package): Replace with
LangPackage() and UnnamedPackage().
(TYPE_ACCESSOR, METHOD_ACCESSOR): Utility macros to make adding
new system symbols easier.
* src/control.cpp: Update accordingly.
* src/system.cpp: Ditto.
* src/class.cpp: Ditto.
* src/decl.cpp: Ditto.
* src/depencd.cpp: Ditto.
* src/platform.h: Add several new string constants. This file
could stand a cleanup after the control refactor.
* src/platform.cpp: Update accordingly.
* NEWS: Document the addition of enhanced for loops.
* src/ast.h (AstForeachStatement): New class.
* src/ast.cpp: Support it.
* src/unparse.cpp: Ditto.
* src/semantic.h (ProcessForeachStatement),
(DefiniteForeachStatement): New methods.
* src/body.cpp (ProcessForeachStatement),
(ProcessContinueStatement): Support foreach loops.
* src/definite.cpp (DefiniteForeachStatement): Ditto.
* src/bytecode.h (EmitForeachStatement): New method.
* src/bytecode.cpp: Support foreach loops.
* src/error.h (INCOMPATIBLE_TYPE_FOR_FOREACH, TYPE_NOT_ITERABLE),
(FOREACH_UNSUPPORTED): New errors.
* src/error.cpp: Support foreach loops.
* src/symbol.h (helper_variable_index): Rename from
try_or_synchronized_variable_index, for use by foreach.
* src/symbol.cpp: Support rename.
* src/java.g (FormalParameter): Refactor, to allow LALR(1) grammar
with the previously refactored LocalVariableDeclaration.
(ForeachStatement): Parse new construct.
* src/javaact.cpp: Regenerate.
* src/javaact.h: Ditto.
* src/javadcl.h: Ditto.
* src/javadef.h: Ditto.
* src/javasym.h: Ditto.
2004-02-22 Elliott Hughes <enh@acm.org>
* body.cpp (ProcessLocalVariableDeclarationStatement): Make the
duplicate local variable declaration checking more similar to that
in ProcessTryStatement.
* body.cpp (ProcessTryStatement):
* decl.cpp (ProcessConstructorDeclaration, ProcessMethodDeclaration):
Invoke SetLocation on formal parameters. We can't do it in
ProcessFormalParameters, because that's invoked before the variable
symbols can have an owner -- how else do you check for duplicate
signatures? -- but we do need to come back and do it eventually.
The problems was noticed with reporting the location of the
original occurrence of a local variable, where the location would
be given as "".
2004-02-17 Eric Blake <ebb9@byu.net>
* ChangeLog: Reformat to fit 80 columns.
* configure.ac: Add --enable-source15 to turn on beta 1.5
features, without making it default.
* NEWS: Document configure option.
* src/option.cpp (GetErrorMessage, Option): Use it.
* src/Makefile.am (JAVAC): Silence code.h regen warnings.
* configure: Regenerate.
* src/Makefile.in: Ditto.
* src/config.h.in: Ditto.
* src/access.h (ACC_ANNOTATION): Now 0x2000, per updated JSR 175.
* src/bytecode.cpp (EmitExpression, GenerateClassAccessMethod),
(GenerateClassAccess): Utilize 1.5 class format change that allows
ldc class.
* src/expr.cpp (ProcessClassLiteral): Ditto.
* src/class.cpp (Signature, SignatureLength): Signature parsing is
experimental on the generics-branch; disable it completely here to
allow -source 1.5 to work.
* src/gencode.java: Update to support Unicode 4.0 surrogate pairs,
now legal in 1.5.
* src/code.h: Regenerate.
* src/code.cpp: Ditto.
* src/lookup.cpp: Use adjusted Code methods.
* src/scanner.cpp: Ditto.
(ClassifyNumericLiteral): Scan hex floating point. In the process,
make some floating point errors nicer.
* src/double.cpp (IEEEfloat(char*), IEEEdouble(char*)): Resolve
hex floating point.
* src/expr.cpp (ProcessFloatLiteral, ProcessDoubleLiteral): Accept
hex floating point.
* src/error.cpp (HEX_FLOATING_POINT_UNSUPPORTED): New error.
* src/error.h: Ditto.
* src/stream.cpp (INVALID_FLOATING_HEX_EXPONENT),
(INVALID_FLOATING_HEX_MANTISSA, INVALID_FLOATING_HEX_PREFIX),
(INVALID_OCTAL_CONSTANT, INVALID_FLOATING_EXPONENT): Ditto.
* src/stream.h: Ditto.
2004-02-17 Elliott Hughes <enh@acm.org>
* doc/jikes.1: Document new +Peffective-java and +Pserial switches.
* src/control.h, src/platform.cpp, src/platform.h, src/system.cpp: Adds
new serialPersistentFields name symbol.
* src/decl.cpp (CheckForSerializationMistakes): Don't warn about
the companion field to serialVersionUID, serialPersistentFields.
Add the new serialization checks from Java 1.5's javac.
(CheckFieldDeclaration, CheckFieldName): Factor out the field
checking, now there's more of it.
* double.cpp, src/double.h: Use Int::MIN_INT and Int::MAX_INT.
* src/error.cpp: New errors. Proper support for command-line +P
switches that turn groups of warnings on/off (previously there was
a single special case for +Pnaming).
* src/error.h: Ditto.
* src/expr.cpp: Adds overflow checking for integer constant
expressions.
* src/expr.cpp (FindMethodMember, FindVariableMember): Check for class
methods or fields accessed via an instance rather than the class.
* src/expr.cpp (ProcessShift, ProcessShiftCount, ProcessLEFT_SHIFT,
ProcessRIGHT_SHIFT): check for over-large or negative shift counts,
factor out some duplicated code. (These checks would have helped the
submitter of the recently-fixed code generation bug for prefix unary
operators.) (The new overflow-related code might be better in a
new file overflow.h)
* src/long.h: New class Int, analogous to LongInt, so we can get hold
of MIN_INT and MAX_INT in a similar manner.
* src/semantic.h: New prototypes.
2004-02-16 Elliott Hughes <enh@acm.org>
* src/class.cpp (AnnotationComponentAnnotation::Print): Fix
non-JIKES_DEBUG build.
2004-02-12 Eric Blake <ebb9@byu.net>
* src/access.h (ACCESS_ANNOTATION): Add, from JSR 175? According
to Sun, the value of this flag may still change before 1.5 is
final.
* src/bytecode.h (RegisterFieldRef, RegisterMethodref),
(RegisterClass): Decrease number of overloads, in order to better
track inner classes. Don't emit the currently forbidden
ACC_STRICTFP for inner classes.
* src/bytecode.cpp: Change all callers of updated Register*.
(LoadVariable): Don't load String constants, fixes bug 3850.
* src/class.h (CPInfo::tag): Change type to ConstantPoolTag.
(ConstantPool::invalid): Move inline.
(ATTRIBUTE_LocalVariableTypeTable): Implement, shares code with
LocalVariableTable.
(AnnotationComponentValue): Rename from AnnotationMemberValue.
(AnnotationComponentConstant, AnnotationComponentEnum),
(AnnotationComponentAnnotation, AnnotationComponentArray): Break
into subclasses for better implementation.
(Annotation): Rename from AnnotationValue, and make easier to
dynamically grow.
(Signature, SignatureLength): Update method signatures to allow
checking -source 1.5; fixes bug 3853.
* src/class.cpp: Implement.
* src/symbol.h (IsNested, IsInner, IsLocal): Const-ify.
2004-02-06 Elliott Hughes <enh@acm.org>
* src/bytecode.cpp (EmitPreUnaryExpression): Fix bad assertion -
patch 433.
* src/error.cpp (EJ_AVOID_OVERLOADING_EQUALS): Fix message typo -
Patch 435.
* src/expr (ProcessAND_AND, ProcessOR_OR),
(ProcessConditionalExpression): Improve comments - Patch 434.
2004-02-06 Eric Blake <ebb9@byu.net>
* src/access.h (ACCESS_BRIDGE, ACCESS_VARARGS, ACCESS_ENUM),
(ACCESS_SYNTHETIC): New access flags in JDK 1.5. (If only JSR 202
were public already...).
(Print): Take an argument now, adjust all callers.
* src/bytecode.cpp (DeclareField, BeginMethod),
(MethodTypeResolution, ByteCode, FinishCode): Use .class file and
symbol updates; emit EnclosingMethod attribute now.
(EmitTryStatement): Debug catch clause parameters.
* src/bytecode.h (CreateEnclosingMethodAttribute): New method.
* src/class.h (ATTRIBUTE_RuntimeVisibleAnnotations),
(ATTRIBUTE_RuntimeInvisibleAnnotations),
(ATTRIBUTE_RuntimeVisibleParameterAnnotations),
(ATTRIBUTE_RuntimeInvisibleParameterAnnotations),
(ATTRIBUTE_AnnotationDefault, ATTRIBUTE_EnclosingMethod): New,
from JSR 175 and 202.
* src/class.cpp: Implement.
* src/control.h (EnclosingMethod_literal): New field.
* src/decl.cpp (ProcessConstructorDeclaration),
(AddDefaultConstructor, AddInheritedFields, AddInheritedMethods),