]> gcc.gnu.org Git - gcc.git/blame - gcc/java/ChangeLog
c-typeck.c (build_conditional_expr): Handle complex data types.
[gcc.git] / gcc / java / ChangeLog
CommitLineData
8f975c18
APB
1Fri Jun 2 16:48:55 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
2
3 * class.c (get_dispatch_table): Build the vtable dummy entry list
4 element with a null purpose. Fixed leading comment.
5 (build_dtable_decl): Build an accurate dtable type when appropriate
6 and use it.
7
2e761e49
RH
82000-06-02 Richard Henderson <rth@cygnus.com>
9
10 * lang.c (lang_get_alias_set): New.
11
0f145be8
APB
122000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13
14 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
15 before using it as the accessed field.
16
2771fe54
TT
172000-05-31 Tom Tromey <tromey@cygnus.com>
18
19 * java-tree.h (boolean_array_vtable, byte_array_vtable,
20 char_array_vtable, short_array_vtable, int_array_vtable,
21 long_array_vtable, float_array_vtable, double_array_vtable):
22 Declare.
23 * expr.c (get_primitive_array_vtable): New function.
24 (create_primitive_vtable): New function.
25 (java_lang_expand_expr): Enable code to statically generate
26 arrays.
27 * decl.c (init_decl_processing): Create primitive vtables.
28 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
29 short_array_vtable, int_array_vtable, long_array_vtable,
30 float_array_vtable, double_array_vtable): Define.
31
30a3caef
ZW
322000-05-26 Zack Weinberg <zack@wolery.cumb.org>
33
34 * java/parse.y (find_applicable_accessible_methods_list):
35 Don't add an uninitialized value to the list.
36
b8c5b1c6
TT
372000-05-25 Tom Tromey <tromey@cygnus.com>
38
40aaba2b
TT
39 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
40 when trying to see if field's class should be initialized. Always
41 initialize field's declaring class, not qualified class.
42 For PR gcj/162.
43
b8c5b1c6
TT
44 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
45 `wfl_operator', to maybe_build_primttype_type_ref.
46 Fixes PR gcj/235.
47
6518c7b5
BM
482000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
49
50 * parse.y (patch_method_invocation): Don't try to lookup methods
51 in primitive types.
52
611a4b87
APB
532000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
54
55 * parse.y (resolve_field_access): Call the appropriate <clinit>
56 before accessing the length of a static array. Craft a decl for
57 the field while its time. Fixes PR gcj/129.
58
6b48deee
APB
592000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
60
61 * parse.y (resolve_package): Correctly set `*next' (was off by
62 one.)
63 (resolve_qualified_expression_name): Fixed comment.
64
0ba154aa
APB
65Thu Apr 27 17:47:34 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
66
67 * jcf-parse.c (jcf_parse_source): Reset current_class and
68 current_function_decl to NULL before parsing a new file.
69
c280e37a
APB
70Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
71
72 * parse.y (block_end:): If the collected block doesn't feature a
73 statement, insert an empty statement.
74
92d83515
APB
752000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
76
77 * parse.y (maybe_yank_clinit): New function.
78 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
79 end of the list of methods belonging to a class.
80 (java_complete_expand_method): Check whether <clinit> is really
81 necessary and expand it accordingly.
82
ec5bb3cf
APB
832000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
84
85 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
86 processed by the method's switch statement.
87
67db0ce7
TT
882000-05-19 Tom Tromey <tromey@cygnus.com>
89
90 * java-tree.h: Added init state enum.
91 * decl.c (emit_init_test_initialization): Initialize class
92 initialization check variable by looking at class' state.
93
43490bec
TT
942000-05-19 Tom Tromey <tromey@cygnus.com>
95
96 * java-tree.h (build_instanceof): Declare.
97 (build_get_class): Declare.
98 * parse.y (patch_binop): Use build_instanceof.
99 * expr.c (build_instanceof): New function. If class is final,
100 don't make a function call.
101 (expand_java_INSTANCEOF): Use it.
102 (build_get_class): New function.
103
062edaed
AO
1042000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
105
106 * jcf-write.c (generate_classfile): Scan the source_file for
107 slashes with the right pointer variable.
108
078721e1
AC
109Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
110
111 * lang.c (lang_decode_option): Update -Wunused flags by calling
112 set_Wunused.
113 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
114
46543024 1152000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3b304f5b
ZW
116
117 * check_init.c (check_init): Constify local char *.
118 * class.c (push_class): Constify local char *.
119 * java_tree.h: Update prototypes.
120 * jcf-io.c (open_class): Constify filename parameter and
121 return value.
122 (find_class): Remove redundant string copy. Cast return from
123 open_class.
124 * jcf-parse.c (read_class, parse_class_file, yyparse):
125 Constify local char *.
126 * jcf-write.c (generate_bytecode_insns, generate_classfile):
127 Constify local char *.
128 * jcf.h (JCF): Constify filename and classname.
129 (JCF_FINISH): Cast args to FREE to char * when appropriate.
130 * lang.c (init_parse): Constify parameter and return value.
131 * lex.c (java_get_line_col): Constify filename parameter.
132 * parse.h: Constify parser_ctxt.filename. Update prototypes.
133 * parse.y (java_parser_context_suspend,
134 issue_warning_error_from_context, safe_layout_class): Constify
135 local char *.
136 * parse.c: Regenerate.
137
4c6a8973
TT
1382000-05-08 Tom Tromey <tromey@cygnus.com>
139
140 * expr.c (build_jni_stub): Cache the result of
141 _Jv_LookupJNIMethod.
142
e117276e
APB
1432000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
144
145 * decl.c (predef_filenames_size): Now 7.
146 (predef_filenames): New seventh entry.
147
652f2504
TT
1482000-05-04 Tom Tromey <tromey@cygnus.com>
149
150 * boehm.c (mark_reference_fields): Don't mark RawData fields.
151 Keep track of when we've seen a reference field after a
152 non-reference field.
153 (get_boehm_type_descriptor): Handle case where we see
154 non-reference fields but no trailing reference field.
155 * decl.c (rawdata_ptr_type_node): Define.
156 (init_decl_processing): Initialize rawdata_ptr_type_node.
157 * java-tree.h (rawdata_ptr_type_node): Declare.
158
ccedaff3
KG
1592000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
160
161 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
162 specifiers in calls to fprintf.
163
dd5d6281
TT
1642000-05-03 Andrew Haley <aph@cygnus.com>
165
166 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
167
168 * javaop.h (WORD_TO_INT): New function.
169 (IMMEDIATE_s4): Use WORD_TO_INT.
170 * jcf.h (JPOOL_INT): Ditto.
171
172 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
173 separator.
174
dd5d6281 1752000-04-19 Tom Tromey <tromey@cygnus.com>
7145d9fe
TT
176
177 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
178 on native function.
179 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
180 JNI methods.
181 * expr.c (build_jni_stub): New function.
182 * lang-specs.h: -fjni and -femit-class-file are incompatible.
183 * parse.c: Rebuilt.
184 * parse.y (java_complete_expand_methods): Expand a native method
185 and call build_jni_stub if -fjni given.
186 * lang-options.h: Document -fjni.
187 * lang.c (flag_jni): New global.
188 (lang_f_options): Added `jni' entry.
189 * java-tree.h (soft_lookupjnimethod_node,
190 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
191 Declare.
192 (flag_jni): Declare.
193 (build_jni_stub): Declare.
194 (struct lang_decl): Added `native' flag.
195 (METHOD_NATIVE): Redefined to use `native' field of lang specific
196 structure.
197 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
198 soft_jnipopsystemframe_node): New globals.
199 (init_decl_processing): Set them. _Jv_InitClass only takes one
200 argument.
201
202 * java-tree.def: Put into `C' mode.
203
e815887f
TT
2042000-04-27 Tom Tromey <tromey@cygnus.com>
205
206 Fix for PR gcj/2:
207 * expr.c (expand_invoke): Generate check to see if object pointer
208 is null in nonvirtual invocation case.
209 * java-tree.h (soft_nullpointer_node): Declare.
210 * decl.c (soft_nullpointer_node): New global.
211 (init_decl_processing): Initialize soft_nullpointer_node.
212 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
213 or `private' methods.
214 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
215
ad81223c
APB
216Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
217
218 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
219 from <clinit>
220
f1acc01e
TT
2212000-04-26 Tom Tromey <tromey@cygnus.com>
222
223 * zextract.c (find_zip_file_start): New function.
224 (read_zip_archive): Use it.
225
e803d3b2
APB
2262000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
227
228 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
229
152de068
APB
2302000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
231
232 * class.c (common_enclosing_context_p): New function.
233 * java-tree.h (common_enclosing_context_p): Added prototype.
234 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
235 classes sharing an outer context with the current instance.
236 * parse.y (build_access_to_thisn): Fixed leading comment.
237 (verify_constructor_super): New local `supper_inner'. Skip
238 enclosing context argument in the case of inner class constructors.
239 (patch_method_invocation): Insert proper context as second
240 parameter to pure inner class constructor super invocations.
241
93220702
APB
242Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
243
244 * parse.y (end_class_declaration): Reset the interface number
245 counter.
246
dfb99c83
APB
2472000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
248
249 * parse.y (source_start_java_method): Deleted unecessary code.
250 (patch_method_invocation): Fixed comment.
251
e60a8c26
RL
2522000-04-24 Robert Lipe <robertlipe@usa.net>
253
254 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
255
3c8c10b8
TT
2562000-04-23 Tom Tromey <tromey@cygnus.com>
257
258 * boehm.c (mark_reference_fields): Use int_byte_position.
259
8a008c41
TT
2602000-04-22 Tom Tromey <tromey@cygnus.com>
261
262 * boehm.c (mark_reference_fields): Only call byte_position on
263 non-static fields.
264
d5f76aba
TT
2652000-04-22 Tom Tromey <tromey@cygnus.com>
266
267 * boehm.c (mark_reference_fields): Added `last_view_index'
268 argument. Use DECL_FIELD_OFFSET to determine field's offset.
269
a40d21da
APB
270Thu Apr 20 17:41:28 2000 Mo DeJong <mdejong@cygnus.com>
271
272 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
273 * parse.y (check_class_interface_creation): Fixed comments. Select
274 permitted modifiers for (inner) interfaces. Changed error message
275 to report rejected modifiers used with local classes.
276
2772000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
278
279 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
280 of directly inherited type considered in scope.
281 * parse.y (do_resolve_class): Search inherited classes for inner
282 classes.
283
473e7b07
TT
2842000-04-20 Tom Tromey <tromey@cygnus.com>
285
286 * parse.y (not_accessible_p): Use member's class, not current
287 class, when doing inheritance check for protected reference.
288 Fixes PR gcj/124.
289
c52fbf0f
JS
290Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com>
291
292 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
293
f2760b27
APB
2942000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
295
296 * parse.y (lookup_field_wrapper): Search for final local aliases.
297 (resolve_expression_name): Let lookup_field_wrapper search for
298 final local aliases. Force the value of `name' if one is found.
299 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
300 an expression name. Fixed comments.
301
807bc1db
APB
3022000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
303
304 * parse.y (yyerror): `msg' can be null, don't use it in that case.
305
ecb36604
TT
3062000-04-19 Tom Tromey <tromey@cygnus.com>
307
308 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
309
48a840d9
APB
3102000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
311
312 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
313
83c1f628
TT
3142000-04-18 Tom Tromey <tromey@cygnus.com>
315
316 PR gcj/211:
317 * gjavah.c (utf8_cmp): Changed return value.
318 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
319 result.
320 (cxx_keywords): New global.
321 (get_field_name): Handle new result of cxx_keyword_subst.
322 (print_method_info): Likewise.
323
a7384840
BM
3242000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
325
326 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
327 with a newline, for CNI.
328 (print_stub_or_jni): Print a space or newline before method name for
329 CNI as well as JNI.
330 (print_cxx_classname): Don't write leading "::" in CNI stub method.
331 (process_file): Include gcj/cni.h if generating CNI stubs.
332
3e0768f0
TT
3332000-04-16 Tom Tromey <tromey@cygnus.com>
334
335 * gjavah.c (decompile_method): Use print_field_name.
336 Fixes PR gcj/205.
337
48a840d9
APB
3382000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
339
340 * parse.y (java_expand_classes): Reverse the package list once.
341 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
342 reduction.
343 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
344 the `==' and `!=' operators.
345
cedea510
APB
3462000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
347
348 * jcf-write.c (generate_bytecode_insns): At invokation time,
349 always relate an interface method to the type of its selector.
350
e803d3b2
APB
3512000-04-05 Tom Tromey <tromey@cygnus.com>
352
353 Fix for PR gcj/2:
354 * expr.c (expand_invoke): Generate check to see if object pointer
355 is null in nonvirtual invocation case.
356 * java-tree.h (soft_nullpointer_node): Declare.
357 * decl.c (soft_nullpointer_node): New global.
358 (init_decl_processing): Initialize soft_nullpointer_node.
359 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
360 or `private' methods.
361 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
362
bc2874c9
TT
3632000-04-05 Tom Tromey <tromey@cygnus.com>
364
365 Fix for PR gcj/140:
366 * parse.y (check_final_assignment): Recognize assignments to the
367 `length' field of an array when generating class files.
368
256172c4
APB
3692000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
370
371 * class.c (decl_hash): Prototype removed.
372 (decl_compare): Likewise.
373
e0fc4118
TT
3742000-04-05 Tom Tromey <tromey@cygnus.com>
375
376 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
377 * parse.y (check_modifiers_consistency): Check for final/volatile
378 clash. Fixes PR gcj/164.
379
e0422ed0
APB
3802000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
381
382 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
383 made global.
384 (java_hash_compare_tree_node): Renamed from `decl_compare, made
385 global.
386 (add_method_1): Use `java_hash_hash_tree_node' and
387 `java_hash_compare_tree_node'.
388 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
389 (java_hash_compare_tree_node): Likewise.
390 * parse.y (find_applicable_accessible_methods_list): Create,
391 delete and use a hash table to remember already searched interfaces.
392
4200941b
MW
3932000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
394
395 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
396 with latest entry.
397
c0b864fc
KG
3982000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
399
400 * boehm.c (mark_reference_fields, set_bit): Prototype.
401 (set_bit): Un-ANSI-fy definition.
402
403 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
404 Prototype.
405
406 * decl.c (emit_init_test_initialization): Likewise.
407
408 * gjavah.c (jni_print_char): Likewise.
409
410 * parse.y (create_new_parser_context): Likewise.
411
7a678b64 412Thu Mar 30 15:26:56 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
64ea4a5e
APB
413
414 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
415 patch missing hunk. Fixed indentation.
416
05411ecf
TT
4172000-03-30 Tom Tromey <tromey@cygnus.com>
418
419 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
420 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
421
acbedd7c
APB
4222000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
423
424 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
425 when negative *before* using it as an array index.
426 * ChangeLog: Fixed typo.
427
0981a859
APB
4282000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
429
430 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
431 to 0 when it reaches -1.
432
4332000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
434
435 * jcf-parse.c (get_constant): Properly cast `num' during the
acbedd7c 436 invocation of `add_double'.
0981a859
APB
437 * jcf-write.c (push_long_const): Properly cast `lo' before
438 comparing it to short bounds.
439 * parse-scan.y (interface_declaration:): Rule re-arrange so that
440 `interface_body:' is reduced after the current interface is
441 pushed.
442
a843e0ce
TT
4432000-03-26 Tom Tromey <tromey@cygnus.com>
444
445 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
446 Java-specific `-f' option.
447
ad41cc2a
RK
448Sun Mar 26 11:37:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
449
450 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
451 Adjust order of making types.
452 Make bitsize_*_node values.
453
770ae6cc
RK
454Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
455
456 * class.c (make_field_value): Use byte_position.
457 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
458 (java_array_data_offset): Likewise.
459 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
460 bzero call.
461
165f37bc
APB
4622000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
463
464 * parse.y (check_abstract_method_definitions): New local
465 `end_type_reached'. Make sure we also consider `end_type'.
0981a859
APB
466 (java_check_abstract_method_definitions): Make sure we eventually
467 consider `java.lang.Object'.
468 (maybe_use_access_method): Don't use access method if not in the
469 context of a pure inner class or if the method's context is right.
470 (find_applicable_accessible_methods_list): New static flag
165f37bc 471 `object_done'. Don't search abstract classes as interfaces. Fixed
0981a859
APB
472 indentation. Fixed the `java.lang.Object' only search. Search
473 class interface(s) first, then fully search enclosing contexts.
474 (find_most_specific_methods_list): Pick the closest candidate when
165f37bc
APB
475 they're all abstract.
476
124906f9
APB
477Mon Mar 20 08:58:51 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
478
479 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
480 properly initialize `finished_label.' Don't emit gotos for empty
481 try statements.
482
c14f7160
ML
483