]>
Commit | Line | Data |
---|---|---|
ba140e41 ZW |
1 | Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu> |
2 | ||
3 | * lang-specs.h: Map -Qn to -fno-ident. | |
4 | ||
4c7f1c63 RH |
5 | Fri Jan 29 16:51:56 1999 Richard Henderson <rth@cygnus.com> |
6 | ||
7 | * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo. | |
8 | ||
061ac426 TT |
9 | 1999-01-29 Tom Tromey <tromey@cygnus.com> |
10 | ||
11 | * parse.h (BUILD_APPEND): If ARG is a non-String object reference, | |
12 | then cast it to Object before calling `append' method. | |
13 | ||
f2693f2f PB |
14 | Thu Jan 28 14:45:39 1999 Per Bothner <bothner@cygnus.com> |
15 | ||
16 | * check-init.c (check_bool2_init, check_bool_init, check_init): | |
17 | Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR. | |
18 | * jcf-write.c (generate_bytecode_insns): Likewise. | |
19 | ||
1b18747f AH |
20 | Mon Jan 25 17:39:19 1999 Andrew Haley <aph@cygnus.com> |
21 | ||
22 | * except.c, java-except.h (expand_resume_after_catch): new | |
23 | function. | |
24 | * expr.c (java_lang_expand_expr): call expand_resume_after_catch | |
25 | to branch back to main flow of control after a catch block. | |
26 | ||
d4476be2 KG |
27 | Sat Jan 23 23:02:43 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
28 | ||
29 | * Makefile.in (parse.o): Depend on $(CONFIG_H) and | |
30 | $(srcdir)/../system.h. | |
31 | (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h. | |
32 | (jcf-parse.o): Depend on $(srcdir)/../toplev.h. | |
33 | (jcf-write.o): Likewise. | |
34 | (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h. | |
35 | (mangle.o): Depend on $(srcdir)/../toplev.h. | |
36 | (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h. | |
37 | (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h. | |
38 | ||
39 | * class.c: Include output.h and parse.h. | |
40 | (mangled_classname): Add the `const' keyword to a char*. | |
41 | (find_named_method): Hide unused function definition. | |
42 | (build_utf8_ref): Change type of variable `c' to unsigned char. | |
43 | Use ISALPHA/ISDIGIT instead of isalpha/isdigit. | |
44 | (build_class_ref): Add the `const' keyword to a char*. | |
45 | (layout_class_method): Remove unused variable `buf'. | |
46 | ||
47 | * decl.c (find_local_variable): Remove unused variable `rtl'. | |
48 | (pushdecl): Likewise for variables `different_binding_level' and | |
49 | `oldglobal'. | |
50 | (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED. | |
51 | (maybe_build_cleanup): Likewise for parameter `decl'. | |
52 | ||
53 | * except.c (expand_start_java_handler): Mark parameter `range' | |
54 | with ATTRIBUTE_UNUSED. | |
55 | ||
56 | * expr.c: Include except.h. | |
57 | (pop_type): Remove unused variable `i'. | |
58 | (pop_value): Likewise for variables `n_words' and `i'. | |
59 | (expand_java_arrayload): Likewise for variable `convert'. | |
60 | (java_lang_expand_expr): Likewise for variables `op0', `type', | |
61 | `mode', `unsignedp', `node' and `elements'. | |
62 | (expand_byte_code): Likewise for variables `prev_eh_ranges' and | |
63 | `eh_ranges'. | |
64 | (process_jvm_instruction): Add a `const' qualifier to a char*. | |
65 | ||
66 | * gjavah.c (output_directory): Add the `const' keyword to a char*. | |
67 | (temp_directory): Likewise. | |
68 | (print_c_decl): Likewise. | |
69 | (print_method_info): Likewise. | |
70 | (decode_signature_piece): Likewise. | |
71 | (print_mangled_classname): Likewise. | |
72 | ||
73 | * java-except.h: Provide prototypes for maybe_start_try, | |
74 | maybe_end_try and add_handler. | |
75 | ||
76 | * java-tree.h (mangled_classname): Add the `const' keyword to a char*. | |
77 | (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2. | |
78 | (pushdecl_top_level, alloc_class_constant, unicode_mangling_length, | |
79 | init_expr_processing, push_super_field, init_class_processing, | |
80 | can_widen_reference_to, class_depth, verify_jvm_instructions, | |
81 | maybe_pushlevels, maybe_poplevels, process_jvm_instruction, | |
82 | set_local_type, merge_type_state, push_type, load_type_state, | |
83 | add_interface, find_in_current_zip, append_gpp_mangled_classtype, | |
84 | emit_unicode_mangled_name): Add prototypes. | |
85 | ||
86 | * jcf-dump.c (print_constant): Add the `const' keyword to a char*. | |
87 | (print_signature_type): Use ISDIGIT, not isdigit. | |
88 | (print_signature): Remove unused variable `j'. | |
89 | ||
90 | * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to | |
91 | int when comparing against one. | |
92 | ||
93 | * jcf-parse.c: Include toplev.h. | |
94 | ||
95 | * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>. | |
96 | (localvar_free): Remove unused variable `i'. | |
97 | (generate_bytecode_conditional): Likewise for variable `kind'. | |
98 | ||
99 | * jv-scan.c: Include config.h and system.h. Remove redundant | |
100 | OS header and gansidecl.h includes. | |
101 | (warning): Add the `const' keyword to a char*. Also add | |
102 | ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not | |
103 | __STDC__, when determining whether to use ANSI-isms. | |
104 | (fatal): Likewise. Also add ATTRIBUTE_UNUSED. | |
105 | (xmalloc): Don't redundantly prototype here. | |
106 | (main): Remove unused parameter `envp'. Also fix the arguments | |
107 | passed to function `fatal' to match the format specifier. | |
108 | ||
109 | * lang.c (java_tree_code_name): Add the `const' keyword to a char*. | |
110 | ||
111 | * mangle.c: Include toplev.h. | |
112 | (emit_unicode_mangled_name): Declare parameter `len'. | |
113 | ||
114 | * parse.y (parse_warning_context): Add the `const' keyword to a | |
115 | char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check | |
116 | `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms. | |
117 | (issue_warning_error_from_context): Add the `const' keyword to | |
118 | a char*. | |
119 | (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES' | |
120 | not `__STDC__' for whether to use ANSI-isms. | |
121 | ||
122 | * typeck.c (incomplete_type_error): Mark parameters `value' and | |
123 | `type' with ATTRIBUTE_UNUSED. | |
124 | (parse_signature_type): Use ISDIGIT, not isdigit. | |
125 | ||
126 | * verify.c (check_pending_block): Add the `const' keyword to a char*. | |
127 | (verify_jvm_instructions): Likewise. Remove unused variables | |
128 | `field_name' and `default_val'. | |
129 | ||
130 | * zextract.c: Include config.h and system.h. Remove redundant | |
131 | OS header includes. | |
132 | ||
133 | * zipfile.h: Prototype `read_zip_archive'. | |
134 | ||
fff02f07 AH |
135 | Thu Jan 21 16:00:06 1999 Andrew Haley <aph@cygnus.com> |
136 | ||
137 | * typeck.c (convert): Allow conversions to void type: some | |
138 | optimizations in gcc do this. | |
139 | ||
140 | Thu Jan 21 15:21:49 1999 Andrew Haley <aph@cygnus.com> | |
141 | ||
142 | * typeck.c (convert_ieee_real_to_integer): New function. | |
143 | (convert): When not using fast-math and using hardware fp, convert | |
144 | an IEEE NaN to zero. | |
145 | ||
73333a87 AH |
146 | 1999-01-18 Andrew Haley <aph@cygnus.com> |
147 | ||
148 | * parse.y (patch_binop): Do a type conversion from signed to | |
149 | unsigned and then back to signed when a ">>>" is found. | |
150 | ||
d8fccff5 APB |
151 | Sun Jan 17 22:34:22 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> |
152 | ||
153 | * java-tree.h: (check_for_initialization): Added prototype. | |
154 | * lex.c (java_parse_doc_section): `\n' breaks the `*/' string. | |
155 | * parse.y (do_resolve_class): Removed unused locals. | |
156 | (read_import_dir): Likewise. | |
157 | (resolve_qualified_expression_name): Array creation | |
158 | expressions are valid primary expressions. | |
159 | (qualify_ambiguous_name): Likewise. | |
160 | (patch_synchronized_statement): Removed unused local. | |
161 | ||
82770562 JL |
162 | Sun Jan 17 21:55:42 1999 Jeffrey A Law (law@cygnus.com) |
163 | ||
ef2b940d JL |
164 | * Makefile.in (zextract.o): Add dependencies. |
165 | ||
82770562 JL |
166 | * Makefile.in: Do not put ^Ls at the start of a line. |
167 | ||
2a4dc31b PB |
168 | Fri Jan 15 20:16:20 1999 Per Bothner <bothner@cygnus.com> |
169 | ||
170 | * expr.c (process_jvm_instruction): Coerce to correct Throwable | |
171 | sub-type the result of the call that gets the exception value. | |
172 | ||
173 | * parse.y (java_complete_expand_methods): If flags_syntax_only, | |
174 | don't call finish_class. | |
175 | ||
176 | * parse.y (java_check_regular_methods): If METHOD_PRIVATE, | |
177 | clear found before continuing. | |
178 | ||
179 | * verify.c (verify_jvm_instructions): On an array load, allow | |
180 | and handle top of stack to be TYPE_NULL. | |
181 | ||
182 | * gjavah.c (generate_access): Translate Java package private or | |
183 | protected access to C++ public, but with a comment. | |
184 | ||
96847892 AH |
185 | 1999-01-13 Andrew Haley <aph@cygnus.com> |
186 | ||
187 | * expr.c (generate_name): Name prefix changed to avoid clashes | |
188 | with assembler temp labels. | |
189 | ||
190 | * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on | |
191 | MODIFY_EXPR. Without this, code for the assignement may not be | |
192 | generated at all and the synchronized statement will read an | |
193 | uninitialized variable. | |
194 | ||
ba179f9f APB |
195 | Wed Jan 13 01:24:54 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> |
196 | ||
197 | * class.c (maybe_layout_super_class): Fixed returned value. | |
198 | * lex.c: Added 1999 to the copyright. | |
199 | (java_init_lex): Initialize java_lang_imported. | |
200 | * lex.h: Added 1999 to the copyright. | |
201 | * parse.h: Added 1999 to the copyright. | |
202 | (REGISTER_IMPORT): Fixed typo in trailing macro. | |
203 | (CURRENT_OSB): New macro. | |
204 | (struct parser_ctxt): New fields osb_depth, osb_limit. | |
205 | * parse.y (java_lang_id): New global variable. | |
206 | (type_import_on_demand_declaration): Don't import java.lang.* twice. | |
207 | (array_creation_expression:): Use CURRENT_OSB. | |
208 | (dims:): Uses a stack to keep track of array dimensions. | |
209 | (cast_expression:): Use CURRENT_OSB. | |
210 | (find_expr_with_wfl): Return NULL if node found doesn't meet the | |
211 | conditions. | |
212 | (register_fields): Fixed typos in comment. | |
213 | (check_method_redefinition): Fixed comment indentation. | |
214 | (java_check_regular_methods): Set saved found wfl to NULL after | |
215 | having reinstalled it in the previously found DECL_NAME. | |
216 | ||
b6186fe6 RH |
217 | Sun Jan 10 13:36:14 1999 Richard Henderson <rth@cygnus.com> |
218 | ||
219 | * gjavah.c (java_float_finite): Use a union to do type punning. | |
220 | (java_double_finite): Likewise. | |
221 | ||
fe053cfc PB |
222 | Sat Jan 9 11:25:00 1999 Per Bothner <bothner@cygnus.com> |
223 | ||
224 | * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL | |
225 | on CONSTRUCTOR (since that trashes TREE_CST_RTL). | |
226 | (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF. | |
227 | (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on | |
228 | CONSTRUCTOR (which causes expand_expr to call output_constant_def). | |
229 | * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT. | |
230 | ||
b82daa87 PB |
231 | Fri Jan 8 15:48:03 1999 Per Bothner <bothner@cygnus.com> |
232 | ||
233 | * check-init.c (check_init): If compiling to native, we don't | |
234 | see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw). | |
235 | ||
5c280133 TT |
236 | 1999-01-08 Tom Tromey <tromey@cygnus.com> |
237 | ||
238 | * parse-scan.y (variable_declarator_id): Set or increment | |
239 | bracket_count. | |
240 | (bracket_count): New global. | |
241 | (formal_parameter): Handle case where bracket pairs trail variable | |
242 | declarator id. | |
243 | ||
5e1db167 AH |
244 | 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk> |
245 | ||
246 | * jcf-parse.c (yyparse): variable len changed from a char to an | |
247 | int to prevent overflow. | |
248 | ||
db84cc46 PB |
249 | Wed Jan 6 17:19:46 1999 Per Bothner <bothner@cygnus.com> |
250 | ||
251 | * java-tree.h: Declare read_class. | |
252 | * jcf-parse.c (read_class): New function. | |
253 | (load_class): Now just call read_class. | |
254 | ||
255 | * java-tree.h (java_parse_abort_on_error): Only return if new errors. | |
256 | * jcf-parse.c (parse_source_file): Declare save_error_count, | |
257 | which is needed by java_parse_abort_on_error macro, | |
258 | * parse.y (java_layout_classes, java_expand_classes): Likewise. | |
259 | ||
260 | * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT | |
261 | constructor, if initializing a static field. | |
262 | (patch_new_array_init): Set TREE_CONSTANT if it is. | |
263 | * expr.c (java_lang_expand_expr): For a static array constructor | |
264 | of primitive elements, allocate the array itself statically. | |
265 | Disabled until we can set the vtable field statically. | |
266 | ||
267 | * check-init.c: New file. Checks for definite assignment. | |
268 | * Makefile.in (JAVA_OBJS): Add check-init.o. | |
269 | * parse.y (java_complete_expand_method): Call check_for_initialization. | |
270 | * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h. | |
271 | ||
8c4ea1fd GS |
272 | Wed Jan 6 14:53:10 1999 Graham <grahams@rcp.co.uk> |
273 | ||
274 | * parse.y : include system.h instead of including | |
275 | standard headers directly with the exception of <dirent.h>. | |
276 | ||
0d34ccb7 PB |
277 | Wed Jan 6 16:20:06 1999 Per Bothner <bothner@cygnus.com> |
278 | ||
279 | * lex.h: Moved static function declarations to lex.c, | |
280 | to shut up some -Wall warnings. | |
281 | * lex.c: Static function declarations moved here. | |
282 | * jcf-dump.c: Small fixes to shut up -Wall warnings. | |
283 | ||
5b5d821c KG |
284 | Tue Jan 5 22:15:40 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
285 | ||
286 | * Make-lang.in ($(GCJ).o): Depend on prefix.h. | |
287 | ||
e402ca98 PB |
288 | Tue Dec 22 11:25:19 1998 Per Bothner <bothner@cygnus.com> |
289 | ||
290 | * expr.c (process_jvm_instruction): Do load_type_state after JSR. | |
291 | * verify.c (verify_jvm_instructions): Fix off-by-one error. | |
292 | ||
293 | * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings. | |
294 | (localvar_alloc): Change return type to void, | |
295 | (emit_unop): Remove unused variable size. | |
296 | ||
297 | * jcf-write.c (struct jcf_block): Add new union. | |
298 | (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros. | |
299 | (call_cleanups): New functions. | |
300 | (struct jcf_partial): New fields num_finalizers and return_value_decl. | |
301 | (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and | |
302 | WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR. | |
303 | * lang.c (lang_init): Call using_eh_for_cleanups. | |
304 | * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer | |
305 | completing operands to patch_synchronized_statement. | |
306 | Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR. | |
307 | (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and | |
308 | WITH_CLEANUP_EXPR instead of TRY_EXPR. | |
309 | ||
62481348 JC |
310 | Sun Dec 20 16:15:44 1998 John F. Carr <jfc@mit.edu> |
311 | ||
312 | * Make-lang.in: Comment out control-Ls; they upset some makes. | |
313 | ||
847fe791 TT |
314 | 1998-12-18 Tom Tromey <tromey@cygnus.com> |
315 | ||
316 | * parse.y (check_class_interface_creation): Use DIR_SEPARATOR | |
317 | consistently. | |
318 | ||
d5ff227d TT |
319 | 1998-12-17 Tom Tromey <tromey@cygnus.com> |
320 | ||
fa322ab5 TT |
321 | * parse.y (DIR_SEPARATOR): New define. |
322 | (check_class_interface_creation): Use it. | |
323 | ||
d5ff227d TT |
324 | * parse-scan.y (report_main_declaration): Recognize |
325 | `java.lang.String' in argument to main. | |
326 | ||
83a86272 PB |
327 | Wed Dec 16 16:18:59 1998 Per Bothner <bothner@cygnus.com> |
328 | ||
329 | * parse.y (create_interface): Remove bogus test. | |
330 | ||
f868ca8f PB |
331 | Wed Dec 16 14:42:19 1998 Per Bothner <bothner@cygnus.com> |
332 | ||
333 | * jcf-parse.c (get_constant): Set TREE_TYPE for string constants. | |
334 | (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant. | |
335 | ||
0252081c TT |
336 | 1998-12-16 Tom Tromey <tromey@cygnus.com> |
337 | ||
338 | * parse-scan.y (qualified_name): Use correct sprintf format. | |
339 | ||
06d84d69 TT |
340 | 1998-12-15 Tom Tromey <tromey@cygnus.com> |
341 | ||
342 | * gjavah.c (print_field_info): Changed how most negative number is | |
343 | printed. | |
344 | ||
659ad450 PB |
345 | Mon Dec 14 18:49:29 1998 Per Bothner <bothner@cygnus.com> |
346 | ||
347 | * parse.y (fold_constant_for_init): New function. | |
348 | (resolve_expression_name): Don't replace static final | |
349 | constant-initialized fields by its value. | |
350 | (java_complete_lhs): New. Same as java_complete_tree, except does | |
351 | not replace static final constant-initialized fields by their values. | |
352 | (register_fields): If there is an initializer, set DECL_INITIAL and | |
353 | MODIFY_EXPR_FROM_INITIALIZATION_P. | |
354 | (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs. | |
355 | Only call patch_initialized_static_field if | |
356 | MODIFY_EXPR_FROM_INITIALIZATION_P. | |
357 | (patch_initialized_static_field): If not valid constant, clear | |
358 | DECL_INITIAL. | |
359 | ||
360 | * parse.y (lookup_field_wrapper): Fix thinko. | |
361 | ||
362 | * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION, | |
363 | set and restore global lineno. | |
364 | ||
11b89622 TT |
365 | 1998-12-14 Tom Tromey <tromey@cygnus.com> |
366 | ||
367 | * gjavah.c (print_field_info): If value to print is the smallest | |
368 | value of its size, then print as hex to avoid later warnings from | |
369 | C++ compiler. | |
370 | ||
8c2dfb32 TT |
371 | 1998-12-14 Tom Tromey <tromey@cygnus.com> |
372 | ||
373 | * gjavah.c (decompile_method): Decompile `return null'. | |
374 | (process_file): Generate `#pragma interface'. | |
375 | (method_declared): New global. | |
376 | (print_method_info): Set it. | |
377 | (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set. | |
378 | (print_method_info): Handle abstract methods. | |
379 | ||
ba02c53a PB |
380 | Sun Dec 13 17:31:40 1998 Per Bothner <bothner@cygnus.com> |
381 | ||
382 | * parse.y (patch_method_invocation): If class_decl is null | |
383 | (e.g. an array type), use original type. | |
384 | ||
385 | * parse.y (check_thrown_exceptions): Temporary hack to suppress | |
386 | errors about uncaught exception from clone (of array, specifically). | |
387 | ||
cb975f38 TT |
388 | 1998-12-13 Tom Tromey <tromey@cygnus.com> |
389 | ||
390 | * gjavah.c (decompile_method): Handle all types of `return' | |
391 | opcode. Decompile `return this' and `return'. | |
392 | (method_access): New global. | |
393 | (print_method_info): Set it. | |
394 | (decompile_method): Don't decompile a synchronized method. | |
395 | ||
92c068d1 TT |
396 | 1998-12-13 Tom Tromey <tromey@cygnus.com> |
397 | ||
398 | * jcf-reader.c (jcf_parse_one_method): Recognize | |
399 | HANDLE_END_METHOD. | |
400 | * gjavah.c (HANDLE_END_METHOD): New macro. | |
401 | (HANDLE_CODE_ATTRIBUTE): New macro. | |
402 | (decompile_method): New function. | |
403 | (print_method_info): Don't print `;\n' at end of function decl. | |
404 | Include java-opcodes.h. | |
405 | (decompiled): New global. | |
406 | ||
0b245181 PB |
407 | Sat Dec 12 20:13:19 1998 Per Bothner <bothner@cygnus.com> |
408 | ||
409 | * class.c (build_class_ref): Handle PRIMTYPE.class if | |
410 | flag_emit_class_files. | |
411 | * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE | |
412 | if flag_emit_class_files. | |
413 | * parse.y (java_complete_tree): Pre-liminary support for | |
414 | COMPONENT_REF - only to handle PRIMCLASS.TYPE. | |
415 | ||
416 | * parse.y (patch_synchronized_statement): Don't call monitorexit | |
417 | unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly. | |
418 | ||
419 | * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used. | |
420 | ||
421 | * zipfile.h (opendir_in_zip): New declaration. | |
422 | * jcf-io.c (saw_java_source): Moved to jcf-parse.c. | |
423 | (opendir_in_zip): New function, using code from open_in_zip. | |
424 | (open_in_zip): Call opendir_in_zip. | |
425 | (find_class): Remove no-longer-used do_class_file parameter, | |
426 | but add source_ok parameter. Change logic so if we find a .java file, | |
427 | we don't look for .class in later classpath emtries. | |
428 | * jcf-parse.c (load_class): Pass saw_java_source to find_class. | |
429 | (jcf_figure_file_type): Only call open_in_zip if correct magic number. | |
430 | * gjavah.c: Update call to find_class. | |
431 | * jcf-dump.c: Likewise. | |
432 | ||
433 | * jcf-write.c (put_linenumber): Handle duplicate line numbers. | |
434 | (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do | |
435 | nothing if body is empty_stmt_node. | |
436 | Various little fixes so SP gets correctly adjusted. | |
437 | For NEW_ARRAY_INIT, handle IGNORE_TARGET. | |
438 | For CALL_EXPR, test if static first. | |
439 | (generate_classfile): Ignore fields that are DECL_ARTIFICIAL, | |
440 | such as the ones we create for Object and Class. | |
441 | Set and restore current_function_decl. | |
442 | * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir. | |
443 | (note_possible_classname): New function. | |
444 | (read_import_entry): Removed. Merged with read_import_dir. | |
445 | (read_import_dir): Don't call find_class - that only gives us | |
446 | the first classpath entry having the needed package. | |
447 | Use the struct buffer data structure from buffer.h. | |
448 | (read_import_dir, find_in_imports_on_demand): The remembered | |
449 | class names now use '.' (not '/') as package separator. | |
450 | ||
451 | * parse.y (java_complete_expand_methods): Call write_classfile | |
452 | here, and not in java_expand_classes (which only gets first class). | |
453 | ||
1287b91a APB |
454 | Sat Dec 12 19:46:04 1998 Alexandre Petit-Bianco <apbianco@sendai.cygnus.com> |
455 | ||
456 | * parse.y (<type_declaration>): Do maybe_generate_clinit last. | |
457 | (register_fields): If a static fields has an initializer, just | |
458 | chain it on ctxp->static_initialized, and handle later. | |
459 | (java_complete_expand_methods): Force <clinit> first. | |
460 | (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL | |
461 | - it's already been completed. | |
462 | (patch_initialized_static_field): New function. | |
463 | (java_complete_field): Call it. | |
464 | ||
05f9acdc PB |
465 | Sat Dec 12 19:21:11 1998 Per Bothner <bothner@cygnus.com> |
466 | ||
467 | * expr.c (encode_newarray_type, build_new_array): New functions. | |
468 | * java-tree.h: Declare build_new_array. | |
469 | * jcf-write.c (patch_newarray): Use build_new_array. | |
470 | ||
471 | * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT. | |
472 | * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT. | |
473 | ||
474 | * parse.y (patch_new_array_init): Re-organize. | |
475 | Now is passed the actual array (pointer) type of the value. | |
476 | Set the type of the CONSTRUCTOR to be an ARRAY_TYPE. | |
477 | (patch_array_constructor): Removed - merged into patch_new_array_init. | |
478 | (java_complete_tree): Update patch_new_array_init. | |
479 | ||
480 | * jcf-write.c (find_constant_index): New function. | |
481 | (generate_bytecode_insns): Use find_constant_index. | |
482 | (generate_classfile): Use find_constant_index for ConstantValue. | |
483 | ||
78857b4e TT |
484 | 1998-12-11 Tom Tromey <tromey@cygnus.com> |
485 | ||
486 | * expr.c (invoke_build_dtable): Renamed dtable -> vtable. | |
487 | * decl.c (init_decl_processing): Renamed dtable -> vtable. | |
488 | * class.c (make_class_data): Renamed dtable -> vtable, and | |
489 | dtable_method_count -> vtable_method_count. | |
490 | ||
4a5f66c3 APB |
491 | Thu Dec 10 20:00:54 1998 Alexandre Petit-Bianco <apbianco@sendai.cygnus.com> |
492 | ||
493 | * decl.c (long_zero_node, float_zero_node, double_zero_node): New | |
494 | global variables, initialized. | |
495 | * java-tree.h (long_zero_node, float_zero_node, double_zero_node): | |
496 | Declared new global variables. | |
497 | * lex.c (java_lex): Return long_zero_node, float_zero_node, | |
498 | double_zero_node, integer_zero_node upon direct matching. | |
499 | * parse.y (purify_type_name): Added function prototype. | |
500 | (duplicate_declaration_error_p): Consider new_type as potentially | |
501 | being a incomplete type. Use purify_type_name on type string. | |
502 | (method_header): saved_type: unused variable removed. Don't figure | |
503 | return type if method name is invalid. | |
504 | (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was | |
505 | processed by patch_unaryop. | |
506 | (patch_unaryop): Fixed typo in comment. Re-convert pre/post | |
507 | increment/decrement node into its original type after binary | |
508 | numeric promotion on its operands. | |
509 | ||
1179ebc2 APB |
510 | Thu Dec 10 11:02:49 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
511 | ||
512 | * parse.y (array_initializer:): Array init operand is NULL_TREE | |
513 | instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is | |
514 | now an error. Fixed indentation problems. | |
515 | (patch_string): Handle error_mark_node as an argument. | |
516 | (patch_new_array_init): Fixed indentation problems. | |
517 | (array_constructor_check_entry): Removed check on null wfl_value. | |
518 | Return an error if wfl_value's walk returns an error. | |
519 | ||
f8976021 APB |
520 | Wed Dec 9 15:37:05 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
521 | ||
522 | * java-tree.def (NEW_ARRAY_INIT): New Java tree code. | |
523 | * lex.c (java_lex): Remember column position before advancing one | |
524 | token. Retain location information on OCB_TK. | |
525 | * lex.h (typedef struct java_lc): Added new field. | |
526 | * parse.h (GET_SKIP_TYPE): New macro. | |
527 | (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE. | |
528 | * parse.y (build_new_array_init, patch_new_array_init, | |
529 | patch_array_constructor, maybe_build_array_element_wfl, | |
530 | array_constructor_check_entry): New function prototypes. | |
531 | (switch_block:): Tagged <node>. | |
532 | (OCB_TK): Tagged <operator>. | |
533 | (array_initializer:): Installed actions. | |
534 | (variable_initializer): Build location information on element if | |
535 | necessary. | |
536 | (switch_statement:): Fixed indentation typo. | |
537 | (switch_block:): Redefined default action. | |
538 | (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:. | |
539 | (patch_assignment): Removed duplicate code. | |
540 | (maybe_build_array_element_wfl, build_new_array_init, | |
541 | patch_new_array_init, patch_array_constructor, | |
542 | array_constructor_check_entry): New functions. | |
543 | ||
ac825856 APB |
544 | Mon Dec 7 15:13:52 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
545 | ||
546 | * parse.y (array_initializer): Tagged <node>. | |
547 | (variable_initializer:): Use default rule. | |
548 | (array_initializer:): Defined actions. | |
549 | (variable_initializers:): Likewise. | |
550 | (resolve_qualified_expression_name): Use DECL_CONTEXT to build | |
551 | non-static field accesses. | |
552 | (patch_invoke): Fixed indentation typo. | |
553 | (java_complete_tree): Likewise. | |
554 | (build_labeled_block): Changed leading comment. Generate an error | |
555 | in case of duplicate loop labels. | |
556 | (patch_conditional_expr): Patch results of string concatenation | |
557 | operations. | |
558 | ||
2dfaf550 PB |
559 | Sun Dec 6 13:45:00 1998 Per Bothner <bothner@cygnus.com> |
560 | ||
561 | * constants.c (find_methodref_index): When the class is an interface, | |
562 | generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef. | |
563 | ||
564 | * decl.c (finit_identifier_node): Use "$finit$", rather than | |
565 | "<finit>" (which Sun's verifier rejects). | |
566 | * parse.y (maybe_generate_finit): Leave out meaningless final flag. | |
567 | (generate_field_initialization_code): Removed. | |
568 | (fix_constructors) Don't add call to $finit$ here (wrong order). | |
569 | (patch_method_invocation): Add $finit$ call here. | |
570 | ||
571 | * java-tree.h (CALL_USING_SUPER): New macro. | |
572 | * parse.y (patch_invoke): Remove im local variable. | |
573 | (patch_method_invocation, patch_invoke): Don't pass super parameter. | |
574 | (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter. | |
575 | (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER. | |
576 | ||
577 | * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL. | |
578 | ||
579 | * parse.y (java_complete_tree): Don't complain about unreachable | |
580 | statement if it is empty_stmt_node. | |
581 | ||
582 | * jcf-write.c (find_constant_wide): New function. | |
583 | (push_long_const): Use find_constant_wide. | |
584 | ||
585 | * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling. | |
586 | (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR. | |
587 | Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set. | |
588 | Emit invokeinterface when calling an interface method. | |
589 | Emit invokespecial also when calling super or private methods. | |
590 | ||
591 | * jcf-write.c (generate_classfile): Emit ConstantValue attributes. | |
592 | ||
0f0d3319 PB |
593 | Sun Dec 6 13:21:18 1998 Per Bothner <bothner@cygnus.com> |
594 | ||
595 | * jcf-dump.c (INVOKE): If invokeinterface, print number of args. | |
596 | ||
1886c9d8 APB |
597 | Thu Dec 3 17:11:12 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
598 | ||
599 | * java-tree.h (java_layout_seen_class_methods): New function | |
600 | prototype. | |
601 | (LAYOUT_SEEN_CLASS_METHODS): Macro removed. | |
602 | * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods. | |
603 | * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro. | |
604 | * parse.y (method_declarator:): Defined action. | |
605 | (issue_warning_error_from_context): input_filename saved, set to | |
606 | the appropriate value and restored after java_error is called. | |
607 | (build_unresolved_array_type): Fixed comment. | |
608 | (register_fields): Use PROMOTE_RECORD_IF_COMPLETE. | |
609 | (method_header): Deal with return type the same way type are | |
610 | handled for fields and method's parameters and local variables | |
611 | types are handled. | |
612 | (check_method_redefinition): Removed extra CR. | |
613 | (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE. | |
614 | (java_layout_seen_class_methods): New function. | |
615 | (java_layout_classes): Call java_layout_seen_class_methods. | |
616 | ||
52e01aa6 PB |
617 | Thu Dec 3 15:56:50 1998 Per Bothner <bothner@cygnus.com> |
618 | ||
619 | * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY. | |
620 | ||
66af84e4 PB |
621 | Thu Dec 3 15:08:30 1998 Per Bothner <bothner@cygnus.com> |
622 | ||
623 | * jcf-dump.c (main): Fix error message. | |
624 | * jcf-path.c (add_entry): Style fix. | |
625 | ||
c3f2a476 APB |
626 | Wed Dec 2 15:52:25 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
627 | ||
628 | * class.c (layout_class_method): Call build_java_argument_signature | |
629 | on constructors too. | |
630 | * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE. | |
631 | (patch_method_invocation): Define a primary when resolving an | |
632 | expression name. Augmented comment on code checking illegal `this' | |
633 | usage. Loosened it test by accepting NEW_CLASS_EXPR. | |
634 | ||
82371d41 APB |
635 | Tue Dec 1 13:53:24 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
636 | ||
637 | * class.c (layout_class_method): Don't report error on non-static | |
638 | overriding static if the method is private. | |
639 | * java-tree.h (finish_class): Prototype added. | |
640 | * lex.c (java_get_line_col): Handle col argument -2 value. | |
641 | * parse.h: All static method declarations moved to parse.y. | |
642 | * parse.y: Now contains all static method declarations previously | |
643 | found in parse.h. | |
644 | (find_expr_with_wfl, missing_return_error, | |
645 | unreachable_stmt_error): New functions. | |
646 | (java_get_real_method_name): Identify constructors bearing class | |
647 | names in source code compiled classes only. | |
648 | (java_complete_expand_methods): Call missing_return_error. | |
649 | (invocation_mode): Private methods invoked as static methods. | |
650 | (java_complete_tree): Call unreachable_stmt_error. | |
651 | ||
de80f416 TT |
652 | 1998-12-01 Tom Tromey <tromey@cygnus.com> |
653 | ||
654 | * Makefile.in (+target): Removed. | |
655 | (+xmake_file): Likewise. | |
656 | (+tmake_file): Likewise. | |
657 | (.NOEXPORT): Removed duplicate. | |
658 | ||
45254bf6 KG |
659 | Fri Nov 27 13:20:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
660 | ||
661 | * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK). | |
662 | ||
663 | * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition. | |
664 | ||
665 | * jvgenmain.c: Remove the xmalloc prototype, we get it from | |
666 | libiberty.h. Provide an xmalloc definition. | |
667 | ||
668 | * jvspec.c: Remove the xmalloc prototype. | |
669 | ||
670 | * parse-scan.y: Include config.h and system.h. Don't include | |
671 | OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup. | |
672 | Provide an xstrdup definition. | |
673 | ||
076b41ee AO |
674 | Wed Nov 26 22:03:58 1998 Alexandre Oliva <oliva@dcc.unicamp.br> |
675 | ||
676 | * jcf-path.c (add_entry): recognize ".jar" too | |
677 | * lang-specs.h: ditto | |
678 | ||
c5941a9f PB |
679 | Thu Nov 26 12:44:07 1998 Per Bothner <bothner@cygnus.com> |
680 | ||
681 | * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle | |
682 | soft_monitorenter_node, soft_monitorexit_node, throw_node. | |
683 | ||
684 | * jcf-write.c (generate_bytecode_insns): | |
685 | Handle pre/post-increment/decrement of long. | |
686 | ||
687 | * jcf-write.c (generate_bytecode_insns): | |
688 | Handle missing exception handler (finally for synchronized). | |
689 | ||
00abfc00 PB |
690 | Wed Nov 25 09:47:15 1998 Per Bothner <bothner@cygnus.com> |
691 | ||
df8940cf PB |
692 | * java-tree.h (end_params_node): Declare global. |
693 | * decl.c (end_params_node): New global. | |
694 | (init_decl_processing, start_java_method): Use end_params_node for | |
695 | end of list of parameter types. Follows correct gcc conventions. | |
696 | * expr.c (pop_argument_types, pop_arguments): Likewise. | |
697 | * lang.c (put_decl_node): Likewise. | |
698 | * typeck.c (various places): Likewise. | |
699 | * class.y (various places): Likewise. | |
700 | * parse.y (various places): Likewise. | |
701 | ||
702 | * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY. | |
703 | (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY. | |
704 | ||
705 | * class.c: Add #include flags.h, remove no-longer needed declaration. | |
706 | ||
707 | * class.c (layout_class_method): Remove commented-out code, re-format. | |
708 | Don't add vtable entry (or index) for private methods. | |
709 | * expr.c (expand_invoke): A private method is implicitly final. | |
710 | * class.c (make_class_data): If inlining or optimizing, | |
711 | skip private methods. | |
712 | ||
713 | * class.c (finish_class): New function. Calls existing methods, | |
714 | but alls emits deferred inline functions. | |
715 | * jcf-parse.c (parse_class_file): Call finish_class. | |
716 | * parse.y (java_complete_expand_methods): Likewise. | |
717 | ||
718 | * expr.c (build_java_binop): Explicit default, to silence -Wall. | |
719 | ||
00abfc00 PB |
720 | * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings. |
721 | ||
de7b168e ME |
722 | Wed Nov 25 00:50:58 1998 Marc Espie <espie@quatramaran.ens.fr> |
723 | ||
724 | * jcf-write.c (generate_bytecode_conditional): Fix typo. | |
725 | ||
23a79c61 APB |
726 | Tue Nov 24 17:06:38 1998 Per Bothner <bothner@cygnus.com> |
727 | ||
728 | * (generate_classfile): Always write class access flag with | |
729 | ACC_SUPER set. | |
730 | ||
731 | Tue Nov 24 16:34:33 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
732 | ||
733 | * class.c (maybe_layout_super_class): New function. | |
734 | (layout_class): Reorganized. Loop on class methods dispatched into | |
735 | a new function. Call maybe_layout_super_class. | |
736 | (layout_class_methods, layout_class_method): New functions. | |
737 | * expr.c (expand_java_NEW): Call layout_class_methods on loaded | |
738 | class. | |
739 | (expand_invoke): Likewise. | |
740 | * java-tree.h (all_class_list): New global variable declared. | |
741 | (layout_class_methods, layout_class_method): New function | |
742 | prototypes. | |
743 | (LAYOUT_SEEN_CLASS_METHODS): New macro. | |
744 | * jcf-parse.c (all_class_list): New global variable. | |
745 | (load_class): Extended what class_or_name can be. Use parser | |
746 | context mechanism to save globals before calling jcf_parse. | |
747 | (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P | |
748 | is set on the file name. | |
749 | (jcf_parse): Layout class methods when Object is loaded, otherwise | |
750 | record class in all_class_list for delayed method layout. | |
751 | (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS. | |
752 | * lang.c (put_decl_node): Decode <init> into the decl context | |
753 | class name. | |
754 | * lex.c (java_allocate_new_line): Use xmalloc. | |
755 | * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete | |
756 | pointers, not TREE_LIST elements. | |
757 | (struct parser_ctxt): Fixed comment indentations, added comments | |
758 | and reordered some fields. | |
759 | (java_check_methods): Function prototype removed. | |
760 | * parse.y (java_push_parser_context): Use xmalloc. | |
761 | (java_parser_context_restore_global): Pop extra pushed ctxp only | |
762 | when there's nothing next. | |
763 | (maybe_create_class_interface_decl): Fixed comment, add new | |
764 | created class decl to all_class_list. | |
765 | (method_header): Use GET_REAL_TYPE on argument's types. | |
766 | (method_declarator): Use GET_REAL_TYPE, change type to the real | |
767 | type in TREE_LIST dependency node. Build argument list with the | |
768 | real type. | |
769 | (create_jdep_list): Use xmalloc. Removed allocation error message. | |
770 | (obtain_incomplete_type): Fixed leading comment. Broadened | |
771 | incoming argument meaning. | |
772 | (register_incomplete_type): Use xmalloc. Removed allocation error | |
773 | message. | |
774 | (safe_layout_class): Fixed leading comment. | |
775 | (jdep_resolve_class): Reversed if statement condition and switch | |
776 | if and else bodies. | |
777 | (resolve_and_layout): Fixed leading comment. Broadened incoming | |
778 | argument meaning. | |
779 | (complete_class_report_errors): New local variable name, for | |
780 | clarity. purify_type_name used for all error cases. | |
781 | (java_get_real_method_name): Stricter check on constructors. | |
782 | (java_check_regular_methods): Reverse methods list only if not | |
783 | already laid out. Layout artificial constructor. | |
784 | (java_check_methods): Deleted. | |
785 | (source_start_java_method): Obtain incomplete type for patchable | |
786 | method arguments. | |
787 | (java_layout_classes): Fixed leading comment. Use | |
788 | LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else | |
789 | statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS | |
790 | before returning. Fixed comments. | |
791 | (java_expand_classes): Check for errors up front. | |
792 | (patch_method_invocation): Class to search is resolved and laid | |
793 | out. | |
794 | ||
818347b4 PB |
795 | Tue Nov 24 12:57:13 1998 Per Bothner <bothner@cygnus.com> |
796 | ||
797 | * expr.c (java_lang_expand_expr): Add missing emit_queue. | |
798 | ||
799 | * javaop.h (int8): Removed - not used. | |
800 | (jbyte): Redefine portably with correct signedness. | |
801 | ||
802 | * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases. | |
803 | ||
804 | * jcf-write.c (generate_bytecode_insns): Fix typo | |
805 | OPCODE_getstatic to OPCODE_getfield. | |
806 | ||
807 | * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'. | |
808 | * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, | |
809 | set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them). | |
810 | ||
1c7f3673 APB |
811 | Thu Nov 19 11:16:55 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
812 | ||
813 | * jcf-parse.c (jcf_parse_source): Function returned type is | |
814 | void. Added prototype. | |
815 | (jcf_parse): Function returned type is void. | |
816 | (yyparse): Remove call to fclose on the last parsed file. | |
817 | ||
818 | * java-tree.h (jcf_parse): Changed jcf_parse prototype. | |
819 | ||
c877974e APB |
820 | Wed Nov 18 23:54:53 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
821 | ||
822 | * class.c (unmangle_classname): Set QUALIFIED_P when appropriate. | |
823 | (layout_class): Cope with methods featuring WFL in decl names. | |
824 | * decl.c (unqualified_object_id_node): New global variable, | |
825 | initialized. | |
826 | (build_decl_no_layout): Removed. | |
827 | * expr.c (build_primtype_type_ref): Handle Double. | |
828 | (java_lang_expand_expr): Fixed indentations. | |
829 | * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted. | |
830 | (flag_wall, flag_redundant, flag_not_overriding, | |
831 | flag_static_local_jdk1_1, unqualified_object_id_node): Global | |
832 | variable declarations. | |
833 | (build_decl_no_layout): Removed prototype. | |
834 | (java_get_real_method_name): Added prototype. | |
835 | (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P. | |
836 | (java_parse_abort_on_error): Macro now just returns. | |
837 | * jcf-parse.c (jcf_parse_source): Check fclose returned | |
838 | value. Call emit_register_classes if java_report_errors returns | |
839 | zero. | |
840 | * lanc.c (flag_wall, flag_redundant, flag_not_overriding, | |
841 | flag_static_local_jdk1_1): New integer flags. | |
842 | (lang_decode_option): New flags set here. | |
843 | * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros. | |
844 | (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to | |
845 | the flag_redundant variable. | |
846 | (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object | |
847 | when parsing java.lang.Object class. | |
848 | (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal | |
849 | NULL_TREE to build. | |
850 | (resolve_qualified_expression_name): Fixed indentation. | |
851 | (patch_array_ref): Changed prototype. | |
852 | (not_initialized_as_it_should_p): Prototype removed. | |
853 | (java_report_errors): Added function prototype. | |
854 | * parse.y (formal_parameter:): Changed error message for not yet | |
855 | supported final parameters. | |
856 | (class_type_list:): Set both PURPOSE and VALUE of created | |
857 | TREE_LIST to be class_type. | |
858 | (primary_no_new_array:): Handle class literals on primitive types. | |
859 | (parse_warning_context): Reinstalled correct force_error and | |
860 | do_warning flags setups. | |
861 | (java_report_errors): Changed prototype. Return java_error_count | |
862 | value. | |
863 | (variable_redefinition_error): Consider treating variable type as | |
864 | a fake pointer. | |
865 | (create_interface): Warn about redundant abstract modifier if | |
866 | flag_redundant is set. Changed error message. | |
867 | (lookup_field_wrapper): Save/restore globals before/after looking | |
868 | up field. | |
869 | (duplicate_declaration_error_p): Consider treating declaration | |
870 | type as a fake pointer. | |
871 | (register_fields): Extract real type from dependency node. Check | |
872 | for duplicate field declaration after type adjustment. Use | |
873 | DECL_INITIAL to store static final initialized values. | |
874 | (method_header): Extract real function type from dependency node. | |
875 | (check_abstract_method_header): Use GET_METHOD_NAME. | |
876 | (obtain_incomplete_type): Layout fake pointer type. | |
877 | (safe_layout_class): Don't try to check for methods before layout. | |
878 | (java_complete_class): Don't check for correct throws clause | |
879 | elements inheritance here. | |
880 | (resolve_and_layout): Broadened name parameter meaning. | |
881 | (reset_method_name): Use GET_METHOD_NAME. | |
882 | (java_get_real_method_name): New function. | |
883 | (java_check_regular_methods): Don't check methods in | |
884 | java.lang.Object. Verify lineage of throws clause elements. Use | |
885 | flag_no_overriding in warning report. | |
886 | (check_throws_clauses): Don't check if class was from | |
887 | bytecode. Use IS_UNCHECKED_EXCEPTION_P macro. | |
888 | (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag. | |
889 | (declare_local_variables): Use flag_static_local_jdk1_1 to report | |
890 | warning on unsupported final local variables. Use build_decl | |
891 | instead of build_decl_no_layout. Get real local variable type from | |
892 | dependency node. | |
893 | (source_start_java_method): Get real parameter type from | |
894 | dependency node. Call build_decl instead of build_decl_no_layout. | |
895 | (java_layout_classes): Reverse tree and layout type and class as | |
896 | required. Mark class as loaded when done. | |
897 | (resolve_field_access): Fixed indentation. Restricted condition | |
898 | leading to static field access code generation. Set field_type | |
899 | decl's TREE_TYPE if QUAL_DECL_TYPE not available. | |
900 | (resolve_qualified_expression_name): Initialize type_found to | |
901 | null. Handle static field resolved during qualification. Fixed | |
902 | layout on non primitive field decl types. | |
903 | (not_accessible_p): Fixed typo in comment. | |
904 | (patch_method_invocation): Resolve and layout class to search from | |
905 | type. | |
906 | (lookup_method_invoke): Keep integer constant 0 as is. Resolve and | |
907 | layout non primitive type, if necessary. Make method node only to | |
908 | report errors. | |
909 | (find_applicable_accessible_methods_list): Consider WFL'ed method | |
910 | decl names. Fixed indentation. | |
911 | (argument_types_convertible): Resolve and layout target type if | |
912 | necessary. | |
913 | (java_complete_tree): Fixed indentation problems. Rewrote | |
914 | CALL_EXPR thrown exceptions check. Re-installed further processing | |
915 | of the assignment in certain cases. | |
916 | (patch_assignment): Call maybe_build_primttype_type_ref to perform | |
917 | inlining on class literals. | |
918 | (valid_builtin_assignconv_identity_widening_p): Cope with constant | |
919 | 0 literal. | |
920 | (valid_method_invocation_conversion_p): Likewise. | |
921 | (patch_string): Temporary disable forbidden use of `this' in | |
922 | explicit constructor invocations when doing string concatenation | |
923 | within their scope. | |
924 | (patch_unaryop): Added comment. Reinstalled code to disable | |
925 | further check on assignment operation with cast expression RHS. | |
926 | (patch_switch_statement): Fixed indentation. | |
927 | (build_try_statement): Call build_decl instead of | |
928 | build_decl_no_layout. | |
929 | (patch_synchronized_statement): Likewise. | |
930 | (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of | |
931 | IS_UNCHECKED_EXPRESSION_P. | |
932 | (check_thrown_exceptions_do): Changed leading comment. Resolve and | |
933 | layout argument exception type. | |
934 | (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead | |
935 | of IS_UNCHECKED_EXPRESSION_P. | |
936 | ||
1c7f3673 APB |
937 | Wed Nov 18 14:21:48 1998 Anthony Green <green@cygnus.com> |
938 | ||
939 | * jcf-parse.c (yyparse): Open class file in binary mode. | |
940 | ||
411efd21 PB |
941 | Sun Nov 15 17:14:17 1998 Per Bothner <bothner@cygnus.com> |
942 | ||
943 | * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO). | |
944 | ||
945 | * jcf-write.c (perform_relocations): Move check out one loop. | |
946 | ||
8773d9d5 AG |
947 | Sun Nov 15 15:09:56 1998 Anthony Green <green@hoser.cygnus.com> |
948 | ||
949 | * Make-lang.in: Fix reference to srcdir. | |
950 | * jv-scan.c: Add missing xmalloc prototype. | |
951 | * jvgenmain.c: Ditto. | |
952 | ||
9bbc7d9f PB |
953 | Sun Nov 15 14:36:29 1998 Per Bothner <bothner@cygnus.com> |
954 | ||
955 | * decl.c (error_mark_node), java-tree.h: New global. | |
956 | * parse.y: Use empty_stmt_node instead of size_zero_node. | |
957 | (build_if_else_statement): If missing else, use empty_stmt_node. | |
958 | ||
959 | * parse.y (not_initialized_as_it_should_p): Removed, with its callers. | |
960 | (java_complete_expand_method): Complain if return is missing. | |
961 | (java_check_regular_methods): Comment out incorrect error check. | |
962 | (not_accessible_p): Fix incorrect handling of protected methods. | |
963 | (patch_method_invocation): Pass correct context to not_accessible_p. | |
964 | (find_applicable_accessible_methods_list): Likewise. | |
965 | (qualify_ambiguous_name): If ARRAY_REF, it's an expression name. | |
966 | (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set | |
967 | TREE_TYPE (to void_type_node); otherwise expand_expr crashes. | |
968 | (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY. | |
969 | ||
970 | * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking. | |
971 | (push_int_const): Remove reundant NOTE_PUSH. | |
972 | (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH. | |
973 | (- case SWITCH_EXPR): Fix code generation bug. | |
974 | (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH. | |
975 | (generate_classfile): More robust for abstract methods. | |
976 | ||
175135a6 AG |
977 | Sun Nov 15 13:52:39 1998 Anthony Green <green@cygnus.com> |
978 | ||
979 | * Makefile.in: jv-scan and jvgenmain all require libiberty. | |
980 | * Make-lang.in: Ditto. | |
981 | ||
982 | * jv-scan.c: Remove xmalloc and xstrdup definitions. | |
983 | * jvgenmain: Ditto. | |
984 | ||
0ef38928 PB |
985 | Sun Nov 15 14:10:56 1998 Per Bothner <bothner@cygnus.com> |
986 | ||
987 | * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro. | |
988 | ||
989 | * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug. | |
990 | ||
a2f44beb PB |
991 | Sat Nov 14 17:19:18 1998 Per Bothner <bothner@cygnus.com> |
992 | ||
993 | Allow uses of interface types to verify. This is not really | |
994 | type-safe, but it matches what Sun does, and is OK as long as | |
995 | there are appropriate run-time checks. | |
996 | * verify.c (merge_types): If merging two interface types, | |
997 | just set the result to java.lang.Object. | |
998 | * expr.c (pop_type): Any interface is matches by java.lang.Object. | |
999 | ||
928962ae TT |
1000 | 1998-11-13 Tom Tromey <tromey@cygnus.com> |
1001 | ||
df66b566 TT |
1002 | * gjavah.c (main): Handle --output-class-directory argument. |
1003 | * jvspec.c (lang_specific_driver): Translate `-d' into | |
1004 | -foutput-class-dir. | |
1005 | * jcf.h (jcf_write_base_directory): Declare. | |
1006 | * lang.c (lang_decode_option): Recognize -foutput-class-dir. | |
1007 | * lang-options.h: Mention -foutput-class-dir. | |
1008 | * jcf-write.c (jcf_write_base_directory): New global. | |
1009 | (make_class_file_name): Put generated .class file into `-d' | |
1010 | directory, or into source directory if -d not given. Function now | |
1011 | static. | |
1012 | (write_classfile): Free class file name. Handle case where class | |
1013 | file name is NULL. | |
1014 | (DIR_SEPARATOR): New macro. | |
1015 | Include <sys/stat.h> | |
1016 | ||
928962ae TT |
1017 | * Makefile.in (prefix): New macro. |
1018 | ||
14dd5b38 PB |
1019 | Thu Nov 12 14:15:07 1998 Per Bothner <bothner@cygnus.com> |
1020 | ||
421fb085 PB |
1021 | * parse.y (patch_invoke): Do less if flag_emit_class_files. |
1022 | * expr.c (build_known_method_ref): Don't check flag_emit_class_files | |
1023 | here (done in patch_invoke instead). | |
1024 | (case_identity): Moved here from parse.y. | |
1025 | ||
1026 | * java-tree.h (CAN_COMPLETE_NORMALLY): New macro. | |
1027 | * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY. | |
1028 | * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK | |
1029 | so they can be efficiently scanned without recursion. | |
1030 | Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR. | |
1031 | * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR | |
1032 | in BLOCK iteratively, rather than recursively. | |
1033 | ||
1034 | * parse.y (do_unary_numeric_promotion): New function. | |
1035 | (patch_unaryop, patch_binop, patch_array_ref): Use it. | |
1036 | ||
1037 | * parse.y (patch_newarray): Various fixes. | |
1038 | ||
1039 | Re-do handling of switch statements (for proper block scoping). | |
1040 | * parse.y: Add just a single block for the enture switch block, | |
1041 | but don't create any "case blocks". | |
1042 | (group_of_labels): Rmeoved unneeded non-terminal. | |
1043 | CASE_EXPR and DEFAULT_EXPR are added to current block. | |
1044 | * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here. | |
1045 | Now also need to handle CASE_EXPR and DEFAULT_EXPR. | |
1046 | * java-tree.h (SWITCH_HAS_DEFAULT): New macro. | |
1047 | * parse.y (wfl_operator, print_int_node): Make non-static. | |
1048 | (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed | |
1049 | as part of recursive scan of block. | |
1050 | (java_expand_switch ): Removed - inlined into java_lang_expand_expr. | |
1051 | (patch_switch_statement): Most tests move dinto java_complete_tree. | |
1052 | ||
1053 | * parse.y: Make various production be non-typed (void). | |
1054 | * parse.y (parse_error): Merged into issue_warning_error_from_context. | |
1055 | * parse.y (add_stmt_to_compound): Don't create/change extra node. | |
1056 | (patch_method_invocation_stmt): Renamed to patch_method_invocation. | |
1057 | ||
1058 | * jcf-write.c (struct jcf_handler): New type. | |
1059 | (struct jcf_switch_state): New type. | |
1060 | (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds. | |
1061 | (alloc_handler, emit_unop, emit_reloc): New functions. | |
1062 | (adjust_typed_op): Add extra parameter ("max type" offset). | |
1063 | (emit_switch_reloc, emit_case-reloc): New function. | |
1064 | (generate_bytecode_conditional): Handle REAL_TYPE comparisons. | |
1065 | (generate_bytecode_insns): Support REAL_CST, switch statements, | |
1066 | exception handling, method calls, object/array creation, and more. | |
1067 | ||
14dd5b38 PB |
1068 | * class.c: Remove some unused variables. |
1069 | * constants.c (find_string_constant): New function. | |
1070 | (count_constant_pool_bytes): Fix to correctly handle wide constants. | |
1071 | * decl.c (complete_start_java_method): Don't _Jv_InitClass | |
1072 | if flag_emit_class_files. | |
421fb085 | 1073 | |
dfded5c3 TT |
1074 | 1998-11-12 Tom Tromey <tromey@cygnus.com> |
1075 | ||
733b3a87 TT |
1076 | * jcf-io.c (find_class): Added explanatory comment. |
1077 | ||
1078 | * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add | |
1079 | trailing slash to `.zip' entries. | |
1080 | ||
dfded5c3 TT |
1081 | * jvspec.c (lang_specific_driver): Correctly handle case where |
1082 | GC_NAME not defined. | |
1083 | ||
aaff4ee4 TT |
1084 | 1998-11-11 Tom Tromey <tromey@cygnus.com> |
1085 | ||
1086 | * jvspec.c (GC_NAME): New define. | |
1087 | (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line | |
1088 | if required. | |
1089 | * Make-lang.in (jvspec.o): Define WITH_GC_<name>. | |
1090 | ||
b62d42fe PB |
1091 | Wed Nov 11 19:08:52 1998 Per Bothner <bothner@cygnus.com> |
1092 | ||
1093 | * jcf-dump.c (TABLE_SWITCH): Fix typos. | |
1094 | ||
233f10d3 TT |
1095 | 1998-11-11 Tom Tromey <tromey@cygnus.com> |
1096 | ||
1097 | * jcf-dump.c (main): Correctly recognize `--'-style long options. | |
1098 | ||
5e942c50 APB |
1099 | Tue Nov 10 12:34:03 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
1100 | ||
1101 | * class.c (is_compiled_class): Call safe_layout_class for class | |
1102 | compiled from source. | |
1103 | * conver.h (convert_to_integer, convert_to_real, | |
1104 | convert_to_pointer): Added prototypes. | |
1105 | * decl.c (init_decl_processing): Non longer push the decls of | |
1106 | `methodtable', `constants', `Class', `Field', `dispatchTable' | |
1107 | `jexception' and `Method'. | |
1108 | * expr.c (build_invokeinterface): New function. | |
1109 | (expand_invoke): static variable CLASS_IDENT now in | |
1110 | build_invokeinterface. Use build_invokeinterface. | |
1111 | (expand_java_field_op): Moved code to inline | |
1112 | java.lang.PRIMTYPE.TYPE into a function. | |
1113 | (build_primtype_type_ref): New function. | |
1114 | * java-tree.def (INSTANCEOF_EXPR): New tree code. | |
1115 | * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED, | |
1116 | FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros. | |
1117 | (DECL_CONSTRUCTOR_P): Fixed typo in comment. | |
1118 | (DECL_LOCAL_STATIC_VALUE): New macro. | |
1119 | (build_invokeinterface, build_primtype_type_ref): New function | |
1120 | prototypes. | |
1121 | (java_parse_abort_on_error): Macro rewritten. | |
1122 | * jcf-parse.c (current_method): Add comment to declaration. | |
1123 | (parse_zip_file_entries, process_zip_dir, void parse_source_file): | |
1124 | Function prototypes fixed. | |
1125 | (jcf_parse_source): push/pop parser context. save/restore global. | |
1126 | (parse_source_file): Fixed leading comment. Now take a | |
1127 | IDENTIFIER_NODE as an argument. Doesn't check methods, layout | |
1128 | classes and pop the parser context anymore. | |
1129 | (yyparse): Push parser context, save globals, parse the source | |
1130 | file, restore globals and pop the parser context when processing a | |
1131 | source file. | |
1132 | * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define. | |
1133 | * lex.c (java_parse_doc_section): New function. | |
1134 | (java_lex): Call java_parse_doc_section when appropriate. Build an | |
1135 | operator around INSTANCEOF_TK. | |
1136 | * lex.h (java_lineterminator, java_sprint_unicode, | |
1137 | java_unicode_2_utf8, java_lex_error, java_store_unicode): | |
1138 | Prototypes rewritten. | |
1139 | (java_parse_escape_sequence, java_letter_or_digit_p, | |
1140 | java_parse_doc_section, java_parse_end_comment, java_get_unicode, | |
1141 | java_read_unicode, java_store_unicode, java_read_char, | |
1142 | java_allocate_new_line, java_unget_unicode, java_sneak_unicode): | |
1143 | Added function prototypes. | |
1144 | * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG | |
1145 | define. | |
1146 | (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT): | |
1147 | New macros | |
1148 | (struct parser_ctxt): New fields: deprecated, | |
1149 | current_parsed_class_un, gclass_list. | |
1150 | (fix_method_argument_names, issue_warning_error_from_context, | |
1151 | resolve_package, lookup_package_type): New function prototypes. | |
1152 | (resolve_expression_name): Fixed function prototype. | |
1153 | (find_applicable_accessible_methods_list): Fixed indentation, added | |
1154 | extra argument in prototype. | |
1155 | (check_final_assignment, build_null_of_type, check_deprecation, | |
1156 | check_method_redefinition, reset_method_name, | |
1157 | java_check_regular_methods, java_check_abstract_methods, | |
1158 | maybe_build_primttype_type_ref): New function prototype. | |
1159 | * parse.y (conver.h): Include. | |
1160 | (INSTANCEOF_TK): Tagged <operator>. | |
1161 | (single_type_import_declaration): Use REGISTER_IMPORT macro. | |
1162 | (relational_expression:): Build binop for instanceof. | |
1163 | (java_push_parser_context): Remember ctxp->gclass_list across | |
1164 | contexts. | |
1165 | (java_pop_parser_context): Simply return if no context | |
1166 | exists. Remember gclass_list across contexts. | |
1167 | (issue_warning_error_from_context): New function. | |
1168 | (parse_error_context): Don't setup ctxp->elc here. Call | |
1169 | issue_warning_error_from_context instead. | |
1170 | (parse_warning_context): Likewise. | |
1171 | (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL | |
1172 | setup. Link new class/interface to ctxp->gclass_list. | |
1173 | (add_superinterfaces): Register interface as incomplete if not | |
1174 | loaded. | |
1175 | (create_class): Remember class unqualified name in | |
1176 | ctxp->current_parsed_class_un. Check class deprecation. | |
1177 | (register_fields): Check field deprecation. Remember static final | |
1178 | field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part | |
1179 | processing INIT. | |
1180 | (method_header): New local variable ORIG_ARG. Use unqualified | |
1181 | current class name for check on constructor errors. Promote return | |
1182 | type if of record type. Argument list fix moved in | |
1183 | fix_method_argument_names, called here. Check method deprecation. | |
1184 | (fix_method_argument_names): New function. | |
1185 | (method_declarator): Promote record typed arguments. | |
1186 | (safe_layout_class): Check class methods before layout. | |
1187 | (java_complete_class): Compute field layout when patched. | |
1188 | (do_resolve_class): Try to load class after having it renamed | |
1189 | after the package name. | |
1190 | (get_printable_method_name): Use DECL_CONTEXT. | |
1191 | (reset_method_name): New function. | |
1192 | (check_method_redefinition): Use reset_method_name. | |
1193 | (java_check_regular_methods): New local variable | |
1194 | SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method | |
1195 | names for error report. Check for compile-time error when method | |
1196 | found has default (package) access. | |
1197 | (java_check_abstract_methods): Now takes an interface DECL node as | |
1198 | an argument. Also reinstall real name on unchecked | |
1199 | overriding/hiding methods for error report. | |
1200 | (java_check_methods): Fixed leading comment. Get classes to verify | |
1201 | from ctxp->gclass_list. Use CHECK_METHODS macro and set | |
1202 | CLASS_METHOD_CHECKED_P on class verification. | |
1203 | (lookup_java_method2): Get real method name if necessary. | |
1204 | (find_in_imports): Don't check package class access here. | |
1205 | (resolve_package, lookup_package_type): New functions. | |
1206 | (java_layout_classes): Fixed leading comment. Take classes to be | |
1207 | laid out from ctxp->gclass_list. | |
1208 | (java_complete_expand_methods): Don't expand native and abstract | |
1209 | methods. | |
1210 | (java_expand_classes): New function. | |
1211 | (resolve_expression_name): Use additional argument ORIG. Retrieve | |
1212 | values of static final field of primitive types. | |
1213 | (resolve_field_access): Handles static final field of promotive | |
1214 | type. | |
1215 | (resolve_qualified_expression_name): Handle STRING_CST as | |
1216 | primaries and package name resolution. Check deprecation on found | |
1217 | decls. Set where_found and type_found on non static field resolved | |
1218 | during qualification. Layout non primitive field decl types. | |
1219 | (check_deprecation): New function. | |
1220 | (maybe_access_field): Simplified. | |
1221 | (patch_method_invocation_stmt): Local variable CLASS_TYPE | |
1222 | removed. Reverse method's argument when primary is a type. Don't | |
1223 | use CLASS_TYPE to report problems, use IDENTIFIER_WFL | |
1224 | instead. Include abstract class in the list of class searchable | |
1225 | for constructors. Use DECL_CONTEXT of found method for access | |
1226 | checks. Check method deprecation. | |
1227 | (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when | |
1228 | converting arguments. Handle INVOKE_INTERFACE. | |
1229 | (lookup_method_invoke): Search constructor using existing | |
1230 | infrastructure (don't rely on lookup_java_constructor anymore). | |
1231 | (find_applicable_accessible_methods_list): Extra argument flag | |
1232 | LC. Now include constructor in the search. | |
1233 | (qualify_ambiguous_name): Conditional expression are primaries. | |
1234 | (not_initialized_as_it_should_p): static final are always | |
1235 | initialized. | |
1236 | (java_complete_tree): Pass extra NULL argument to | |
1237 | resolve_expression_name. Stricter test to carry on patching | |
1238 | assignments. New case for INSTANCEOF_EXPR. | |
1239 | (complete_function_arguments): Inline PRIMTYPE.TYPE read access. | |
1240 | (check_final_assignment, maybe_build_primttype_type_ref): New | |
1241 | functions. | |
1242 | (patch_assignment): Detect resolved static finals and carry normal | |
1243 | assignment error check on them. Inline PRIMTYPE.TYPE read access. | |
1244 | (try_builtin_assignconv): Access constant 0 on all primitive | |
1245 | types. | |
1246 | (valid_builtin_assignconv_identity_widening_p): Accept identical | |
1247 | types. Accept all promoted type on int type. | |
1248 | (valid_ref_assignconv_cast_p): Accept a null pointer to be | |
1249 | assigned to a reference. | |
1250 | (valid_method_invocation_conversion_p): Accept to check null | |
1251 | pointers. | |
1252 | (build_binop): Merge declaration and initialization of local | |
1253 | variable BINOP. | |
1254 | (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all | |
1255 | numeric types. Improved validity test for qualify operators on | |
1256 | references. | |
1257 | (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR | |
1258 | and PREINCREMENT_EXPR. Also detect resolved static finals of a | |
1259 | primitive type and issue the appropriate error message. | |
1260 | (resolve_type_during_patch): Mark class loaded when resolved. | |
1261 | (patch_cast): Allow null to be cased to reference types. | |
1262 | (build_null_of_type): New function. | |
1263 | (patch_array_ref): Handle array on references correctly. | |
1264 | (patch_return): Removed unused local variable MODIFY. Force | |
1265 | boolean to be returned as integers. Allows null to be returned by | |
1266 | a function returning a reference. | |
1267 | * typeck.c (convert_to_integer, convert_to_real, | |
1268 | convert_to_pointer): Prototypes moved to convert.h | |
1269 | (lookup_argument_method): Use method real name, if necessary. | |
1270 | ||
9cfceb60 TT |
1271 | 1998-10-30 Tom Tromey <tromey@cygnus.com> |
1272 | ||
66d88624 TT |
1273 | * class.c (build_class_ref): Changed name of primitive classes to |
1274 | start with `_Jv_'. | |
1275 | ||
9cfceb60 TT |
1276 | * class.c (make_class_data): Renamed fields: nmethods to |
1277 | method_count, method_count to dtable_method_count. Always set | |
1278 | `state' field to 0. | |
1279 | * decl.c (init_decl_processing): Likewise. | |
1280 | ||
22eed1e6 APB |
1281 | Wed Oct 28 08:03:31 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
1282 | ||
1283 | * class.c (layout_class): Don't mangle <finit>, produce | |
1284 | __finit<class> instead. Don't verify artificial methods. | |
1285 | * decl.c (finit_identifier_node): New declared global. | |
1286 | (init_decl_processing): finit_identifier_node initialized. | |
1287 | * java-tree.def (CONDITIONAL_EXPR): New Java tree code. | |
1288 | * java-tree.h (finit_identifier_node): Declared as extern. | |
1289 | (struct lang_decl): New field called_constructor. | |
1290 | (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor. | |
1291 | (CLASS_HAS_FINIT_P): New macro. | |
1292 | (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks | |
1293 | explicit constructor invocation. | |
1294 | (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P, | |
1295 | CALL_SUPER_CONSTRUCTOR_P): New macros. | |
1296 | (write_classfile): Added prototype. | |
1297 | * jcf-parse.c (jcf_parse_source): Parse and remember for | |
1298 | generation if the file was seen on the command line. | |
1299 | (parse_source_file): Don't write the class file here. | |
1300 | (yyparse): Loop on files rewritten. Set current_jcf. | |
1301 | (parse_zip_file_entries): Parse class file only if it was found. | |
1302 | * lang.c (init_parse): Don't open command line provided filename | |
1303 | here. | |
1304 | (lang_parse): Don't set main_jcf anymore. | |
1305 | * parse.h (ABSTRAC_CHECK): Capitalized arguments. | |
1306 | (JCONSTRUCTOR_CHECK): New macro. | |
1307 | (JBSC_TYPE_P): New macro. | |
1308 | (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment. | |
1309 | (COMPLETE_CHECK_OP_2): New macro. | |
1310 | (struct parse_ctxt): New field explicit_constructor_p. | |
1311 | (check_class_interface_creation): Fixed prototype indentation. | |
1312 | (patch_method_invocation_stmt): Prototype reflects added argument. | |
1313 | (patch_invoke): Likewise. | |
1314 | (complete_method_declaration, build_super_invocation, | |
1315 | verify_constructor_circularity, | |
1316 | build_this_super_qualified_invocation, get_printable_method_name, | |
1317 | patch_conditional_expr, maybe_generate_finit, fix_constructors, | |
1318 | verify_constructor_super, create_artificial_method, | |
1319 | start_artificial_method_body, end_artificial_method_body, | |
1320 | generate_field_initialization_code): New function prototypes. | |
1321 | * parse.y: Fixed leading comment | |
1322 | (constructor_header:, constructor_body:, block_end:): Rules tagged | |
1323 | <node>. | |
1324 | (type_declaration:): Call maybe_generate_finit. | |
1325 | (method_declaration:): Action for method_body: placed in new | |
1326 | function complete_method_declaration, called here. | |
1327 | (constructor_declaration:): Defined actions. Removed leading | |
1328 | FIXME. | |
1329 | (constructor_header:): New rule with action. | |
1330 | (constructor_body:): Rule rewritten using block_begin: and | |
1331 | block_end:. Defined actions. | |
1332 | (constructor_declarator:, explicit_constructor_invocation:): | |
1333 | Defined actions. | |
1334 | (block:): Use new rules block_begin: block_end:. | |
1335 | (block_begin:, block_end:): New rules and actions. | |
1336 | (block_statements:): Fixed error message for explicit | |
1337 | constructors. | |
1338 | (method_invocation:): Call build_this_super_qualified_invocation | |
1339 | if primary is `this' or `super' was seen. | |
1340 | (conditional_expression:): Action defined. | |
1341 | (extra_ctxp_pushed_p): New static global flag. | |
1342 | (java_parser_context_save_global): Create parser context if | |
1343 | necessary. Use extra_ctxp_pushed_p to remember it. | |
1344 | (java_parser_context_restore_global): Pop extra parser context if | |
1345 | one exists. | |
1346 | (build_array_from_name): Array on primitive types are marked | |
1347 | loaded. | |
1348 | (register_fields): Restore new name in field initializer | |
1349 | expression if type was altered. Non static fields initialized upon | |
1350 | declaration marked initialized. | |
1351 | (maybe_generate_finit): New function. | |
1352 | (maybe_generate_clinit): Use create_artificial_method, | |
1353 | start_artificial_method_body, end_artificial_method_body. Generate | |
1354 | debug info for enclosed initialization statements. | |
1355 | (method_header): Fixed leading comment. Check constructor | |
1356 | flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P | |
1357 | accordingly. | |
1358 | (complete_method_declaration, constructor_circularity_msg, | |
1359 | verify_constructor_circularity): New functions. | |
1360 | (get_printable_method_name): New function. | |
1361 | (check_method_redefinition): Don't rename <finit> methods. Fix | |
1362 | declared constructor names. Error message for | |
1363 | constructors modified. | |
1364 | (java_check_regular_methods): Local variable seen_constructor | |
1365 | renamed saw_constructor. Skip verification on constructors. Create | |
1366 | default constructor with create_artificial_method. | |
1367 | (java_check_methods): Removed unnecessary empty line. | |
1368 | (create_artificial_method, start_artificial_method_body, | |
1369 | end_artificial_method_body): New functions. | |
1370 | (java_layout_classes): Changed leading comment. Reverse fields | |
1371 | list if necessary. Always layout java.lang.Object if being | |
1372 | defined. | |
1373 | (java_complete_expand_methods): Verify constructor circularity. | |
1374 | (java_complete_expand_method): Call fix_constructor on | |
1375 | constructors. Local variable no_ac_found removed. Restore | |
1376 | bindings if method body expansion failed. | |
1377 | (fix_constructors, verify_constructor_super, | |
1378 | generate_field_initialization_code): New function. | |
1379 | (java_expand_classes): Fixed leading comment. Write class file | |
1380 | here. | |
1381 | (resolve_expression_name): Check for illegal instance variable | |
1382 | usage within the argument scope of an explicit constructor | |
1383 | invocation. | |
1384 | (resolve_qualified_expression_name): Pass extra from_super flag | |
1385 | when invoking patch_method_invocation_stmt. New case for | |
1386 | conditional expression when used as a primary. Check for error | |
1387 | when acquiring super. | |
1388 | (patch_method_invocation_stmt): Added extra argument super. New | |
1389 | local variable is_static_flag. Set class_to_search according to | |
1390 | the nature of the constructor invocation. Don't add `this' | |
1391 | argument when expanding NEW_CLASS_EXPR. Check for illegal method | |
1392 | invocation within the argument scope of explicit constructor | |
1393 | invocation. Set is_static according to is_static_flag. Provide | |
1394 | extra `super' argument to patch_invoke invocation. | |
1395 | (patch_invoke): New argument from_super. Loop on arguments | |
1396 | indentation fixed. Pass from_super to invocation_mode. New switch | |
1397 | case INVOKE_SUPER. Fixed error message in switch default case. | |
1398 | Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node | |
1399 | value. | |
1400 | (invocation_mode): Return INVOKE_SUPER mode when appropriate. | |
1401 | (lookup_method_invoke): Fixed prototypes in candidates list. Error | |
1402 | message takes constructors into account. | |
1403 | (find_applicable_accessible_methods_list): Fixed indentation. | |
1404 | (qualify_ambiguous_name): Take explicit constructor invocation | |
1405 | into account. Deal with a conditional expression as a primary to | |
1406 | a method call. | |
1407 | (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR | |
1408 | case. Added extra argument to patch_method_invocation_stmt. | |
1409 | Register calls made to explicit constructor `this'. Don't call | |
1410 | save_expr in ARRAY_REF case when emitting class files. Check for | |
1411 | illegal use of this when expanding explicit constructor invocation | |
1412 | arguments. | |
1413 | (complete_function_arguments): Set and reset parser context | |
1414 | explicit_constructor_p field value when appropriate. | |
1415 | (build_super_invocation, build_this_super_qualified_invocation): | |
1416 | New functions. | |
1417 | (patch_assignment): Fixed typo. | |
1418 | (patch_unaryop): Check on final fields occurs only when a decl | |
1419 | exits. | |
1420 | (patch_return): Take constructors into account. | |
1421 | (patch_conditional_expr): New function. | |
1422 | * typeck.c (build_java_signature): Removed unnecessary empty line. | |
1423 | ||
e626b840 JL |
1424 | Wed Oct 28 00:46:15 1998 Jeffrey A Law (law@cygnus.com) |
1425 | ||
1426 | * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too. | |
1427 | ||
571d54d5 TT |
1428 | 1998-10-28 Tom Tromey <tromey@cygnus.com> |
1429 | ||
1430 | * decl.c (init_decl_processing): Renamed fields. | |
1431 | * class.c (make_class_data): Renamed bfsize, nfields, nsfields, | |
1432 | interface_len, msize fields. | |
1433 | ||
1434 | * class.c (make_class_data): Removed subclass_head and | |
1435 | subclass_next fields. | |
1436 | * decl.c (init_decl_processing): Removed subclass_head and | |
1437 | subclass_next fields. | |
1438 | ||
5ed948ce JL |
1439 | Wed Oct 28 00:46:15 1998 Jeffrey A Law (law@cygnus.com) |
1440 | ||
1441 | * jcf-write.c (emit_load_or_store): Avoid implicit int arguments. | |
1442 | * mangle.c (emit_unicode_mangled_name): Similarly. | |
571d54d5 | 1443 | |
0d17a080 NC |
1444 | Mon Oct 26 12:17:23 1998 Nick Clifton <nickc@cygnus.com> |
1445 | ||
1446 | * jcf-parse.c (get_constant): Place braces around code to compute | |
1447 | 'd' when REAL_ARITHMETIC is not defined. | |
1448 | ||
937293e9 L |
1449 | Sun Oct 25 14:58:05 1998 H.J. Lu (hjl@gnu.org) |
1450 | ||
1451 | * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to | |
1452 | dependency. | |
1453 | ||
45ae5597 TT |
1454 | 1998-10-23 Tom Tromey <tromey@cygnus.com> |
1455 | ||
1456 | * lang-specs.h: `.zip' files are input to jc1. | |
1457 | ||
172b2240 PB |
1458 | Thu Oct 22 23:01:54 1998 Per Bothner <bothner@cygnus.com> |
1459 | ||
1460 | * jvspecs.c: Add (but don't enable) support for combining multiple | |
1461 | .class and .java input filenames to a single jc1 invocation. | |
1462 | Add support for -C flag (copile to .class files). | |
1463 | Translate -classpath and -CLASSPATH arguments. | |
1464 | * lang-specs.h: Don't set %2 spec. | |
1465 | ||
8603f9c5 TT |
1466 | 1998-10-22 Tom Tromey <tromey@cygnus.com> |
1467 | ||
71f6a8e2 TT |
1468 | * jcf-path.c (add_entry): Don't add trailing separator if entry is |
1469 | a .zip file. | |
1470 | (add_path): Don't add trailing separator to non-empty path | |
1471 | elements. | |
1472 | ||
1473 | * lang.c (lang_decode_option): Check for -fclasspath and | |
1474 | -fCLASSPATH before examining other `-f' options. | |
1475 | ||
f7670760 TT |
1476 | * java-tree.h (finalize_identifier_node): Don't declare. |
1477 | * class.c (make_class_data): Don't push "final" field. | |
1478 | * decl.c (init_decl_processing): Don't push "final" field. | |
1479 | (finalize_identifier_node): Removed. | |
1480 | (init_decl_processing): Don't set finalize_identifier_node. | |
1481 | ||
257fafbb TT |
1482 | * config-lang.in (stagestuff): Added jcf-dump and jv-scan. |
1483 | ||
1484 | Sun Oct 11 10:31:52 1998 Anthony Green <green@cygnus.com> | |
1485 | ||
1486 | * Make-lang.in (java): Depend on jcf-dump and jv-scan. | |
1487 | (JV_SCAN_SOURCES): New macro. | |
1488 | (JCF_DUMP_SOURCES): Likewise. | |
1489 | (jcf-dump$(exeext)): New target. | |
1490 | (jv-scan$(exeext)): New target. | |
1491 | ||
1492 | 1998-10-22 Tom Tromey <tromey@cygnus.com> | |
1493 | ||
1494 | * Makefile.in (LEX): Removed. | |
1495 | (LEXFLAGS): Likewise. | |
1496 | (SET_BISON): New macro. | |
1497 | (BISON): Removed. | |
1498 | ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid | |
1499 | spurious diffs in parse.c. | |
1500 | ($(PARSE_SCAN_C)): Likewise. | |
1501 | (PARSE_DIR): New macro. | |
1502 | (PARSE_C): Use it. | |
1503 | (PARSE_SCAN_C): Likewise. | |
1504 | (PARSE_RELDIR): New macro. | |
1505 | ||
1506 | * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c. | |
1507 | ||
8603f9c5 TT |
1508 | * jcf-io.c (find_class): Use saw_java_source to determine when to |
1509 | look for `.java' file. | |
1510 | * jcf-parse.c (saw_java_source): New global. | |
1511 | (yyparse): Set it if `.java' file seen. | |
1512 | ||
1513 | * Make-lang.in (JAVA_SRCS): Added jcf-path.c. | |
1514 | (GCJH_SOURCES): Likewise. | |
1515 | * Makefile.in (datadir): New macro. | |
1516 | (libjava_zip): Likewise. | |
1517 | (JAVA_OBJS): Added jcf-path.o. | |
1518 | (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o. | |
1519 | (../gcjh$(exeext)): Likewise. | |
1520 | (jcf-path.o): New target. | |
1521 | * java-tree.h (fix_classpath): Removed decl. | |
1522 | * jcf-parse.c (fix_classpath): Removed. | |
1523 | (load_class): Don't call fix_classpath. | |
1524 | * parse.y (read_import_dir): Don't call fix_classpath. | |
1525 | * lex.h: Don't mention classpath. | |
1526 | * lex.c (java_init_lex): Don't initialize classpath. | |
1527 | * jcf-io.c (classpath): Removed global. | |
1528 | (find_class): Use jcf_path iteration functions. Correctly search | |
1529 | class path for .java file. | |
1530 | (open_in_zip): New argument `is_system'. | |
1531 | * jcf-dump.c (main): Call jcf_path_init. Recognize all new | |
1532 | classpath-related options. | |
1533 | * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH, | |
1534 | and -I. | |
1535 | (lang_init): Call jcf_path_init. | |
1536 | * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH. | |
1537 | * lang-specs.h: Handle -I. Minor cleanup to -M options. | |
1538 | Correctly put braces around second string in each entry. | |
1539 | * gjavah.c (main): Call jcf_path_init. Recognize all the new | |
1540 | classpath-related options. | |
1541 | (help): Updated for new options. | |
1542 | * jcf.h: Declare functions from jcf-path.c. Don't mention | |
1543 | `classpath' global. | |
1544 | * jcf-path.c: New file. | |
1545 | ||
1546 | * jcf-depend.c: Include jcf.h. | |
1547 | ||
1548 | * jcf-write.c (localvar_alloc): Returns `void'. | |
1549 | (localvar_free): Removed unused variable. | |
1550 | ||
1551 | * lang.c (OBJECT_SUFFIX): Define if not already defined. | |
1552 | (init_parse): Use OBJECT_SUFFIX, not ".o". | |
1553 | ||
866e9df8 APB |
1554 | Wed Oct 21 07:54:11 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
1555 | ||
1556 | * class.c (emit_register_classes): Renamed from | |
1557 | emit_register_class. | |
1558 | * java-tree.h (emit_register_classes): Prototype renamed from | |
1559 | emit_register_class. | |
1560 | * jcf-parse.c (yyparse): Call emit_register_classes once before | |
1561 | returning. | |
1562 | * parse.y (java_expand_classes): No longer register classes. | |
1563 | ||
b351b287 APB |
1564 | Tue Oct 20 09:15:38 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
1565 | ||
1566 | * class.c (is_compiled_class): New local variable | |
1567 | seen_in_zip. Identify classes found in currently compiled source | |
1568 | file(s). | |
1569 | * decl.c (complete_start_java_method): Fixed typo. | |
1570 | * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P, | |
1571 | HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros. | |
1572 | (CLASS_P): Moved around. | |
1573 | (java_parse_abort_on_error): Macro moved from jcf-parse.c | |
1574 | * jcf-parse.c (java_parse_abort_on_error): Macro moved to | |
1575 | java-parse.h | |
1576 | (jcf_parse_source): Changed leading comment. Removed unnecessary | |
1577 | fclose and CLASS_FROM_SOURCE_P marking. | |
1578 | (parse_source_file): New local variables remember_for_generation | |
1579 | and filename. Mark parsed file name identifier node. Removed block | |
1580 | executed when parse_only was null. Set remember_for_generation. | |
1581 | Use it as an argument to java_pop_parser_context. | |
1582 | (yyparse): New local variables several_files, list, next node and | |
1583 | current_file_list. Split ampersand separated file names into | |
1584 | current_file_list. Iterate through the list and parse accordingly. | |
1585 | * parse.h (java_pop_parser_context): New function prototype. | |
1586 | * parse.y (ctxp_for_generation): New static global variable. | |
1587 | (java_pop_parser_context): New argument generate. Link popped ctxp | |
1588 | to ctxp_for_generation list accordingly. | |
1589 | (java_complete_expand_methods): Fixed indentation. | |
1590 | (java_expand_classes): New function. | |
1591 | ||
f9d48c82 PB |
1592 | Sat Oct 17 11:25:21 1998 Per Bothner <bothner@cygnus.com> |
1593 | ||
1594 | * Makefile.in: Link with libiberty.a instead of memmove.o. | |
1595 | ||
c583dd46 APB |
1596 | Fri Oct 16 10:59:01 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
1597 | ||
1598 | * lex.c (setjmp.h): No longer included. | |
1599 | * lex.h (setjmp.h): Included. | |
1600 | * parse.h (SET_TYPE_FOR_RESOLUTION): New macro. | |
1601 | (duplicate_declaration_error_p): Renamed from | |
1602 | duplicate_declaration_error. | |
1603 | (build_array_from_name): New function prototype. | |
1604 | * parse.y (setjmp.h): No longer included. | |
1605 | (variable_declarator_id): Define action. | |
1606 | (build_array_from_name): New function. | |
1607 | (duplicate_declaration_error_p): Renamed from | |
1608 | duplicate_declaration_error. Fixed leading comment. | |
1609 | (register_fields): Main `for' loop reorganized. Uses | |
1610 | SET_TYPE_FOR_RESOLUTION and build_array_from_name. | |
1611 | (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call | |
1612 | build_array_from_name. | |
1613 | (resolve_class): Set CLASS_LOADED_P on newly build array dimension | |
1614 | types. | |
1615 | (read_import_dir): Don't try to skip `.' and `..'. | |
1616 | (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and | |
1617 | build_array_from_name. Main `for' loop reorganized. | |
1618 | (resolve_qualified_expression_name): When building access to a | |
1619 | field, use the type where the field was found, not its own type. | |
1620 | (maybe_access_field): Use field DECL_CONTEXT if the type where the | |
1621 | field was found is null. | |
1622 | (qualify_ambiguous_name): Sweep through all successive array | |
1623 | dimensions. | |
1624 | ||
0a2138e2 APB |
1625 | Wed Oct 14 18:21:29 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
1626 | ||
1627 | * java-tree.h (pop_labeled_block, lang_printable_name, | |
1628 | maybe_add_interface, set_super_info, get_access_flags_from_decl, | |
1629 | interface_of_p, inherits_from_p, fix_classpath, | |
1630 | complete_start_java_method, emit_handlers, init_outgoing_cpool, | |
1631 | make_class_data, register_class, alloc_name_constant): New | |
1632 | function prototypes. | |
1633 | * lang.c (lang_decode_option): Set argc argument unused. Fixed | |
1634 | indentation. Added cast to remove warning. | |
1635 | (lang_printable_name): Set v argument unused. | |
1636 | (lang_print_error): Added argument to lang_printable_name call. | |
1637 | (java_dummy_print, print_lang_decl, print_lang_type, | |
1638 | print_lang_identifier, lang_print_xnode): All argument marked | |
1639 | unused. | |
1640 | * lex.c (java_unget_unicode): Removed unnecessary argument. | |
1641 | (java_allocate_new_line): Unused local variable is gone. | |
1642 | (java_read_char): Added parenthesis in expressions to remove | |
1643 | warnings. Added final return statement. | |
1644 | (java_read_unicode): Added parenthesis in expression to remove | |
1645 | warning. | |
1646 | (java_parse_end_comment): Fixed java_unget_unicode invocation. | |
1647 | (java_parse_escape_sequence): Likewise. | |
1648 | (java_lex): Unused local variables are gone. Fixed | |
1649 | java_unget_unicode invocation. | |
1650 | * lex.h (set_float_handler): Prototype added when JC1_LITE not | |
1651 | defined. | |
1652 | * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed | |
1653 | lang_printable_name invocation in macro. | |
1654 | (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL): | |
1655 | Likewise. | |
1656 | (duplicate_declaration_error): Suppressed unused argument in | |
1657 | prototype. | |
1658 | (identical_subpath_p): Function declaration is gone. | |
1659 | (patch_invoke): Suppressed unused argument in prototype. | |
1660 | (patch_cast, build_labeled_block, check_thrown_exceptions): | |
1661 | Likewise. | |
1662 | * parse.y (setjmp.h): Included | |
1663 | (toplev.h): Likewise. | |
1664 | (field_declaration:): Suppressed unused local | |
1665 | (label_decl:): Fixed build_labeled_block invocation. | |
1666 | (java_pop_parser_context): Put extra parenthesis around assignment | |
1667 | in if. | |
1668 | (yyerror): Suppressed unused local variables. | |
1669 | (variable_redefinition_error): Fixed lang_printable_name | |
1670 | invocation. | |
1671 | (create_interface): Suppressed unused local variables. | |
1672 | (create_class): Likewise. | |
1673 | (duplicate_declaration_error): Suppressed unused argument. Fixed | |
1674 | lang_printable_name invocation. | |
1675 | (register_fields): Suppressed unused local variable. Fixed | |
1676 | duplicate_declaration_error invocation. | |
1677 | (method_header): Suppressed unused local variable. | |
1678 | (method_declarator, parser_check_super): Likewise. | |
1679 | (java_complete_class): Suppressed unused local variable. Fixed | |
1680 | fatal error message. | |
1681 | (complete_class_report_errors): Added default: in switch. | |
1682 | (java_check_regular_methods): Fixed lang_printable_name | |
1683 | invocations. | |
1684 | (check_throws_clauses): Likewise. | |
1685 | (java_check_abstract_methods): Suppressed unused local | |
1686 | variable. Fixed lang_printable_name invocation. | |
1687 | (read_import_entry): Added supplemental return statement. | |
1688 | (read_import_dir): Suppressed unused local variables. | |
1689 | (check_pkg_class_access, declare_local_variables): Likewise. | |
1690 | (source_start_java_method): Suppressed unused extern variable | |
1691 | declarations | |
1692 | (expand_start_java_method): Suppressed unused extern and local | |
1693 | variable declarations. | |
1694 | (java_complete_expand_methods): Likewise. | |
1695 | (java_complete_expand_method): Suppressed unused local variables. | |
1696 | (make_qualified_name): Likewise. | |
1697 | (resolve_qualified_expression_name): Added default: in | |
1698 | switch. Fixed lang_printable_name invocation. | |
1699 | (class_instance_creation_expression): Added parenthesis around | |
1700 | expressions. | |
1701 | (patch_method_invocation_stmt): Fixed lang_printable_name and | |
1702 | patch_invoke invocations. | |
1703 | (check_for_static_method_reference): Fixed lang_printable_name | |
1704 | invocation. | |
1705 | (patch_invoke): Suppressed unused arguments and local variables. | |
1706 | (lookup_method_invoke): Suppressed unused local variables. | |
1707 | (qualify_ambiguous_name): Added default: in switch. | |
1708 | (identical_subpath_p): Function removed. | |
1709 | (patch_assignment): Suppressed unused local variables. Suppressed | |
1710 | unnecessary if statement. Fixed lang_printable_name invocations. | |
1711 | (try_builtin_assignconv): Fixed lang_printable_name invocations. | |
1712 | (valid_ref_assignconv_cast_p): Parenthesis around | |
1713 | expression. Suppressed unused local variables. | |
1714 | (build_binop): Suppressed unused local variables. fixed | |
1715 | lang_printable_name invocations. | |
1716 | (string_constant_concatenation): Suppressed unused local | |
1717 | variables. | |
1718 | (patch_unaryop): Fixed lang_printable_name invocation. | |
1719 | (patch_cast): Suppressed unnecessary argument. Fixed | |
1720 | lang_printable_name invocation. | |
1721 | (patch_array_ref): Fixed lang_printable_name invocation. | |
1722 | (patch_newarray, patch_return, patch_if_else_statement): Likewise. | |
1723 | (build_labeled_block): Suppressed unused argument. | |
1724 | (generate_labeled_block): Fixed build_labeled_block invocation. | |
1725 | (build_loop_body): Suppressed unused local variables. | |
1726 | (patch_loop_statement): Likewise. | |
1727 | (patch_exit): Fixed lang_printable_name invocation. | |
1728 | (patch_switch_statement): Likewise. | |
1729 | (case_identity): First argument marked unused. | |
1730 | (patch_try_statement): Fixed lang_printable_name invocations. | |
1731 | (patch_synchronized_statement, patch_throw_statement): Likewise. | |
1732 | (check_thrown_exceptions): Fixed check_thrown_exceptions and | |
1733 | lang_printable_name invocations. | |
1734 | (check_thrown_exceptions_do): Suppressed unused argument. | |
1735 | ||
fc45c7ef TT |
1736 | 1998-10-14 Tom Tromey <tromey@cygnus.com> |
1737 | ||
1738 | * jcf-write.c (write_classfile): Add output class file as target. | |
1739 | * lang-options.h: Added -MD, -MMD, -M, and -MM. | |
1740 | * jcf.h: Added declarations for dependency-tracking functions. | |
1741 | * lang-specs.h: Handle -M, -MM, MD, and -MMD. | |
1742 | * lang.c (lang_decode_option): Recognize -MD and -MMD. | |
1743 | (finish_parse): Call jcf_dependency_write. | |
1744 | (dependency_tracking): New global. | |
1745 | (DEPEND_SET_FILE): New define. | |
1746 | (DEPEND_ENABLE): New define. | |
1747 | (init_parse): Enable dependency tracking if required. | |
1748 | Include "flags.h". | |
1749 | * Makefile.in (JAVA_OBJS): Added jcf-depend.o. | |
1750 | (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o. | |
1751 | (../gcjh$(exeext)): Likewise. | |
1752 | (jcf-depend.o): New target. | |
1753 | * Make-lang.in (JAVA_SRCS): Added jcf-depend.c. | |
1754 | (GCJH_SOURCES): Likewise. | |
1755 | * jcf-io.c (open_class): Call jcf_dependency_add_file. Added | |
1756 | dep_name argument. | |
1757 | (find_classfile): Added dep_name argument. | |
1758 | (find_class): Compute name of dependency. | |
1759 | (open_in_zip): Call jcf_dependency_add_file. | |
1760 | * gjavah.c (output_file): No longer global. | |
1761 | (usage): Don't mention "gjavah". | |
1762 | (help): Likewise. | |
1763 | (java_no_argument): Likewise. | |
1764 | (version): Likewise. | |
1765 | (main): Recognize and handle -M family of options. | |
1766 | (print_mangled_classname): Return is void. | |
1767 | (process_file): Handle case where output is suppressed. | |
1768 | (HANDLE_END_FIELD): Likewise. | |
1769 | (HANDLE_METHOD): Likewise. | |
1770 | * jcf-depend.c: New file. | |
1771 | ||
bcf6c7e3 JL |
1772 | Tue Oct 13 23:34:12 1998 Jeffrey A Law (law@cygnus.com) |
1773 | ||
1774 | * java-tree.def: Add missing newline at EOF. | |
1775 | ||
0a65887a TT |
1776 | 1998-10-13 Tom Tromey <tromey@cygnus.com> |
1777 | ||
1778 | * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1. | |
1779 | (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of | |
1780 | function. | |
1781 | Include <config.h> and "system.h". | |
1782 | (disassemble_method): Undefine RET to avoid clash with | |
1783 | config/i386/i386.h. | |
1784 | ||
b9f7e36c APB |
1785 | Tue Oct 13 03:50:28 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> |
1786 | ||
1787 | * decl.c (runtime_exception_type_node, error_exception_type_node): | |
1788 | New global variables. | |
1789 | (init_decl_processing): Initialized. | |
1790 | * expr.c (java_lang_expand_expr): Set caught exception type to | |
1791 | null if catch handler argument doesn't exit. | |
1792 | * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific | |
1793 | tree codes. | |
1794 | * java-tree.h (runtime_exception_type_node, | |
1795 | error_exception_type_node): Global variables declared. | |
1796 | (DECL_FUNCTION_THROWS): New macro. | |
1797 | (DECL_FUNCTION_BODY): Modified comment. | |
1798 | (DECL_SPECIFIC_COUNT): Likewise. | |
1799 | (struct lang_decl): New field throws_list. | |
1800 | (IS_UNCHECKED_EXPRESSION_P): New macro. | |
1801 | * lex.c (java_lex): Generate location information for THROW_TK. | |
1802 | * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P, | |
1803 | EXCEPTIONS_P): New macros. | |
1804 | (enum jdep_code): New value JDEP_EXCEPTION. | |
1805 | (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT, | |
1806 | BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR, | |
1807 | PATCH_METHOD_RETURN_ERROR): New macros. | |
1808 | (patch_method_invocation_stmt): Added new argument to prototype. | |
1809 | (patch_synchronized_statement, patch_throw_statement, | |
1810 | check_thrown_exceptions, check_thrown_exceptions_do, | |
1811 | purge_unchecked_exceptions, check_throws_clauses): New function | |
1812 | prototypes. | |
1813 | * parse.y Fixed typo in keyword section. | |
1814 | (throw:): Rule tagged <node>. | |
1815 | (THROW_TK): Keyword tagged <operator>. | |
1816 | (method_header:): Last argument to call to method_header passed | |
1817 | from throws: rule. | |
1818 | (throws:, class_type_list:, throw_statement:, | |
1819 | synchronized_statement:, synchronized:): Defined actions. | |
1820 | (method_header): New local variable current. Register exceptions | |
1821 | from throws clause. | |
1822 | (java_complete_tree): Complete and verify exceptions from throws | |
1823 | clause. | |
1824 | (complete_class_report_errors): Error message on exceptions not | |
1825 | found | |
1826 | (java_check_regular_methods): Fixed typo. Shortcut on private | |
1827 | overriding methods. Changed error message on method | |
1828 | redefinition. Check for throws clause compatibility. | |
1829 | (check_throws_clauses): New function. | |
1830 | (java_check_abstract_methods): Use DECL_NAME for wfl or current | |
1831 | method. Changed error message on method redefinition. | |
1832 | (currently_caught_type_list): New static variable. | |
1833 | (java_complete_expand_methods): Purge unchecked exceptions from | |
1834 | throws clause list. Call PUSH_EXCEPTIONS before walk and | |
1835 | POP_EXCEPTIONS after. | |
1836 | (resolve_qualified_expression_name): Pass new argument as NULL to | |
1837 | patch_method_invocation_stmt. | |
1838 | (patch_method_invocation_stmt): New argument ref_decl. Invoke | |
1839 | PATCH_METHOD_RETURN_ERROR when returning with error. Reverse | |
1840 | argument list when appropriate. Use new argument if non null to | |
1841 | store selected method decl. | |
1842 | (patch_invoke): Convert if necessary args of builtin types before | |
1843 | forming CALL_EXPR. Argument list no longer reversed here. | |
1844 | (invocation_mode): Treat final methods as static methods. | |
1845 | (java_complete_tree): New cases for THROW_EXPR: and | |
1846 | SYNCHRONIZED_EXPR:. Check thrown exceptions when completing | |
1847 | function call. | |
1848 | (complete_function_arguments): No more RECORD_TYPE | |
1849 | conversion. Function parameter nodes no longer saved. | |
1850 | (valid_ref_assignconv_cast_p): Avoid handling null type. | |
1851 | (patch_binop): Fixed null constant reference handling. | |
1852 | (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and | |
1853 | BUILD_THROW macros. | |
1854 | (patch_try_statement): Fixed comments. Record caught types in | |
1855 | list, push the list, expand try block and pop the list. | |
1856 | (patch_synchronized_statement, patch_throw_statement, | |
1857 | check_thrown_exceptions, check_thrown_exceptions_do, | |
1858 | purge_unchecked_exceptions): New functions. | |
1859 | * typeck.c (lookup_argument_method): Allow WFL in place of method | |
1860 | DECL_NAME during method definition check | |
1861 | ||
6d6044b0 PB |
1862 | 1998-10-09 Tom Tromey <tromey@cygnus.com> |
1863 | ||
1864 | * gjavah.c (decode_signature_piece): New function. | |
1865 | (print_c_decl): Use it. Added `name_override' argument. | |
1866 | (print_method_info): Use name_override argument to print_c_decl. | |
1867 | (seen_fields): Removed. | |
1868 | (print_field_info): Don't update seen_fields. | |
1869 | (struct method_name): New structure. | |
1870 | (method_name_list): New global. | |
1871 | (print_method_info): Add new method to list of methods. | |
1872 | (name_is_method_p): New function. | |
1873 | (print_field_info): If field name has same name as method, then | |
1874 | change field name. | |
1875 | (process_file): Parse methods before fields. | |
1876 | (field_pass): New global. | |
1877 | (HANDLE_END_FIELD): Take field_pass into account. | |
1878 | ||
13abbf47 KG |
1879 | Wed Oct 7 12:10:48 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
1880 | ||
1881 | * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf. | |
1882 | (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs). | |
1883 | ||
6d6044b0 PB |
1884 | Sat Oct 3 13:29:46 1998 Anthony Green <green@cygnus.com> |
1885 | ||
1886 | * jvspec.c: Fix bug in jvgenmain_spec patch. | |
1887 | ||
1888 | Fri Oct 2 17:22:52 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
1889 | ||
1890 | * Makefile.in (lang.o:): Install dependency on java-tree.def. | |
1891 | * decl.c (soft_exceptioninfo_call_node): New global variable. | |
1892 | (init_decl_processing): Fixed indentation. soft_badarrayindex_node | |
1893 | takes extra integer argument. soft_exceptioninfo_call_node | |
1894 | initialized. | |
1895 | * except.c (java_set_exception_lang_code): New function | |
1896 | (method_init_exceptions): Called here. | |
1897 | (prepare_eh_table_type): New function. | |
1898 | (expand_end_java_handler): Called here. | |
1899 | * expr.c (build_java_throw_out_of_bounds_exception): Now features | |
1900 | one argument. Modified generation of call to | |
1901 | soft_badarrayindex_node to use new argument. | |
1902 | (build_java_arrayaccess): Pass faulty index value to | |
1903 | build_java_throw_out_of_bounds_exception. | |
1904 | (generate_name): New function. | |
1905 | (java_lang_expand_expr): New local variables node, current, | |
1906 | has_finally_p. Expand TRY_EXPR node. | |
1907 | (process_jvm_instruction): Replace top of the stack with thrown | |
1908 | object reference when entering exception handler. | |
1909 | * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java | |
1910 | specific tree codes. | |
1911 | * java-tree.h (soft_exceptioninfo_call_node): Declaration of new | |
1912 | global. | |
1913 | (DECL_SPECIFIC_COUNT): New macro. | |
1914 | (prepare_eh_table_type, java_set_exception_lang_code, | |
1915 | generate_name): New function declarations. | |
1916 | (match_java_method): Declaration deleted. | |
1917 | (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New | |
1918 | macros. | |
1919 | * lex.c (TRY_TK, CATCH_TK): Generate location information. | |
1920 | * parse.h (redefinition_error, refine_accessible_methods_list, | |
1921 | can_cast_to_p): Function declaration removed. | |
1922 | (classitf_redefinition_error, variable_redefinition_error, | |
1923 | parse_jdk1_1_error, find_applicable_accessible_methods_list, | |
1924 | find_most_specific_methods_list, argument_types_convertible, | |
1925 | enter_a_block, valid_builtin_assignconv_identity_widening_p, | |
1926 | valid_cast_to_p, valid_method_invocation_conversion_p, | |
1927 | try_reference_assignconv, add_stmt_to_compound, | |
1928 | build_jump_to_finally, build_tree_list, patch_try_statement, | |
1929 | java_get_catch_block): New function declarations. | |
1930 | * parse.y (string_buffer_type): Global variable deleted. | |
1931 | (group_of_labels, catches, catch_clause, catch_clause_parameter, | |
1932 | finally): Rules tagged <node>. | |
1933 | (TRY_TK, CATCH_TK): Token tagged <operator>. | |
1934 | (class_body_declaration:, class_member_declaration:, | |
1935 | formal_parameter:, explicit_constructor_invocation:, | |
1936 | interface_member_declaration:, constant_declaration:, | |
1937 | primary_no_new_array:, class_instance_creation_expression:, | |
1938 | array_creation_expression:): Issue error on unsuported JDK1.1 | |
1939 | features. | |
1940 | (try_statement:, catches:, finally:): Define actions. | |
1941 | (catch_clause_parameter): New rule. | |
1942 | (catch_clause:): Use new rule catch_clause_parameter. | |
1943 | (parse_jdk1_1_error): New function. | |
1944 | (redefinition_error): Renamed classitf_redefinition_error. | |
1945 | (variable_redefinition_error): New function. | |
1946 | (check_class_interface_creation): Call | |
1947 | classitf_redefinition_error. | |
1948 | (java_complete_tree): Added error message on JDEP_TYPE: case. | |
1949 | (complete_class_report_errors): Fixed indentation. | |
1950 | (declare_local_variables): Call variable_redefinition_error. | |
1951 | (source_end_java_method): Call java_set_exception_lang_code and | |
1952 | emit_handlers where appropriate. | |
1953 | (java_method_add_stmt): Call add_stmt_to_block. | |
1954 | (add_stmt_to_block): New function. | |
1955 | (lookup_method_invoke): Fixed outside comment. new local variable | |
1956 | candicates. Call find_applicable_accessible_methods_list and | |
1957 | find_most_specific_methods_list when searching for a | |
1958 | method. Modified error report to list possible candidates when | |
1959 | applicable. | |
1960 | (find_applicable_accessible_methods_list, | |
1961 | find_most_specific_methods_list, argument_types_convertible): New | |
1962 | function. | |
1963 | (refine_accessible_methods_list): Function deleted. | |
1964 | (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save | |
1965 | expr (if applicable) before calling patch_array_ref. | |
1966 | (build_expr_block): Fixed BLOCK_EXPR_BODY assignment. | |
1967 | (enter_block): Fixed comment. | |
1968 | (enter_a_block): New function. | |
1969 | (patch_assignment): Reorganized. Call try_reference_assignconv for | |
1970 | references. Call valid_cast_to_p instead of can_cast_to_p. | |
1971 | (try_reference_assignconv, | |
1972 | valid_builtin_assignconv_identity_widening_p): New functions. | |
1973 | (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL. | |
1974 | (valid_cast_to_p, valid_method_invocation_conversion_p): New | |
1975 | functions. | |
1976 | (build_string_concatenation): Don't resolve StringBuffer. | |
1977 | (patch_cast): Fixed inverted arguments. | |
1978 | (patch_array_ref): Code to save array expr deleted. Call | |
1979 | valid_cast_to_p instead of can_cast_to_p. | |
1980 | (generate_labeled_block): Call generate_name. | |
1981 | (build_jump_to_finally, build_try_statement, java_get_catch_block, | |
1982 | patch_try_statement): New functions. | |
1983 | * typeck.c (match_java_method): Function deleted. | |
1984 | ||
1985 | Fri Oct 2 13:48:36 1998 Anthony Green <green@cygnus.com> | |
1986 | ||
1987 | * jvspec.c: jvgenmain_spec uses different temporary file names. | |
1988 | ||
1989 | Fri Oct 2 12:50:19 1998 Anthony Green <green@cygnus.com> | |
1990 | ||
1991 | * jvspec.c (lang_specific_driver): Fail if user specifies | |
1992 | --main= when not linking. | |
1993 | ||
1994 | Mon Sep 28 13:48:33 1998 Tom Tromey <tromey@cygnus.com> | |
1995 | ||
1996 | * class.c (make_class_data): Push value for `thread' field. | |
1997 | * decl.c (init_decl_processing): Added `thread' field to class. | |
1998 | ||
1999 | * class.c (add_field): Always make static fields externally | |
2000 | visible. | |
2001 | ||
2002 | Sat Sep 26 08:22:47 1998 Anthony Green <green@cygnus.com> | |
2003 | ||
2004 | * expr.c (build_java_athrow, | |
2005 | build_java_throw_out_of_bounds_exception, expand_invoke, | |
2006 | build_newarray, expand_java_multianewarray, build_java_monitor): | |
2007 | Update comments to reflect _Jv_* function names. | |
2008 | ||
2009 | Fri Sep 25 16:03:02 1998 Per Bothner <bothner@cygnus.com> | |
2010 | ||
2011 | * decl.c (complete_start_java_method): DECL_RESULT is always promoted. | |
2012 | * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro. | |
2013 | * parse.y (expand_start_java_method): Likewise. | |
2014 | ||
2015 | Thu Sep 24 12:20:35 1998 Per Bothner <bothner@cygnus.com> | |
2016 | ||
2017 | * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro. | |
2018 | ||
2019 | * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE. | |
2020 | (add_field): No longer need to convert from RECORD_TYPE to pointer, | |
2021 | * expr.c: Remove no-longer-needed calls to promote_type. | |
2022 | * decl.c (give_name_to_locals): Liekwise. | |
2023 | * jcf-parse.c (get_class_constant): Compensate for new signatures. | |
2024 | * parse.y: Add/remove promote_type calls as appropriate. | |
2025 | * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects. | |
2026 | (parse_signature_string): Likewise. | |
2027 | (build_java_array_type): Fix for now signature convenions. | |
2028 | ||
2029 | * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem. | |
2030 | ||
2031 | Wed Sep 23 14:49:35 1998 Tom Tromey <tromey@cygnus.com> | |
2032 | ||
2033 | * class.c (init_class_processing): libjava function renamed to | |
2034 | _Jv_RegisterClass. | |
2035 | ||
2036 | Tue Sep 22 12:00:02 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2037 | ||
2038 | * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR. | |
2039 | * java-tree.def: Fixed DEFTREECODE third argument. | |
2040 | (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR, | |
2041 | CASE_EXPR, DEFAULT_EXPR): New tree codes for Java. | |
2042 | * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro. | |
2043 | (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, | |
2044 | JAVA_THIS_EXPR): Now replaced by tree code definitions. | |
2045 | (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR. | |
2046 | * lang.c (java_tree_code_type, java_tree_code_length, | |
2047 | java_tree_code_name): New arrays. | |
2048 | (lang_init): Append Java tree node definitions to Gcc ones. | |
2049 | * lex.c (expression_obstack): Declared as extern when JC1_LITE | |
2050 | defined. | |
2051 | (java_init_lex): Initialize wfl_append, wfl_string_buffer, | |
2052 | wfl_to_string. | |
2053 | (java_lex): Allow declaration of empty string constants. Retain | |
2054 | location information on CASE_TK and DEFAULT_TK. | |
2055 | * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P, | |
2056 | JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P): | |
2057 | Modified to be more robust. | |
2058 | (BUILD_APPEND, BUILD_STRING_BUFFER): New macros. | |
2059 | (build_new_invocation, try_builtin_assignconv, | |
2060 | patch_switch_statement, string_constant_concatenation, | |
2061 | build_string_concatenation, patch_string_cst, patch_string, | |
2062 | java_expand_switch): New function declarations. | |
2063 | * parse.y: Rules related to switch and EH tagged <node>. | |
2064 | (label_id): Set to NULL_TREE | |
2065 | (wfl_string_buffer, wfl_append, wfl_to_string): New static global | |
2066 | tree nodes. | |
2067 | (this_or_super:): Fixed indentation. | |
2068 | (statement:, statement_nsi:, statement_without_trailing_substatement:, | |
2069 | statement_expression:): Removed call to RULE on all sub-rules. | |
2070 | (switch_expression:, switch_labels:): New rules. | |
2071 | (switch_statement:, switch_block:, switch_block_statement_groups:, | |
2072 | switch_block_statement_group:, switch_labels:, switch_label:): | |
2073 | Defined actions. | |
2074 | (throw_statement:, synchronized_statement:, try_statement:): | |
2075 | Defined temporary actions. | |
2076 | (class_instance_creation_expression:): Call | |
2077 | build_new_invocation. Fixed indentation. | |
2078 | (field_access): Fixed indentation. | |
2079 | (method_invocation): Likewise. | |
2080 | (make_qualified_primary): Use THIS_EXPR. | |
2081 | (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When | |
2082 | resolving from SUPER, set *type_found. | |
2083 | (qualify_ambiguous_name): Use NEW_CLASS_EXPR. | |
2084 | (java_complete_tree): Removed unused local variable `location'. Case | |
2085 | for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR, | |
2086 | NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling | |
2087 | on MODIFY_EXPR: and all binary operator tree code cases. Removed | |
2088 | STRING_CST: case. default: checks for patchable strings. | |
2089 | (complete_function_arguments): Transform string constant or | |
2090 | crafted StringBuffer if necessary. | |
2091 | (build_method_invocation): Fixed comments. | |
2092 | (build_new_invocation): New function. | |
2093 | (patch_assignment): Call try_builtin_assignconv to figure a valid | |
2094 | assignment conversion between builtin types. | |
2095 | (try_builtin_assignconv): New function. | |
2096 | (build_binop): Use URSHIFT_EXPR directly to call build. | |
2097 | (operator_string): Use UNARY_PLUS_EXPR. | |
2098 | (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation | |
2099 | operator. | |
2100 | (do_merge_string_cste, merge_string_cste, | |
2101 | string_constant_concatenation, build_string_concatenation, | |
2102 | patch_string, patch_string_cst): New function. | |
2103 | (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR. | |
2104 | (patch_unaryop): Likewise. New test of valid ++/-- operands. | |
2105 | (build_newarray_node): Use NEW_ARRAY_EXPR. | |
2106 | (build_this): Use THIS_EXPR. | |
2107 | (build_return): Enable debug information on return statement. | |
2108 | (build_if_else_statement): Likewise. | |
2109 | (complete_labeled_statement): Fixed related comment. | |
2110 | (build_loop_body): Fixed comment. | |
2111 | (build_bc_statement): Enable debug information on break/continue | |
2112 | statements. | |
2113 | (patch_bc_statement): Fixed typos. Handle SWITCH statement | |
2114 | context. | |
2115 | (patch_switch_statement, case_identity, java_expand_switch): New | |
2116 | functions. | |
2117 | ||
2118 | Mon Sep 21 13:21:35 1998 Per Bothner <bothner@cygnus.com> | |
2119 | ||
2120 | * buffer.h (BUFFER_INIT): New macro. | |
2121 | * jcf-write.c (struct jcf_partial): New type. Put global stuff here. | |
2122 | Pass (struct jcf_partial *state) to most functions. | |
2123 | (jcf_block, jcf_relocation): New types. | |
2124 | Support labels, branches, conditionals, loops. | |
2125 | ||
2126 | Mon Sep 21 15:08:48 1998 Tom Tromey <tromey@cygnus.com> | |
2127 | ||
2128 | * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined. | |
2129 | ||
2130 | Mon Sep 21 13:21:35 1998 Per Bothner <bothner@cygnus.com> | |
2131 | ||
2132 | * decl.c (integer_type_node): Make it have INT_TYPE_SIZE. | |
2133 | * verify.c (verify_jvm_instructions): Use int_type_not (32 bits), | |
2134 | not integer_type_node (INT_TYPE_SIZ bits). | |
2135 | ||
2136 | * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node. | |
2137 | ||
2138 | * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook. | |
2139 | * jcf-dump.c (print_exception_table): New function. | |
2140 | (disassemble_method): Better handling of wide instructions. | |
2141 | Make more robust for bad input. | |
2142 | ||
4f01de5c JL |
2143 | Wed Sep 30 20:53:51 1998 Jeffrey A Law (law@cygnus.com) |
2144 | ||
2145 | * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on | |
2146 | FreeBSD. | |
2147 | ||
da4f7dc1 JL |
2148 | Thu Sep 17 19:45:01 1998 Jeffrey A Law (law@cygnus.com) |
2149 | ||
2150 | * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too. | |
2151 | ||
4a4a4682 TT |
2152 | Thu Sep 17 16:21:52 1998 Tom Tromey <tromey@cygnus.com> |
2153 | ||
2154 | * Makefile.in ($(PARSE_H)): Removed target. | |
2155 | ||
e6a480d3 JL |
2156 | Thu Sep 17 01:57:07 1998 Jeffrey A Law (law@cygnus.com) |
2157 | ||
2158 | * Makefile.in (JAVA_OBJS): Add memmove.o | |
2159 | (memmove.o): New target & rules. | |
2160 | ||
6d6044b0 PB |
2161 | Tue Sep 15 23:21:55 1998 Tom Tromey <tromey@cygnus.com> |
2162 | ||
2163 | * expr.c (expand_invoke): Don't generate a call to the class init | |
2164 | code. | |
2165 | ||
1f43f4b4 JL |
2166 | Mon Sep 14 10:14:47 1998 Jeffrey A Law (law@cygnus.com) |
2167 | ||
2168 | * Makefile.in: Add many missing dependencies. | |
2169 | * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h | |
2170 | as appropriate. | |
2171 | * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise. | |
2172 | * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise. | |
2173 | ||
6d6044b0 PB |
2174 | Fri Sep 11 14:05:21 1998 Per Bothner <bothner@cygnus.com> |
2175 | ||
2176 | * decl.c (complete_start_java_method): If method is static (and | |
2177 | not private) call _Jv_InitClass. | |
2178 | * expr.c (expand_invoke): Don't call build_class_init. | |
2179 | ||
2180 | * jvspec.c (jvgenmain_spec): Fix spec for generated .o file. | |
2181 | ||
76f42086 JL |
2182 | Thu Sep 10 10:33:31 1998 Jeffrey A Law (law@cygnus.com) |
2183 | ||
2184 | * Make-lang.in (GCJ): Define before using. | |
2185 | ||
71d05349 JL |
2186 | Wed Sep 9 21:23:10 1998 Jeffrey A Law (law@cygnus.com) |
2187 | ||
2188 | * gjavah.c (java_no_argument): Renamed from no_argument to avoid | |
2189 | losing due to namespace pollution in GNU getopt.h | |
2190 | ||
232e6c7c TT |
2191 | Wed Sep 9 13:33:39 1998 Tom Tromey <tromey@cygnus.com> |
2192 | ||
2193 | * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh. | |
2194 | (java.all.cross): Likewise. | |
2195 | (java.rest.encap): Likewise. | |
2196 | ||
e742fecc JL |
2197 | Tue Sep 8 10:34:05 1998 Jeffrey A Law (law@cygnus.com) |
2198 | ||
2199 | * gjavah.c (print_class_decls): Fix thinko in arglist | |
2200 | * jcv-io.c (find_classfile): Similarly. | |
2201 | ||
5db17173 JL |
2202 | Mon Sep 7 13:59:49 1998 Jeffrey A Law (law@cygnus.com) |
2203 | ||
2204 | * Makefile.in (INCLUDES): Update for recent toplevel gcc changes. | |
2205 | ||
6d6044b0 PB |
2206 | Sat Sep 5 16:08:01 1998 Tom Tromey <tromey@cygnus.com> |
2207 | ||
2208 | * Make-lang.in (java.maintainer-clean): Don't remove parse.h. | |
2209 | (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h. | |
2210 | * Makefile.in (PARSE_C): New macro. | |
2211 | (PARSE_H): Likewise. | |
2212 | (PARSE_SCAN_C): Likewise. | |
2213 | ($(PARSE_C)): Target renamed from parse.c. | |
2214 | ($(PARSE_SCAN_C)): Target renamed from parse-scan.c. | |
2215 | (clean): Remove parse-scan.c as well. | |
2216 | (parse.o): Depend on $(PARSE_C). | |
2217 | ||
2218 | Sat Sep 5 08:48:40 1998 Anthony Green <green@cygnus.com> | |
2219 | ||
2220 | * README, license.terms: Removed. | |
2221 | ||
2222 | * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c, | |
2223 | decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h, | |
2224 | javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c, | |
2225 | jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c, | |
2226 | keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c, | |
2227 | lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c, | |
2228 | verify.c, zextract.c, zipfile.h: Fixed copyright assignment, | |
2229 | and Java trademark attribution. | |
2230 | ||
2231 | Fri Sep 4 10:42:05 1998 Tom Tromey <tromey@cygnus.com> | |
2232 | ||
2233 | * Makefile.in: Use gcjh, not gjavah. | |
2234 | * config-lang.in (stagestuff): Use gcjh, not gjavah. | |
2235 | * Make-lang.in: Changed gjavah to gcjh everywhere. | |
2236 | ||
2237 | Thu Sep 3 18:04:09 1998 Per Bothner <bothner@cygnus.com> | |
2238 | ||
2239 | * gjavah.c: Support new -prepend -add -append flags. | |
2240 | (print_method_info): Method is not virtual if class is final. | |
2241 | ||
2242 | Thu Sep 3 12:03:53 1998 Alexandre Petit-Bianco <apbianco@sendai.cygnus.com> | |
2243 | ||
2244 | * jv-scan.c: Fixed copyright assignment. | |
2245 | * keyword.gperf: Likewise. | |
2246 | * keyword.h: Likewise. | |
2247 | * lex.c: Fixed copyright assignment. | |
2248 | (java_lex): Push unicode back when parsing '<'. | |
2249 | * lex.h: Fixed copyright assignment. | |
2250 | * parse-scan.y: Likewise. | |
2251 | * parse.h: Fixed copyright assignment. | |
2252 | (build_debugable_stmt, complete_for_loop): New function prototypes. | |
2253 | * parse.y: Fixed copyright assignment. | |
2254 | (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be | |
2255 | size_zero_node when completing a loop with no exit condition. | |
2256 | (for_statement_nsi:): Define action. | |
2257 | (for_init:, for_update:): Return size_zero_node when empty. | |
2258 | (declare_local_variables): Call build_debugable_stmt. | |
2259 | (build_debugable_stmt): New function. | |
2260 | (build_loop_body): Build debugable statement around loop | |
2261 | condition part. | |
2262 | (complete_loop_body): Take into account the debugable statement | |
2263 | around the EXIT_EXPR. | |
2264 | (complete_loop_body): New function. | |
2265 | (patch_exit_expr): Fixed condition inversion. | |
2266 | ||
2267 | Wed Sep 2 11:53:58 1998 Tom Tromey <tromey@cygnus.com> | |
2268 | ||
2269 | * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct | |
2270 | name of thread define. | |
2271 | * jvspec.c (THREAD_NAME): New macro. | |
2272 | (GCLIB): Likewise. | |
2273 | (THREADLIB): Likewise. | |
2274 | (lang_specific_driver): Recognize attempt to link with thread | |
2275 | library or gc library. Recognize -ljava on command line so it | |
2276 | isn't linked against more than once. | |
2277 | ||
2278 | Wed Sep 2 11:28:35 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2279 | ||
2280 | * parse-scan.y (report_main_declaration): Name of the class | |
2281 | containing `main' can be a qualified name. | |
2282 | ||
2283 | Mon Aug 31 13:25:58 1998 Tom Tromey <tromey@cygnus.com> | |
2284 | ||
2285 | * config-lang.in: Changed gjavac to gjc everywhere. | |
2286 | * Make-lang.in: Changed gjavac to gjc everywhere. | |
2287 | ||
2288 | Thu Aug 27 02:28:27 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2289 | ||
2290 | * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable. | |
2291 | (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS | |
2292 | and install the files. | |
2293 | * Makefile.in (JAVA_OBJS_LITE): New variable. | |
2294 | (compiler:): Now include jv-scan as a dependency. | |
2295 | (../jv-scan$(exeext), parse-scan.c): New targets. | |
2296 | (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before. | |
2297 | * config-lang.in (compilers): Removed gcj, gjavah from the list. | |
2298 | * jcf-parse.c (parse_source_file): Call java_layout_classes and | |
2299 | check for errors even if parse_only. | |
2300 | * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is | |
2301 | defined. | |
2302 | (yylex): New function. Uses java_lex body. | |
2303 | (java_lex): Removed commented out statement. Remove local variable | |
2304 | literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where | |
2305 | appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE, | |
2306 | DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF, | |
2307 | SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST | |
2308 | if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use | |
2309 | SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER | |
2310 | where appropriate. | |
2311 | (java_lex_error): Empty if JC1_LITE is defined. | |
2312 | (java_get_line_col): Return 0 if JC1_LITE is defined. | |
2313 | * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, | |
2314 | SET_MODIFIER_CTX): Moved into the section containing the macros | |
2315 | conditionally defined by JC1_LITE. | |
2316 | (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN | |
2317 | argument if JC1_LITE is defined. | |
2318 | (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF, | |
2319 | REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE | |
2320 | is defined. | |
2321 | (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF, | |
2322 | FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION, | |
2323 | SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set | |
2324 | to different values according to JC1_LITE. | |
2325 | * parse.h (int_fits_type_p, stabilize_reference): Prototype not | |
2326 | declared if JC1_LITE set. | |
2327 | (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not | |
2328 | defined if JC1_LITE not set. | |
2329 | (struct parser_ctx): Reorganized and skip the jc1 front end part | |
2330 | if JC1_LITE set. | |
2331 | (java_layout_classes): New function definition. | |
2332 | (java_push_parser_context, java_init_lex, yyparse, yylex, | |
2333 | yyerror): Prototype always declared. All other static function | |
2334 | prototypes declared only if JC1_LITE is not set. | |
2335 | * parse.y (yyparse, yylex, yyerror): No longer declared here. Now | |
2336 | declared in parse.h. | |
2337 | (java_layout_classes): New function. | |
2338 | (java_complete_expand_methods): No longer layout the class here. | |
2339 | * parse-scan.y: New file. | |
2340 | * jv-scan.c: New file. | |
2341 | ||
2342 | Tue Aug 25 10:17:54 1998 Tom Tromey <tromey@cygnus.com> | |
2343 | ||
2344 | * gjavah.c (main): Handle -friend option. | |
2345 | (friend_specs): New global. | |
2346 | (generate_access): Handle friend_specs. | |
2347 | (process_file): Likewise. | |
2348 | (MAX_FRIENDS): New macro. | |
2349 | (friend_count): New global. | |
2350 | (print_cxx_classname): Added `prefix' argument. Ignore arrays. | |
2351 | Changed all callers. | |
2352 | ||
2353 | Mon Aug 24 20:19:27 1998 Per Bothner <bothner@cygnus.com> | |
2354 | ||
2355 | * jcf-dump.c (process_class): Move JCF_FINISH use to main, | |
2356 | (main): Handle processing all the entries of a named .zip archive. | |
2357 | * jcf-io.c (jcf_trim_old_input): New function. | |
2358 | * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros. | |
2359 | ||
2360 | Mon Aug 24 07:35:13 1998 Per Bothner <bothner@cygnus.com> | |
2361 | ||
2362 | * lang.c (flag_assume_compiled): Make default be on. | |
2363 | ||
2364 | Fri Aug 21 17:29:04 1998 Per Bothner <bothner@cygnus.com> | |
2365 | ||
2366 | * jcf-dump.c: Add bunches of flags to control output more. | |
2367 | (process_class): New function; support printing more than one class. | |
2368 | (main): Support new --print-main and --javap flags. | |
2369 | * jcf-reader.c (IGNORE_ATTRIBUTE): New hook. | |
2370 | * jcf.h (CPOOL_INDEX_IN_RANGE): New macro. | |
2371 | ||
2372 | Thu Aug 20 14:24:47 1998 Per Bothner <bothner@cygnus.com> | |
2373 | ||
2374 | Change mangling of dispatch table to match C++ vtable (w/thunks). | |
2375 | * class.c (build_dtable_decl), java-tree.h: New function. | |
2376 | (make_class_data): Call it. | |
2377 | * decl.c (init_decl_processing): Likewise. | |
2378 | ||
2379 | Wed Aug 19 17:57:07 1998 Warren Levy <warrenl@cygnus.com> | |
2380 | ||
2381 | * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not | |
2382 | soft_anewarray; adjust args passed. | |
2383 | * expr.c (build_anewarray): Adjust args for soft_anewarray_node to | |
2384 | match _Jv_NewObjectArray. | |
2385 | ||
2386 | Wed Aug 19 09:33:23 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2387 | ||
2388 | * decl.c (push_labeled_block, pop_labeled_block): New functions. | |
2389 | * expr.c (loopup_label): Call create_label_decl. | |
2390 | (create_label_decl): New function. | |
2391 | (java_lang_expand_expr): Call expand_start_bindings with argument | |
2392 | set to zero. | |
2393 | * java-tree.h Added space after PROTO in function declarations | |
2394 | when necessary. | |
2395 | (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros. | |
2396 | (create_label_decl, push_labeled_block): New function | |
2397 | declarations. | |
2398 | * lex.c (label_id): Initialize. | |
2399 | (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final | |
2400 | switch. | |
2401 | * parse.h Added space after PROTO in function declarations when | |
2402 | necessary. | |
2403 | (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK, | |
2404 | LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY, | |
2405 | LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P, | |
2406 | PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New | |
2407 | macros. | |
2408 | (struct parser_ctxt): New fields current_loop, | |
2409 | current_labeled_block. | |
2410 | (build_if_else_statement, patch_if_else_statement, | |
2411 | add_stmt_to_compound, patch_exit_expr, build_labeled_block, | |
2412 | generate_labeled_block, complete_labeled_statement, | |
2413 | build_bc_statement, patch_bc_statement, patch_loop_statement, | |
2414 | build_new_loop, build_loop_body, complete_loop_body): New function | |
2415 | declarations. | |
2416 | * parse.y (java_warning_count): New global variable. | |
2417 | (label_id): New static variable. | |
2418 | (BREAK_TK, CONTINUE_TK): Token tagged <operator>. | |
2419 | (block:): Return size_zero_node when block is empty. | |
2420 | (empty_statement:): Return size_zero_node. | |
2421 | (statement:): Implement supplemental action when for_statement: is | |
2422 | reduced. | |
2423 | (label_decl:): New rule. | |
2424 | (labeled_statement:): Rewritten using label_decl. Actions | |
2425 | implemented. | |
2426 | (labeled_statement_nsi:): Likewise. | |
2427 | (if_then_statement): Actions implemented. | |
2428 | (while_expression): New rule. | |
2429 | (while_statement:): Rewritten using while_expression. Actions | |
2430 | implemented. | |
2431 | (while_statement_nsi:): Likewise. | |
2432 | (do_statement_begin:): New rule. | |
2433 | (do_statement:): Rewritten using do_statement_begin. Actions | |
2434 | implemented. | |
2435 | (for_statement:): Rewritten using for_begin. Actions implemented. | |
2436 | (for_statement_nsi:): Likewise. | |
2437 | (for_header:, for_begin:): New rules. | |
2438 | (for_init:): Actions implemented. | |
2439 | (statement_expression_list:, break_statement:, | |
2440 | continue_statement:): Likewise. | |
2441 | (yyerror): Count number of issued warning(s). | |
2442 | (java_report_errors): Report error(s) and/or warning(s). | |
2443 | (java_complete_class): Use build_java_argument_signature to | |
2444 | recompute completed method signature. | |
2445 | (java_check_regular_methods): New locals method_wfl and aflags. | |
2446 | Use method_wfl instead of lookup_cl during error reports. Fixed | |
2447 | indentation and modified some error messages. Use | |
2448 | lang_printable_name in method instead of the DECL_NAME. New code | |
2449 | to issue warnings on methods not overriding corresponding methods | |
2450 | private to a different package. | |
2451 | (java_method_add_stmt): Call add_stmt_to_compound. | |
2452 | (add_stmt_to_compound): New function. | |
2453 | (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, | |
2454 | LOOP_EXPR, EXIT_EXPR and COND_EXPR. | |
2455 | (build_if_else_statement, patch_if_else_statement, | |
2456 | build_labeled_block, generate_labeled_block, | |
2457 | complete_labeled_statement, build_new_loop, build_loop_body, | |
2458 | complete_loop_body, patch_loop_statement, build_bc_statement, | |
2459 | patch_bc_statement, patch_exit_expr): New functions. | |
2460 | * typeck.c (build_java_signature): Build argument signature before | |
2461 | enclosing it in between parenthesis. | |
2462 | ||
2463 | Mon Aug 17 17:44:24 1998 Warren Levy <warrenl@cygnus.com> | |
2464 | ||
2465 | * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in | |
2466 | (JAVA_OBJS): Added reminder comment | |
2467 | ||
2468 | Thu Aug 13 10:01:45 1998 Nick Clifton <nickc@cygnus.com> | |
2469 | ||
2470 | * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to | |
2471 | be interpreted as a long long. | |
2472 | ||
2473 | Thu Aug 13 14:34:07 1998 Warren Levy <warrenl@cygnus.com> | |
2474 | ||
2475 | * decl.c (init_decl_processing): Use _Jv_InitClass, not | |
2476 | soft_initialise_class. Use _Jv_NewMultiArray, not | |
2477 | soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not | |
2478 | soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use | |
2479 | _Jv_CheckArrayStore, not soft_checkarraystore. Use | |
2480 | _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod. | |
2481 | ||
2482 | Wed Aug 12 14:23:13 1998 Per Bothner <bothner@cygnus.com> | |
2483 | ||
2484 | * decl.c, java-tree.h (this_identifier_node, super_identifier_node, | |
2485 | length_identifier_node): New global tree node constants. | |
2486 | * parse.y (kw_super, kw_this, kw_length): Removed globals. | |
2487 | Replace uses by super_identifier_node etc. | |
2488 | * lex.c (kw_super, kw_this, kw_length): Don't initialize. | |
2489 | ||
2490 | * parse.y (resolve_field_access): Don't special-case ".length" if | |
2491 | flag_emit_class_files. | |
2492 | (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files. | |
2493 | * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode | |
2494 | and ARRAY.length. | |
2495 | ||
2496 | Tue Aug 11 11:31:55 1998 Per Bothner <bothner@cygnus.com> | |
2497 | ||
2498 | * decl.c (init_decl_processing): Remove unused method_type_node fields. | |
2499 | * class.c (make_method_value): Remove init for removed fields. | |
2500 | ||
2501 | * class.c (layout_class): Use build_java_argument_signature. | |
2502 | * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro. | |
2503 | ||
2504 | * typeck.c (push_java_argument_signature): Removed. Merged into ... | |
2505 | (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache. | |
2506 | (build_java_signature): Don't use push_java_argument_signature. | |
2507 | ||
2508 | * typeck.c (lookup_argument_method): New function. | |
2509 | * parse.y (java_check_regular_methods): Use lookup_argument_method | |
2510 | instead of lookup_java_method2 followed by lookup_java_method. | |
2511 | ||
2512 | * parse.y (check_method_redefinition): Minor optimization. | |
2513 | ||
2514 | * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR, | |
2515 | MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR. | |
2516 | ||
2517 | Mon Aug 10 09:57:15 1998 Tom Tromey <tromey@cygnus.com> | |
2518 | ||
2519 | * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or | |
2520 | c-pragma.o. | |
2521 | ||
2522 | * gjavah.c (java_float_finite): Use K&R-style definition. | |
2523 | (java_double_finite): Likewise. | |
2524 | (generate_access): Now returns void. Changed all callers. | |
2525 | (last_access_generated): Removed. | |
2526 | (process_file): Only make a single pass over the .class file. | |
2527 | ||
2528 | Wed Jul 29 17:50:23 1998 Per Bothner <bothner@cygnus.com> | |
2529 | ||
2530 | * class.c (get_dispatch_table): Add extra dummy vtable entry, | |
2531 | for compatibility for G++ (with -fvtable-thunks). | |
2532 | * expr.c (build_invokevirtual): Add one for extra dummy vtable entry. | |
2533 | ||
2534 | * gjavah.c (process_file): Use public inheritance for super-class. | |
2535 | ||
2536 | Wed Jul 29 13:19:03 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2537 | ||
2538 | * lex.c (java_init_lex): Initialize ctxp->package. | |
2539 | * parse.h (struct parser_ctxt): package and package_len replaced | |
2540 | by tree package, an identifier node. Field method_decl_list is | |
2541 | gone. Fixed comments. | |
2542 | (lookup_field_wrapper, merge_qualified_name, not_accessible, | |
2543 | class_in_current_package): New function prototypes. | |
2544 | * parse.y (array_type:): Set class loaded flag on primitive type | |
2545 | arrays. | |
2546 | (package_declaration:): Assign ctxp->package to the | |
2547 | identifier node. | |
2548 | (method_invocation:): Handle invocation of method qualified by | |
2549 | `super'. | |
2550 | (single_type_import_declaration:): Removed ambiguity check. | |
2551 | (java_pop_parser_context): New local variable `next'. Reset and | |
2552 | set IMPORT_CLASSFILE_NAME flags on current and previous import | |
2553 | list. | |
2554 | (java_accstring_lookup): Use new local macro COPY_RETURN. | |
2555 | (lookup_field_wrapper): New function. | |
2556 | (parser_qualified_classname): Use merge_qualified_name. | |
2557 | (parser_check_super_interface): Broaden error message. | |
2558 | (do_resolve_class): Check for qualified class name in the current | |
2559 | compilation unit if appropriate. | |
2560 | (process_imports): Check for already defined classes. | |
2561 | (check_pkg_class_access): Got rid of call to | |
2562 | get_access_flags_from_decl. | |
2563 | (java_complete_expand_methods): Call safe_layout_class based on | |
2564 | the current class size. | |
2565 | (make_qualified_primary): Build a WFL qualification on primary if | |
2566 | none exists. | |
2567 | (merge_qualified_name): New function. | |
2568 | (make_qualified_name): Use merge_qualified_name. | |
2569 | (resolve_expression_name): Use safe_lookup_field. | |
2570 | (resolve_field_access): Got rid of call to get_access_flags_from_decl. | |
2571 | (resolve_qualified_expression_name): Likewise. Check on resolved | |
2572 | element accessibility. | |
2573 | (not_accessible_p, class_in_current_package): New functions. | |
2574 | (maybe_access_field): Got rid of call to get_access_flags_from_decl. | |
2575 | (patch_method_invocation_stmt): Merged common pieces. Check | |
2576 | accessibility of invoked method. | |
2577 | (check_for_static_method_reference): Add returned type in error | |
2578 | message. | |
2579 | (invocation_mode): Get rid of bogus check on PRIVATE methods. | |
2580 | (refine_accessible_methods_list): Merged two conditions in test. | |
2581 | (java_complete_class): Sanity check on stabilize_ref gone. | |
2582 | * zextract.c (read_zip_archive): Cast lseek second argument to long. | |
2583 | ||
2584 | Tue Jul 28 21:39:22 1998 Per Bothner <bothner@cygnus.com> | |
2585 | ||
2586 | * class.c (hashUtf8String): Fix - use new JavaSoft specification. | |
2587 | ||
2588 | Fri Jul 24 10:43:25 1998 Tom Tromey <tromey@cygnus.com> | |
2589 | ||
2590 | * gjavah.c (F_NAN): Removed. | |
2591 | (F_NAN_MASK): New macro. | |
2592 | (F_POSITIVE_INFINITY): Removed. | |
2593 | (F_NEGATIVE_INFINITY): Likewise. | |
2594 | (java_float_finite): Rewrote. | |
2595 | (D_NAN_MASK): Renamed. | |
2596 | (java_double_finite): Rewrote. | |
2597 | (D_POSITIVE_INFINITY): Removed. | |
2598 | (D_NEGATIVE_INFINITY): Likewise. | |
2599 | ||
2600 | * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float] | |
2601 | If verbose, print underlying representation of value in hex. | |
2602 | ||
2603 | Fri Jul 24 14:14:32 1998 Per Bothner <bothner@cygnus.com> | |
2604 | ||
2605 | * buffer.h, buffer.c: New files. | |
2606 | * Makefile.in (JAVA_OBJS): Add buffer.o. | |
2607 | ||
2608 | Support locals variables and writing their debug entries to .class. | |
2609 | * jcf-write.c: Simplify some by user new buffer type. | |
2610 | (vode_buffer_grow): Removed. | |
2611 | (struct localvar_info): New type. | |
2612 | (localsvars, localvartable): New buffers. | |
2613 | (localvar_alloc, localvar_free): New functions. | |
2614 | (generate_bytecode_insns): Handle local variables. | |
2615 | (generate_classfile): Write LocalVariableTable attribute. | |
2616 | ||
2617 | Fri Jul 24 13:46:59 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2618 | ||
2619 | * jcf-io.c (open_in_zip): Check the zipfile magic number. | |
2620 | * zipfile.h (ZIPMAGIC): New macro. | |
2621 | ||
2622 | Fri Jul 24 10:43:25 1998 Tom Tromey <tromey@cygnus.com> | |
2623 | ||
2624 | * Makefile.in (gjavah.o): Updated dependencies. | |
2625 | (jcf-dump.o): Likewise. | |
2626 | (all.indirect): Use ../gjavah. | |
2627 | (../gjavah$(exeext)): Likewise. | |
2628 | (clean): Don't remove gjavah. | |
2629 | (clean): Remove parse.c, not java/parse.c. | |
2630 | * Make-lang.in (java): Added gjavah. | |
2631 | (gjavah$(exeext)): New target. | |
2632 | (GJAVAH_SOURCES): New macro. | |
2633 | (java.all.build): Added gjavah. | |
2634 | (java.all.cross): Likewise. | |
2635 | (java.rest.encap): Likewise. | |
2636 | * config-lang.in (compilers, stagestuff): Added gjavah. | |
2637 | ||
2638 | Thu Jul 23 18:33:56 1998 Tom Tromey <tromey@cygnus.com> | |
2639 | ||
2640 | * gjavah.c (java_float_finite): New function. | |
2641 | (java_double_finite): Likewise. | |
2642 | (F_POSITIVE_INFINITY): New macro. | |
2643 | (F_NEGATIVE_INFINITY): Likewise. | |
2644 | (F_NAN): Likewise. | |
2645 | (D_POSITIVE_INFINITY): Likewise. | |
2646 | (D_NEGATIVE_INFINITY): Likewise. | |
2647 | (D_NAN): Likewise. | |
2648 | (print_field_info): Use java_float_finite and java_double_finite. | |
2649 | ||
2650 | Thu Jul 23 15:28:24 1998 Per Bothner <bothner@cygnus.com> | |
2651 | ||
2652 | * parse.y (method_header): Name "this" implicit argument. | |
2653 | ||
2654 | Wed Jul 22 15:47:30 1998 Per Bothner <bothner@cygnus.com> | |
2655 | ||
2656 | * jcf-write.c: Write out LineNumberTable attribute in .class file. | |
2657 | (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics. | |
2658 | (put_linenumber): New function. | |
2659 | (generate_bytecode_insns, generate_classfile): Write line numbers. | |
2660 | ||
2661 | Wed Jul 22 14:39:00 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2662 | ||
2663 | * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P. | |
2664 | (lookup_name, build_known_method_ref, build_class_init, | |
2665 | build_invokevirtual, invoke_build_dtable, match_java_method, | |
2666 | build_field_ref, pushdecl_force_head, build_java_binop, | |
2667 | binary_numeric_promotion, build_decl_no_layout, | |
2668 | build_java_arrayaccess, build_newarray, build_anewarray, | |
2669 | build_java_array_length_access, build_java_arraynull_check): New | |
2670 | extern function prototypes. | |
2671 | (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, | |
2672 | JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in | |
2673 | java-tree.h. | |
2674 | * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref | |
2675 | to NULL | |
2676 | * jcf.h (jcf_out_of_synch): New extern function prototype. | |
2677 | * parse.h: Static/global function implemented in parse.y | |
2678 | prototyped and declarations moved at the end of the file. | |
2679 | (DECL_P): Check that the argument isn't null. | |
2680 | (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, | |
2681 | JAVA_THIS_EXPR): No longer defined here. See java-tree.h | |
2682 | (QUAL_DECL_TYPE): New macro. | |
2683 | (PARAMS): Macro definition removed. | |
2684 | * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS. | |
2685 | (return_statement:): Call build_return. | |
2686 | (field_access:): Call make_qualified_primary in sub rule. | |
2687 | (method_invocation:): Build method invocation and call | |
2688 | make_qualified_primary when processing primaries. | |
2689 | (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling | |
2690 | get_type_from_signature. | |
2691 | (java_check_regular_method): Extra integer 0 argument when calling | |
2692 | lookup_java_method2. | |
2693 | (lookup_java_interface_method2): Extra method DECL argument when | |
2694 | calling lookup_java_interface_method2. | |
2695 | (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created | |
2696 | COMPOUND_EXPR node. | |
2697 | (java_complete_expand_method): Layout current class iff not | |
2698 | already done. Don't process interface's methods. | |
2699 | (java_complete_expand_method): Use super class only if it | |
2700 | exists. Use current class otherwise. | |
2701 | (make_qualified_primary): New function. | |
2702 | (resolve_expression_name): Process qualified expression or | |
2703 | expression from primary the same way. | |
2704 | (resolve_expression_name): Two last arguments to | |
2705 | resolve_field_access are now NULL_TREEs. | |
2706 | (resolve_field_access): New variable is_static. Local field must | |
2707 | be DECLs. is_static computed on field DECLs only. Append code in | |
2708 | where_found to the field access if necessary. Use QUAL_DECL_TYPE | |
2709 | to initialize field_type. | |
2710 | (resolve_qualified_expression_name): New local variable, | |
2711 | previous_call_static and is_static. Handle primaries with function | |
2712 | calls, casts, array references and `this'. `super' now handled as | |
2713 | `(super_class)this'. Use is_static to clarify boolean expressions. | |
2714 | Added code to handle case where a proper handle is required to | |
2715 | access a field. Use QUAL_DECL_TYPE where applicable. | |
2716 | (maybe_access_field): New function. | |
2717 | (patch_method_invocation_stmt): New arguments primary, where, | |
2718 | is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P | |
2719 | deleted. Use `where' as a type to search from if specified. Check | |
2720 | for static method reference where forbidden. Append primary or | |
2721 | current_this to the argument list if not calling constructor nor | |
2722 | static methods. | |
2723 | (check_for_static_method_reference): New function. | |
2724 | (patch_invoke): Layout the class on which new is done if | |
2725 | necessary. | |
2726 | (lookup_method_invoke): Changed format to report errors on | |
2727 | methods. | |
2728 | (qualify_ambiguous_name): New local variable this_found. Now | |
2729 | handle things from primaries. Method call are considered | |
2730 | expression names. | |
2731 | (identical_subpath_p): NULL_TREE arguments to breakdown_qualified | |
2732 | changed into NULLs. | |
2733 | (not_initialized_as_it_should_p): Comply with the new DECL_P. | |
2734 | (java_complete_tree): New case fo RETURN_EXPR. Process function | |
2735 | call arguments in separate function. | |
2736 | (complete_function_arguments): New function. | |
2737 | (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P | |
2738 | anymore. | |
2739 | (patch_assignment): Take the return function slot into account as | |
2740 | a RHS. Distinguish assignment from a return. | |
2741 | (valid_ref_assignconv_cast_p): Use build_java_argument_signature | |
2742 | when checking methods in interfaces. | |
2743 | (resolve_type_during_patch): NULL argument to unresolve_type_p | |
2744 | instead of NULL_TREE. | |
2745 | (patch_newarray): Fixed typo in comment. | |
2746 | (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL. | |
2747 | (build_return, patch_return): New functions. | |
2748 | * typeck.c (lookup_java_constructor): Fixed typo in comment. | |
2749 | ||
2750 | Tue Jul 21 12:10:04 1998 Per Bothner <bothner@cygnus.com> | |
2751 | ||
2752 | * constants.c (find_name_and_type_constant, find_fieldref_index, | |
2753 | find_methodref_index): New methods. | |
2754 | * expr.c (build_invoke_non_interface): If flag_emit_class_files, | |
2755 | just return given method. Also, rename to build_known_method_ref. | |
2756 | (expand_invoke): Rename call to build_invoke_non_interface. | |
2757 | * java-tree.h, parse.h: Update prototype. | |
2758 | * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions | |
2759 | (such as expand_expr_stmt) if flag_emit_class_files. | |
2760 | * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP, | |
2761 | STACK_TARGET, IGNORE_TARGET): New macros. | |
2762 | (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals. | |
2763 | (generate_bytecode_insn): New function to generate method's bytecode. | |
2764 | (generate_classfile): Node generate Code attribute for a method. | |
2765 | (code_buffer_grow, push_constant1, push_constant2, push_int_const, | |
2766 | push_long_const, field_op, adjust_typed_op, maybe_wide): | |
2767 | New functions used by generate_bytecode_insn. | |
2768 | ||
2769 | * typeck.c (signature_include_return): Remove variable. | |
2770 | (push_java_argument_signature, build_java_argument_signature): New. | |
2771 | (build_java_signature): Use push_java_argument_signature. | |
2772 | * parse.y: Use build_java_argument_signature instead of fiddling | |
2773 | with signature_include_return. | |
2774 | ||
2775 | Fri Jul 17 09:48:51 1998 Tom Tromey <tromey@cygnus.com> | |
2776 | ||
2777 | * gjavah.c (print_c_decl): Always generate JArray<>* for array | |
2778 | types. | |
2779 | ||
2780 | * Makefile.in (all.indirect): Added gjavah$(exeext). | |
2781 | (gjavah$(exeext)): Added $(exeext). | |
2782 | (clean): Likewise. | |
2783 | ||
2784 | Thu Jul 16 15:29:20 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2785 | ||
2786 | * class.c (layout_class): Call to java_layout_parsed_class replace | |
2787 | by safe_layout_class. | |
2788 | * expr.c (build_java_array_length_access): Removed static storage | |
2789 | class in the function definition. | |
2790 | (build_java_arraynull_check): Likewise. | |
2791 | Also fixed typos in two comments. | |
2792 | * lex.c (java_init_lex): Initialize static global kw_length. | |
2793 | (java_lex): Use BUILD_OPERATOR on RETURN_TK. | |
2794 | * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to | |
2795 | java_lex_error. | |
2796 | (JAVA_INTEGRAL_RANGE_ERROR): Likewise. | |
2797 | * parse.h (resolve_no_layout): New static function declaration. | |
2798 | (get_identifier_in_static): Declaration removed. | |
2799 | (java_layout_parsed_class): Function name declaration changed to | |
2800 | safe_layout_class. | |
2801 | (build_newarray_node, patch_newarray, resolve_type_during_patch, | |
2802 | not_initialized_as_it_should_p, build_this): New static function | |
2803 | declarations. | |
2804 | (pushdecl_force_head, build_java_binop, int_fits_type_p, | |
2805 | binary_numeric_promotion, stabilize_reference, | |
2806 | build_decl_no_layout, build_java_arrayaccess): Extern function | |
2807 | declarations moved into their own section. | |
2808 | (build_newarray, build_anewarray, build_java_array_length_access, | |
2809 | build_java_arraynull_check): New extern function declarations. | |
2810 | (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR. | |
2811 | (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New | |
2812 | fake tree codes. | |
2813 | (CALL_CONSTRUCTOR_P): New macro. | |
2814 | * parse.y (kw_length): New static global tree node. | |
2815 | (return_statement): Tagged <node>. | |
2816 | (RETURN_TK): Tagged <operator>. | |
2817 | (variable_declarator_id:): Build variable declaration with an | |
2818 | empty initialization value if a syntax error was found in the | |
2819 | initialization part of the variable declaration. | |
2820 | (statement_without_trailing_substatement:): return_statement: now | |
2821 | uses the default rule. | |
2822 | (return_statement:): Temporarily fixed to return NULL_TREE. | |
2823 | (primary_no_new_array:): Call build_this when THIS_TK was parsed. | |
2824 | (class_instance_creation_expression:): Class creation rules now | |
2825 | call build_method_invocation upon reduction. | |
2826 | (array_creation_expression:): Rules call build_newarray_node upon | |
2827 | reduction. | |
2828 | (dim_exprs:): Build a list of dimension expressions. | |
2829 | (dim_expr:): Store location of the OSB_TK in the dimension | |
2830 | expression node. | |
2831 | (method_invocation:): Added a new error rule. | |
2832 | (build_unresolved_array_type): WFL argument may also be an array | |
2833 | on a primitive type. Name of the argument changed to reflect this. | |
2834 | (method_declarator): Insert argument type at the beginning of the | |
2835 | argument type list and later reverse the list. | |
2836 | (unresolved_type_p): Argument 'returned' may be optionally | |
2837 | NULL_TREE. | |
2838 | (java_layout_class_from_source): Function renamed | |
2839 | safe_layout_class. | |
2840 | (resolve_and_layout): Now call resolve_no_layout and | |
2841 | safe_layout_class. | |
2842 | (resolve_no_layout): New function. | |
2843 | (purify_type_name): New function. | |
2844 | (complete_class_report_errors): Call purify_type_name during error | |
2845 | report on a type not found. | |
2846 | (process_imports): error_found local variable doesn't need to be | |
2847 | initialized to zero. | |
2848 | (declare_local_variables): New local type_wfl. Fixed typo in error | |
2849 | message. type_wfl assigned to unresolved type and used to register | |
2850 | incomplete type. Build a WFL around the variable initialization | |
2851 | statement so that debug info can be generated on it. | |
2852 | (source_start_java_method): Reverse argument list after they've | |
2853 | been processed. | |
2854 | (current_this): New static global variable. | |
2855 | (java_complete_expand_methods): Set current_this when appropriate. | |
2856 | (resolve_expression_name): Build correct static and non static | |
2857 | field access bearing a simple name. | |
2858 | (resolve_field_access): Resolve the length field of arrays. Handle | |
2859 | f.m() cases. | |
2860 | (patch_method_invocation_stmt): Set the type of the method | |
2861 | invocation to error_mark_node. This value is later overridden by a | |
2862 | valid type, if any. Don't handle qualified constructor invocation | |
2863 | as qualified method invocation. Call lookup_method_invoke with its | |
2864 | new flag. It's no longer necessary to access the selected method | |
2865 | as the value of a tree list. Handle constructor invocation. | |
2866 | (patch_invoke): Reverse argument list when invoking non interface | |
2867 | methods. Insert call to new as the first argument of the | |
2868 | constructor. | |
2869 | (invocation_mode): Return a INVOKE_STATIC is the invoked method is | |
2870 | defined within a final class. Return INVOKE_STATIC if the invoked | |
2871 | method is a constructor. | |
2872 | (lookup_method_invoke): New lc argument is a flag to indicate a | |
2873 | constructor lookup. Now handle constructor lookup. Choose the most | |
2874 | specific method in case several were matching the invocation | |
2875 | requirements. Return a method decl instead of a tree list featuring | |
2876 | one single method decl element. | |
2877 | (refine_accessible_methods_list): New lc flag argument to | |
2878 | indicate that a constructor is being looked up. | |
2879 | (not_initialized_as_it_should_p): New function. | |
2880 | (java_complete_tree): Now process fake tree codes | |
2881 | JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call | |
2882 | save_expr on resolved function call arguments. Case on | |
2883 | UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR. | |
2884 | (patch_assignment): LHS can be a field access expression. When | |
2885 | dealing with reference, lhs_type is the promoted type of the | |
2886 | rhs_type, not the RHS. Use not_initialized_as_it_should_p where | |
2887 | applicable. | |
2888 | (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR. | |
2889 | (patch_binop): Use not_initialized_as_it_should_p where | |
2890 | applicable. | |
2891 | (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR. | |
2892 | (patch_unaryop): Likewise. And use not_initialized_as_it_should_p | |
2893 | where applicable. | |
2894 | (resolve_type_during_patch): New function. | |
2895 | (patch_cast): Call resolve_type_during_patch to resolve type and | |
2896 | report error accordingly. | |
2897 | (patch_array_ref): Use not_initialized_as_it_should_p where | |
2898 | applicable. Array base expression is saved before being | |
2899 | used. Promote the type of an array elements if it contains non | |
2900 | builtin types. | |
2901 | (build_newarray_node, patch_newarray, build_this): New functions. | |
2902 | ||
2903 | Thu Jul 16 10:46:47 1998 Tom Tromey <tromey@cygnus.com> | |
2904 | ||
2905 | * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't | |
2906 | increment it in `for' statement. | |
2907 | (print_field_info): If number is inf or nan, don't print it. | |
2908 | (print_method_info): If method name is `delete', just ignore it. | |
2909 | (print_c_decl): Special-case jstringArray. | |
2910 | ||
2911 | * gjavah.c (help): New function. | |
2912 | (no_argument): New function. | |
2913 | (usage): Changed text. | |
2914 | (main): Rewrote argument handling. Now handles -v, --help, | |
2915 | --version. | |
2916 | (version): New function. | |
2917 | (found_error): New global. | |
2918 | (main): Return found_error. | |
2919 | (generate_access): Set found_error. | |
2920 | (print_c_decl): Likewise. | |
2921 | ||
2922 | Wed Jul 15 10:36:27 1998 Tom Tromey <tromey@cygnus.com> | |
2923 | ||
2924 | * gjavah.c (print_c_decl): Don't print "," when examining field. | |
2925 | Skip type name when looking at "[L" types. | |
2926 | (process_file): Now static. | |
2927 | (generate_access): Now returns int. | |
2928 | (last_access_generated): New global. | |
2929 | (process_file): Clear last_access_generated; make multiple passes | |
2930 | over the class. | |
2931 | (print_field_info): Just return if generate_access returns true. | |
2932 | (print_method_info): Likewise. Also, allow <init> functions to | |
2933 | pass through. | |
2934 | (print_c_decl): Added is_init argument. Print constructors | |
2935 | properly. | |
2936 | (print_cxx_classname): Use UTF8_GET to extract characters from | |
2937 | string. | |
2938 | (print_base_classname): New function. | |
2939 | (print_class_decls): New function. | |
2940 | (process_file): Use it. | |
2941 | (utf8_cmp): New function. | |
2942 | ||
2943 | Mon Jul 13 14:21:47 1998 Nick Clifton <nickc@cygnus.com> | |
2944 | ||
2945 | * lang-options.h: Format changed to match changes in gcc/toplev.c | |
2946 | to implement a --help option. | |
2947 | ||
2948 | 1998-07-10 Brendan Kehoe <brendan@cygnus.com> | |
2949 | ||
2950 | * decl.c (init_decl_processing): Revert change to dtable_type. | |
2951 | ||
2952 | Thu Jul 9 18:22:12 1998 Per Bothner <bothner@cygnus.com> | |
2953 | ||
2954 | * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4. | |
2955 | ||
2956 | 1998-07-08 Brendan Kehoe <brendan@cygnus.com> | |
2957 | ||
2958 | * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type. | |
2959 | ||
2960 | * lang.c (lang_init): Default flag_exceptions to 1, without | |
2961 | checking to see if it's 2 first. | |
2962 | ||
2963 | Wed Jul 8 03:01:32 1998 Jeffrey A Law (law@cygnus.com) | |
2964 | ||
2965 | * constants.c: Include "system.h". | |
2966 | * decl.c: Likewise. | |
2967 | * lang.c (flag_new_exceptions): Get via extern now. | |
2968 | (lang_init_options): New functions. Turn on flag_new_exceptions. | |
2969 | ||
2970 | Tue Jul 7 12:56:48 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
2971 | ||
2972 | * lex.c (java_lex): Return 0 when we see an invalid character in | |
2973 | the input. | |
2974 | ||
2975 | * lex.c (java_read_char): Specify extra argument when calling | |
2976 | java_lex_error. | |
2977 | (java_read_unicode, java_parse_end_comment, | |
2978 | java_parse_escape_sequence): Likewise, | |
2979 | (java_lex): Specify extra argument when calling | |
2980 | java_lex_error. Test that IDs are beginning with a legal character | |
2981 | for IDs. Handle invalid characters with an error message and a | |
2982 | call to java_lex_error. | |
2983 | (java_lex_error): Adjust column position by new argument | |
2984 | `forward'. Issue an error even if in the middle of reporting an | |
2985 | other error. | |
2986 | ||
2987 | 1998-07-07 Brendan Kehoe <brendan@cygnus.com> | |
2988 | ||
2989 | * jcf-io.c (find_class): Zero out BUFFER before we use it, since | |
2990 | we don't explicitly put a null pointer when we're copying it. | |
2991 | ||
2992 | Tue Jul 7 09:38:38 1998 Tom Tromey <tromey@cygnus.com> | |
2993 | ||
2994 | * gjavah.c (print_cxx_classname): New function. | |
2995 | (super_class_name): Likewise. | |
2996 | (print_super_fields): Removed. | |
2997 | (in_super): Removed. | |
2998 | (print_field_info): Never generate #defines. | |
2999 | (print_c_decl): Changed generated types to match JNI. No longer | |
3000 | print class name before method name. | |
3001 | (print_method_info): Print "static" before static methods. | |
3002 | Print "virtual" before non-final methods. | |
3003 | (usage): Use exit(1), not exit(-1). | |
3004 | (main): Likewise. | |
3005 | (print_field_info): Use %.17g to print a double. | |
3006 | (last_access): New globals. | |
3007 | (process_file): Initialize last_access. | |
3008 | (usage): Now static. | |
3009 | (ACC_VISIBILITY): New define. | |
3010 | (generate_access): New function. | |
3011 | (print_field_info): Call it. | |
3012 | (print_method_info): Likewise. Also, generate information for all | |
3013 | methods, not just native methods. Return void. | |
3014 | (print_c_decl): Return void. | |
3015 | (print_field_info): Return void. | |
3016 | ||
3017 | Thu Jul 2 16:53:16 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3018 | ||
3019 | * Makefile.in (JAVABISONFLAGS): Specific flag for bison when | |
3020 | processing the jc1 grammar file. Prefix bison functions and | |
3021 | variables with java_. | |
3022 | (parse.c): Dependencies on parse.h and lex.h | |
3023 | * expr.c (build_java_arrayaccess): Function now global. | |
3024 | * java-tree.h: Comment reorganized to carry on previous | |
3025 | classification effort. | |
3026 | (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P, | |
3027 | RESOLVE_TYPE_NAME_P): New flags on WFLs. | |
3028 | * jcf-parse.c (parse_source_file): java_parse_source_file renamed | |
3029 | java_parse (new prefix java_ generated by bison). | |
3030 | (java_layout_parsed_class, java_register_parsed_class): Function | |
3031 | call removed. | |
3032 | (yyparse): Removed unnecessary call to init_outgoing_cpool. | |
3033 | * lex.c (static tree wfl_op): Variable deleted. | |
3034 | (java_init_lex): Initialize kw_super and kw_this. Initialize more | |
3035 | ctxp fields to NULL_TREE. | |
3036 | (java_lex): No longer create WFL for operators. Filename caching | |
3037 | mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings | |
3038 | created as STRING_CST and later expanded. Removed extra argument | |
3039 | to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS | |
3040 | and SUPER. | |
3041 | (build_wfl_node): Removed code in comments. | |
3042 | * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but | |
3043 | store token and location data in the current bison token. | |
3044 | * parse.h: Removed pre-processor based symbol prefixes hack. Moved | |
3045 | static/extern function declaration at the beginning of the file. | |
3046 | (struct qualification): Data structure definition deleted. | |
3047 | (RESOLVE_CHAIN_REMAINDER): Macro definition deleted. | |
3048 | (qualify_ambiguous_name): Function declaration modified. Function | |
3049 | now returns nothing. | |
3050 | (build_array_ref, patch_array_ref, make_qualified_name, | |
3051 | resolve_qualified_expression_name, maybe_generate_clinit, | |
3052 | resolve_field_access): New static function declarations. | |
3053 | (build_java_arrayaccess): New extern function declaration. | |
3054 | (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted. | |
3055 | (CALL_EXPR_PRIMARY): Macro deleted. | |
3056 | (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros. | |
3057 | (struct parser_ctxt): Field initialized_final | |
3058 | removed. non_static_initialized, static_initialized: New fields. | |
3059 | * parse.y (static tree kw_super, static tree kw_this): New global | |
3060 | static. | |
3061 | (%union): tree wfl field of operator member replaced by int | |
3062 | location. WFLs are non longer created for operators. | |
3063 | (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>. | |
3064 | (qualified_name:): Now calls make_qualified_name to build the | |
3065 | identifier. | |
3066 | (type_declaration:): Consider generating <clinit> when class | |
3067 | parsing completed. | |
3068 | (variable_declarator:): Directly build an assignment node when the | |
3069 | variable is initialized when declared. | |
3070 | (this_or_super:): Build a WFL and set current location when THIS | |
3071 | or SUPER are parsed. | |
3072 | (expression_statement:): Wrap statement around a WFL. | |
3073 | (primary_no_new_array:): Fixed typo. Changed value returned by | |
3074 | THIS_TK because of its new type (temporary). | |
3075 | (dim_exprs:): Temporary fix because of OSB_TK's new type. | |
3076 | (field_access:): Build qualified name with SUPER. | |
3077 | (method_invocation:): Fixed returned value because of SUPER's new | |
3078 | type. | |
3079 | (array_access:): Use OSB_TK location information. | |
3080 | (post_increment_expression:, post_decrement_expression:, | |
3081 | unary_expression:, pre_increment_expression:, | |
3082 | pre_decrement_expression:, unary_expression_not_plus_minus:, | |
3083 | cast_expression:, multiplicative_expression:, | |
3084 | additive_expression:, shift_expression:, relational_expression:, | |
3085 | equality_expression:, and_expression:, exclusive_or_expression:, | |
3086 | inclusive_or_expression:, conditional_and_expression:, | |
3087 | conditional_or_expression:, assignment:): Use new location/token | |
3088 | information available on operators. | |
3089 | (create_class): Set super_decl_type to NULL_TREE when processing | |
3090 | java.lang.Object. | |
3091 | (register_fields): Field initialization is now a MODIFY_EXPR | |
3092 | node. Chain initialization code to the matching lists (according | |
3093 | the the field declaration modifiers). | |
3094 | (maybe_generate_clinit): New function. | |
3095 | (method_header): Don't set method's DECL_NAME to a WFL when adding | |
3096 | methods to java.lang.Object. | |
3097 | (resolve_and_layout): Now can return NULL_TREE if the type | |
3098 | resolution fails. Otherwise, return the class DECL instead of its | |
3099 | TYPE. | |
3100 | (check_method_redefinition): Don't patch method DECL_NAME if it | |
3101 | belongs to java.lang.Object. | |
3102 | (process_imports): Simply assign error_found to the value returned | |
3103 | by check_pkg_class_access. | |
3104 | (declare_local_variables): Don't use their init statements (if | |
3105 | any) when parsing error were previously found. Reuse MODIFY_EXPR | |
3106 | build during parsing as an init statement. | |
3107 | (java_method_add_stmt): Now return the current method body. | |
3108 | (java_layout_parsed_class, java_register_parsed_class): Functions | |
3109 | removed. | |
3110 | (java_complete_expand_methods): Initialize the constant pool on a | |
3111 | per class basis. Layout the classes before expanding their method | |
3112 | bodies. Don't try expand artificial constructor code if error were | |
3113 | found. Make the classes data and register them if no error were | |
3114 | found. | |
3115 | (java_complete_expand_method): Retrieve an artificial constructor | |
3116 | argument list before entering its body. Assign the top block to | |
3117 | the artificial constructor function body and set types of declared | |
3118 | blocks and compound statements to void. Walk method body if not an | |
3119 | artificial constructor. | |
3120 | (make_qualified_name, cut_identifier_in_qualified): New functions. | |
3121 | (resolve_expression_name): Fixed comments. Save/restore the | |
3122 | current class CLASS_LOADED_P flag value. Build non qualified | |
3123 | static field access and handle qualified expression names. | |
3124 | (resolve_field_access, resolve_qualified_expression_name): New | |
3125 | functions. | |
3126 | (patch_method_invocation_stmt): Use the new expression resolution | |
3127 | scheme, calling resolve_field_access when the function call is | |
3128 | resolved as an expression. | |
3129 | (qualify_ambiguous_name): Function rewritten to work on qualified | |
3130 | expression produced by make_qualified_name. | |
3131 | (java_complete_tree): Promote type when function's argument are | |
3132 | RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch | |
3133 | the assignment to discover further errors if RHS is a expression | |
3134 | name that fails to evaluate. Declare LHS initialized even though | |
3135 | the assignment failed. Don't use the location variable and removed | |
3136 | extra argument in patch function calls. Now handle the ARRAY_REF | |
3137 | case and build internal string representation when STRING_CSTs are | |
3138 | walked. | |
3139 | (build_method_invocation): Don't wrap function call around a WFL. | |
3140 | (build_assignment): Likewise. Use the operator location | |
3141 | information. | |
3142 | (patch_assignment): Handle array access LHSs. Handle error | |
3143 | provenance, resulting in a better error report. | |
3144 | (build_binop): Use op_location from operator as binop location | |
3145 | information. | |
3146 | (build_unaryop, build_incdec, build_cast): Likewise. | |
3147 | (patch_binop): Extract location information from the node. Fixed | |
3148 | typo in error message. | |
3149 | (patch_unary_op): Extract location information from the node. | |
3150 | (build_array_ref, patch_array_ref): New functions. | |
3151 | ||
3152 | Wed Jul 1 13:11:36 1998 Tom Tromey <tromey@cygnus.com> | |
3153 | ||
3154 | * expr.c (expand_java_INSTANCEOF): Changed calling convention to | |
3155 | match _Jv_IsInstanceOf. | |
3156 | * decl.c (init_decl_processing): Use _Jv_NewArray, not | |
3157 | soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof. | |
3158 | ||
3159 | Tue Jun 30 14:12:54 1998 Tom Tromey <tromey@cygnus.com> | |
3160 | ||
3161 | * decl.c (init_decl_processing): Functions are now named | |
3162 | _Jv_MonitorEnter and _Jv_MonitorExit, and return jint. | |
3163 | ||
3164 | Mon Jun 29 14:47:10 1998 Per Bothner <bothner@cygnus.com> | |
3165 | ||
3166 | * java-tree.h (load_class): Add prototype. | |
3167 | * class.c (is_compiled_class): Add missing arg to load_class. | |
3168 | * expr.c (expand_java_NEW): Call load_class. | |
3169 | * parse.y (process_import): Removed bogus use of void return value. | |
3170 | ||
3171 | Thu Jun 25 11:50:48 1998 Per Bothner <bothner@cygnus.com> | |
3172 | ||
3173 | * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node. | |
3174 | Function name is "_Jv_Throw" instead of "soft_athrow". | |
3175 | * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node. | |
3176 | Function name is "_Jv_AllocObject" instead of "soft_new". | |
3177 | Takes an extra parameter (object size). | |
3178 | * expr.c: Update calls. | |
3179 | ||
3180 | Wed Jun 24 13:59:02 1998 Per Bothner <bothner@cygnus.com> | |
3181 | ||
3182 | * lex.c (java_get_line_col): Handle end-of-file. | |
3183 | * except.c (expand_end_java_handler): Handle null type (i.e. finally). | |
3184 | ||
3185 | Wed Jun 24 09:22:34 EDT 1998 Andrew MacLeod <amacleod@cygnus.com> | |
3186 | ||
3187 | * lang.c (lang_init): Make -fexceptions the default. | |
3188 | * except.c (maybe_start_try, maybe_end_try): Don't do anything if | |
3189 | exception handling is not turned on. | |
3190 | ||
3191 | Tue Jun 23 10:17:09 EDT 1998 Andrew MacLeod <amacleod@cygnus.com> | |
3192 | ||
3193 | * lang.c (flag_new_exceptions): Make this this default. | |
3194 | * decl.c (end_java_method): Call emit_handlers. | |
3195 | * except.c (method_init_exceptions): Set language code and version. | |
3196 | (expand_start_java_handler): Enable exception, and call | |
3197 | expand_eh_region_start. | |
3198 | (expand_end_java_handler): Enable exception, and set up catch blocks. | |
3199 | (emit_handlers): New routine to generate the saved handlers. | |
3200 | * java-except.h (emit_handlers): Add prototype. | |
3201 | ||
3202 | Fri Jun 12 11:31:24 1998 Per Bothner <bothner@cygnus.com> | |
3203 | ||
3204 | We used to have three different representations of the constant pool: | |
3205 | the CPool structure, the tree_constant_pool, and the constructures | |
3206 | used to build the Class object (which may need class and string | |
3207 | constants) in compiled code. None were appropriate for compiling | |
3208 | to .class files, so I did a major overhaul. | |
3209 | ||
3210 | First, the tree_constant_pool array was removed. Things were | |
3211 | modified to the CPool structure in the JCF could be used. | |
3212 | Second, a "capacity" field was added to the CPool, and functions | |
3213 | written to search for a matching constant, adding one if not found. | |
3214 | The code that generated the Class object was changed to use a CPool. | |
3215 | The actual TREE_LISTs used to build the CONSTRUCTORs used for | |
3216 | the static Class object are now only in build_constants_constructor. | |
3217 | Finally, I wrote code which can generate a .class file (including its | |
3218 | constant pool) from the RECORD_TYPE of a class. This is a big step | |
3219 | on the way to compiling Java source into .class files. | |
3220 | ||
3221 | * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file. | |
3222 | * Makefile.in (JAVA_OBJS): Added jcf-write.o. | |
3223 | ||
3224 | * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag, | |
3225 | CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros. | |
3226 | (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME, | |
3227 | COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined. | |
3228 | (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX. | |
3229 | (lang_type): Removed constant_pool field. | |
3230 | * jcf.h (CPool): Renamed size to count. Added field capacity. | |
3231 | (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2, | |
3232 | CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros. | |
3233 | Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros. | |
3234 | ||
3235 | * constants.c (current_constant_pool_tags, current_constant_pool_data, | |
3236 | current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool. | |
3237 | * constants.c (build_constants_constructor): Use new outgoing_cpool. | |
3238 | (set_constant_entry, find_constant1, find_constant2, | |
3239 | find_class_constant, count_constant_pool_bytes, write_constant_pool, | |
3240 | find_utf8_constant, find_class_or_string_constant): New functions. | |
3241 | ||
3242 | * jcf-parse.c (load_class): Don't save/restore tree-constant_pool. | |
3243 | (get_constant): Use current_jcf.cpool instead of tree_constant_pool. | |
3244 | (give_name_to_class, get_class_constant): Likewise. | |
3245 | * jcf-parse.c, java-tree.h (tree_constant_pool): Removed. | |
3246 | (get_name_and_type_constant, get_ref_constant): Removed. | |
3247 | * parse.h (parser_ctxt): Remove field tree_constant_pool. | |
3248 | * parse.y: Don't save/restore tree_constant_pool. | |
3249 | * verify.c (verify_jvm_instructions): Update for new approach. | |
3250 | * expr.c (expand_invoke, expand_java_field_op): Likewise. | |
3251 | ||
3252 | * lang-options.h: Added -femit-class-file, -femit-class-files. | |
3253 | * lang.c (flag_emit_class_files), java-tree.h: New flag. | |
3254 | (lang_f_options): Added "emit-class-file(s)". | |
3255 | ||
3256 | * expr.c (build_java_arrayaccess): Generate more efficient array | |
3257 | bounds checking, by using unsigned compare. | |
3258 | ||
3259 | * expr.c (expand_invoke): Re-arrange error checks to make more robust. | |
3260 | ||
3261 | Wed Jun 10 17:34:42 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3262 | ||
3263 | * parse.h: New comment on the handling of unresolved type | |
3264 | identifiers. JDEPs are now part of the jdep_code enum. | |
3265 | (typedef struct jdep): Now use enum jdep_code or int, depending on | |
3266 | availability. Both are narrowed down to an 8 bits bitfield. | |
3267 | (CALL_EXPR_PRIMARY): Fixed comment. | |
3268 | ||
3269 | Wed Jun 10 10:54:39 1998 Tom Tromey <tromey@cygnus.com> | |
3270 | ||
3271 | * Make-lang.in (java): Added gjavac and jvgenmain. | |
3272 | (java.start.encap): Depend on gjavac. | |
3273 | (java.rest.encap): Depend on jvgenmain. | |
3274 | ||
3275 | * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++. | |
3276 | (JAVA_CROSS_NAME): Likewise. | |
3277 | (java.all.build): Depend on jvgenmain and gjavac. | |
3278 | (java.all.cross): Depend on jvgenmain and gjavac-cross. | |
3279 | (jvgenmain$(exeext)): New target. | |
3280 | (java.install-common): Wrote. | |
3281 | * config-lang.in (compilers, stagestuff): Added gjavac and | |
3282 | jvgenmain. | |
3283 | ||
3284 | Wed Jun 10 12:19:04 1998 Dave Brolley <brolley@cygnus.com> | |
3285 | ||
3286 | * lang.c (lang_decode_option): New argc/argv interface. | |
3287 | ||
3288 | Tue Jun 9 18:12:46 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3289 | ||
3290 | * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard. | |
3291 | * decl.c (build_decl_no_layout): New function. | |
3292 | * expr.c (java_lang_expand_expr): Layout declarations found in | |
3293 | blocks before they're pushed. | |
3294 | * jcf-parse.c (load_class): Save current line when parsing class | |
3295 | file. | |
3296 | (parse_source_file): Register class before expanding their | |
3297 | methods. | |
3298 | * lang.c (put_decl_node): Produce `null' when `void *' is | |
3299 | processed. | |
3300 | * lex.c (static tree wfl_op): New static global, for error report | |
3301 | on casts. | |
3302 | (java_init_lex): wfl_operator and wfl_op initialized | |
3303 | here. Filename caching added for wfl_op. Return wfl_op when `(' is | |
3304 | parsed. | |
3305 | * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast, | |
3306 | patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p, | |
3307 | build_unresolved_array_type): New static function definitions. | |
3308 | (build_decl_no_layout): New extern function declared. | |
3309 | (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the | |
3310 | faulty modifier exists. | |
3311 | (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros. | |
3312 | (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned. | |
3313 | (UNARY_PLUS_EXPR): New fake operator. | |
3314 | (struct parser_ctxt): New field osb_number. | |
3315 | * parse.y (static tree wfl_operator): New static WFL for operator | |
3316 | bound error messages. | |
3317 | (DECR_TK, INCR_TK): Moved. | |
3318 | (OP_TK): Tagged <operator>. | |
3319 | (array_type:): Now call build_unresolved_array_type. | |
3320 | (dim_expr:): Count the number of '[' seen. | |
3321 | (post_increment_expression, post_decrement_expression, | |
3322 | pre_increment_expression, pre_decrement_expression, | |
3323 | unary_expression_not_plus_minus, unary_expression:): Actions are | |
3324 | now building the corresponding unary expressions. | |
3325 | (cast_expression:): Actions are now building cast expressions. | |
3326 | (build_unresolved_array_type): New function. | |
3327 | (create_interface): Reset the number of declared interfaces. | |
3328 | (create_class): Likewise. | |
3329 | (method_header): Methods declared within the scope of an interface | |
3330 | are now implicitly set public and abstract. | |
3331 | (java_complete_class): Variable's and parameter's type are patched | |
3332 | with a promoted type. | |
3333 | (declare_local_variables): Resolved non builtin types are promoted | |
3334 | before being used to build a variable decl. Removed type patch | |
3335 | posted on variable initialization statement. | |
3336 | (source_start_java_method): Use build_decl_no_layout to build the | |
3337 | decl of a parameter of incomplete type. | |
3338 | (java_register_parsed_class): Process interfaces too. Call | |
3339 | rest_of_decl_compilation on each processed class declarations. | |
3340 | (java_complete_expand_methods): Don't attempt to expand things in | |
3341 | interfaces. | |
3342 | (java_complete_tree): Process CONVERT_EXPR, even though it always | |
3343 | has a type. Propagate error_mark_node to node's type too. Promote | |
3344 | method's call argument type and return error_mark_node if | |
3345 | argument's completion didn't work. MODIFY_EXPR can have a WFL as a | |
3346 | RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now | |
3347 | handle unary operator nodes. | |
3348 | (build_assignment): Added comment. | |
3349 | (print_int_node): New function. | |
3350 | (patch_assignment): New second argument. New error handling. Use | |
3351 | print_int_node. Handle references. Use can_cast_to_p to issue | |
3352 | different error message according to the context and check upon | |
3353 | the initialization of the RHS. | |
3354 | (can_cast_to_p, valid_ref_assignconv_cast_p): New functions. | |
3355 | (operator_string): Handle more operators. | |
3356 | (patch_binop): No longer use a function static | |
3357 | wfl_operator. Improved error message on shift distance. | |
3358 | (build_unaryop, build_incdec, build_cast, patch_unaryop, | |
3359 | patch_cast): New functions. | |
3360 | ||
3361 | Fri Jun 5 18:03:07 1998 Per Bothner <bothner@cygnus.com> | |
3362 | ||
3363 | * jvspec.c: New file. | |
3364 | * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c. | |
3365 | ||
3366 | * java-tree.h (identifier_subst): Add declaration. | |
3367 | ||
3368 | Thu Jun 4 13:44:23 1998 Tom Tromey <tromey@cygnus.com> | |
3369 | ||
3370 | * jvgenmain.c (main): Generate call to JvRunMain. | |
3371 | ||
3372 | * class.c (make_class_data): Push value for "sync_info" field. | |
3373 | * decl.c (init_decl_processing): Push "sync_info" field. | |
3374 | ||
3375 | Wed Jun 3 20:39:14 1998 Per Bothner <bothner@cygnus.com> | |
3376 | ||
3377 | * typeck.c (build_java_array_type): Set TYPE_NAME to actual | |
3378 | Java (source) name, not signature. | |
3379 | Set TYPE_ALIGN to (at least) that of element_type. | |
3380 | ||
3381 | Tue Jun 2 15:19:19 1998 Per Bothner <bothner@cygnus.com> | |
3382 | ||
3383 | * class.c: Moved classname-mangling-rekated code to ... | |
3384 | * mangle.c: ... this new file. | |
3385 | * jvgenmain.c: New program (needs mangle.c) to generate main program. | |
3386 | * Makefile.in: Update for above changes. | |
3387 | ||
3388 | Mon Jun 1 09:58:36 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3389 | ||
3390 | * expr.c (truthvalue_conversion): Convert integer and floating | |
3391 | point value to their truth value. | |
3392 | * lex.c (java_lex): Handle the `null' literal. | |
3393 | * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros. | |
3394 | (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC, | |
3395 | ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED): | |
3396 | New macros. | |
3397 | ||
3398 | * parse.y: Reorganization/documentation on token declaration. | |
3399 | (binop_lookup[]): New added new tree codes. | |
3400 | (relational_expression): Build corresponding binary operators. | |
3401 | (equality_expression, conditional_and_expression, | |
3402 | conditional_or_expression): Likewise. | |
3403 | (java_complete_class): Fix crash in debug message. | |
3404 | (java_complete_tree): Check initialization of method call | |
3405 | arguments. Further bogus node evaluation to detect more error | |
3406 | during assignments. Handles more binary operators. | |
3407 | (patch_assignment): Use DECL_P. | |
3408 | (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree | |
3409 | code. | |
3410 | (operator_string): Handle more case. Compacted source. | |
3411 | (patch_binop): Changed function comment. Checking for | |
3412 | uninitialized first operand takes the compound assignment into | |
3413 | account and uses DECL_P. Checking for uninitialized second operand | |
3414 | delayed to routine's end. Use macros to issue type bound error | |
3415 | messages and issue messages on both operands if their types are | |
3416 | different. Force fixed type into node. Handle all binary | |
3417 | operators. | |
3418 | ||
3419 | Wed May 27 10:30:31 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3420 | ||
3421 | * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros. | |
3422 | * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to | |
3423 | build operator node and return tokens. | |
3424 | * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros. | |
3425 | * parse.h (java_complete_tree): Changed returned type in prototype. | |
3426 | (build_method_invocation, build_assignment, patch_assignment, | |
3427 | patch_binop): New static function declarations. | |
3428 | (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P, | |
3429 | BUILD_EXPR_WFL): New macros. | |
3430 | * parse.y (enum tree_code binop_lookup[]): New static for token to | |
3431 | TREE_CODE lookup. | |
3432 | (%union): Parser union has new sub-structure `operator'. | |
3433 | (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK, | |
3434 | PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK, | |
3435 | ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK, | |
3436 | ASSIGN_ANY_TK): Tokens tagged `operator'. | |
3437 | (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK, | |
3438 | AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK, | |
3439 | MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK, | |
3440 | REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'. | |
3441 | (assignment_operator:): Rule tagged `operator'. | |
3442 | (expression_statement:): Re-installed default rule. | |
3443 | (method_invocation:): Sub rules call build_method_invocation. | |
3444 | (postfix_expression:): Don't attempt to resolve name here. Just | |
3445 | return an ID. | |
3446 | (multiplicative_expression:): Sub-rules build corresponding binop | |
3447 | expression node. | |
3448 | (additive_expression:, shift_expression:, and_expression:, | |
3449 | exclusive_or_expression:, inclusive_or_expression:): Likewise. | |
3450 | (assignment:): Sub rule invoke build_assignment. | |
3451 | (assignment_operator:): Default rules on sub rules. | |
3452 | (force_error): Added documentation on this variable. | |
3453 | (declare_local_variables): Build initialization calling | |
3454 | build_assignment. | |
3455 | (expand_start_java_method): Removed unused rtx declaration. Mark | |
3456 | arguments as already initialized. | |
3457 | (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL. | |
3458 | (java_complete_expand_methods): Don't process next method if | |
3459 | completion of the previous one triggered errors. | |
3460 | (java_complete_expand_method): Call source_end_java_method if no | |
3461 | error were found during completion. | |
3462 | (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve | |
3463 | locals declaratilon. Handle names found within a class. Return | |
3464 | error_mark_node when things aren't found. | |
3465 | (patch_method_invocation_stmt): Return error_mark_node on failures. | |
3466 | (patch_invoke): Removed unused local. Return the correct node. | |
3467 | (java_complete_tree): Now returns a value. The BLOCK section binds | |
3468 | local identifiers and the type of a BLOCK is now void. Assign the | |
3469 | result of operand completion on COMPOUND_EXPR. Assign the | |
3470 | encapsulated node of a WFL to the result of its completion, except | |
3471 | when the node is an identifier. Now handle MODIFY_EXPR and several | |
3472 | binary operators. Return error_mark_node on errors. | |
3473 | (build_method_invocation, build_assignment, patch_assignment, | |
3474 | build_binop, operator_string, patch_binop): New functions. | |
3475 | * typeck.c (binary_numeric_promotion): New function. | |
3476 | ||
3477 | Thu May 21 12:01:04 1998 Per Bothner <bothner@cygnus.com> | |
3478 | ||
3479 | * class.c (identifier_subst): New convenience wrapper for ident_subst. | |
3480 | Replace most uses of ident_subst by identifier_subst. | |
3481 | ||
3482 | * class.c (push_class_static_dummy_field): Removed function. | |
3483 | (build_class_ref): Find Class object decl by looking up "CNAME.class", | |
3484 | instead of looking got "class" static field. Create that decl here. | |
3485 | (class_identifier_node): Removed; no longer needed. | |
3486 | (init_class_processing): Don't init class_identifier_node. | |
3487 | * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field. | |
3488 | Do nreverse 0 times (instead of twice) for Object and Class. | |
3489 | * parse.y (java_layout_parsed_class): No push_class_static_dummy_field. | |
3490 | ||
3491 | Wed May 20 16:35:04 1998 Per Bothner <bothner@cygnus.com> | |
3492 | ||
3493 | * jcf-parse.c (parse_class-file): Set lino to smallest line number, | |
3494 | while initializing linenumber_count and linenumber_table. | |
3495 | Do it before init_function_start (which calls emit_line_note). | |
3496 | * expr.c (expand_byte_code): Don't need to clear lineno here. | |
3497 | ||
3498 | Mon May 18 16:23:32 1998 Tom Tromey <tromey@cygnus.com> | |
3499 | ||
3500 | * class.c (append_gpp_mangled_type): If `qualifications' is >=9, | |
3501 | then mangle number as _N_. | |
3502 | ||
3503 | * class.c (mangle_class_field): New function. | |
3504 | (build_class_ref): Set assembler name of class reference using | |
3505 | mangle_class_field. | |
3506 | (push_class_static_dummy_field): Likewise. | |
3507 | ||
3508 | Sun May 17 12:52:35 1998 Michael Tiemann <tiemann@cygnus.com> | |
3509 | ||
3510 | * parse.y (source_start_java_method): Use TREE_SET_CODE instead | |
3511 | of assigning to TREE_CODE. The latter method exploits a feature | |
3512 | of GCC that is not ANSI compliant. | |
3513 | ||
3514 | Thu May 12 13:44:27 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3515 | ||
3516 | * decl.c (pushdecl_force_head): New function. | |
3517 | (pushlevel): Removed conditional printf. | |
3518 | (complete_start_java_method): Don't enter local variable scope if | |
3519 | function is compiled from source code. | |
3520 | * expr.c: parse.h now included | |
3521 | (java_lang_expand_expr): New function. | |
3522 | * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of | |
3523 | printf. Terminate buffer when doing directories. | |
3524 | * jcf-parse.c (parse_source_file): Call lang_init_source before | |
3525 | parsing and before code generation. | |
3526 | * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally | |
3527 | use printf if the macro is defined. | |
3528 | * lang.c (lang_init): Install lang_expand_expr hook on | |
3529 | java_lang_expand_expr. | |
3530 | (java_dummy_print): New function. | |
3531 | (lang_init_source): New function. | |
3532 | * lex.c (java_lex): Remember location of an opening brace at the | |
3533 | second nesting level. | |
3534 | (java_is_eol): Unget character seen after a CR if it is EOF. | |
3535 | * parse.h: Now includes lex.h | |
3536 | (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use | |
3537 | printf if the macro is defined. | |
3538 | (expand_start_java_method, build_expr_block, enter_block, | |
3539 | exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks): | |
3540 | New static function declarations. | |
3541 | (pushdecl_force_head): New extern function declaration. | |
3542 | (INCOMPLETE_TYPE_P): New macro. | |
3543 | (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum. | |
3544 | (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY, | |
3545 | BLOCK_EXPR_ORIGIN): New macros. | |
3546 | (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST, | |
3547 | DECL_SOURCE_LINE_LAST): New macros. | |
3548 | (struct parser_ctxt): Removed field current_method_decl, redundant | |
3549 | with the field current_function_decl. Added fields | |
3550 | first_ccb_indent1 and pending_block. | |
3551 | * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK, | |
3552 | BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules | |
3553 | tagged <node> | |
3554 | (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs. | |
3555 | (compilation_unit:): Cosmetic on sub rule. | |
3556 | (type_declaration:): Cosmetic on sub rules. Added an error rule. | |
3557 | (variable_initializer:): Installed default rule on expression:. | |
3558 | (method_declaration:): method_header: starts a new | |
3559 | method. method_body: installs the function body, absorbs blocks | |
3560 | emitted for temporary variable scopings, pops function's body block | |
3561 | and merges function's last statement lineno in DECL_SOURCE_LINE. | |
3562 | (method_body:): Installed default rules. | |
3563 | (block:): Call enter_block when an opening brace is seen. Absorb | |
3564 | scoping blocks and call exit_block when a closing brace is seen. | |
3565 | (block_statement:): Cosmetic changes. | |
3566 | (method_invocation:): Create WFL around CALL_EXPR node. | |
3567 | (patch_stage): Added comment around definition. | |
3568 | (method_header): Try to use first_ccb_indent1 as the first line of | |
3569 | the method, so BP debug info are emitted at the first opening | |
3570 | brace of the function. If the function has no body, use the | |
3571 | location of the function's name. Override currently defined method | |
3572 | name with the matching WFL so we can point redefinition errors | |
3573 | using the location where the function's name was declared. | |
3574 | (check_abstract_method_header): Interprets DECL_NAME as an | |
3575 | identifier or as a WFL, accordingly. | |
3576 | (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM. | |
3577 | (check_method_redefinition): Use DECL_NAME as a WFL. Extract | |
3578 | location and name information out of it and reinstall DECL_NAME to | |
3579 | its original identifier node value. | |
3580 | (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the | |
3581 | function's source code). | |
3582 | (read_import_dir): Test the value returned by find_class and issue | |
3583 | a fatal accordingly. | |
3584 | (declare_local_variables): Push a new block for the scope of the | |
3585 | new variable(s) if code has been already generated at that nesting | |
3586 | level. Pinpoint redefinition errors using the variable id | |
3587 | WFLs. Generate initialization code if necessary. If the variable | |
3588 | type is incomplete, register a patch on its decl. | |
3589 | (source_start_java_method): Rewritten. Define a new block for the | |
3590 | function's parameters. Build parameter decl out of function's | |
3591 | arguments and register them for a patch if their types are | |
3592 | incomplete. | |
3593 | (expand_start_java_method): Includes the part of | |
3594 | source_start_java_method that was pushing the parameter decls and | |
3595 | completing the method start code. | |
3596 | (source_end_java_method): Removed call the expand_end_bindings and | |
3597 | poplevel (already taken care of). Reinstall function's arguments | |
3598 | and get function's last line of code before calling | |
3599 | expand_function_end. | |
3600 | (java_method_add_stmt): New comment before the function's | |
3601 | code. Complement the second operand of the current COMPOUND_EXPR | |
3602 | if necessary. | |
3603 | (java_complete_expand_methods): Don't generate debug info on line | |
3604 | zero when expanding a generated constructor. | |
3605 | (java_complete_expand_method): Set start and end line numbers for | |
3606 | a artificially generated constructor to one and manually call | |
3607 | enter_block and exit_block when defining it. For all methods: | |
3608 | expand function's start calling the new expand_start_java_method | |
3609 | and invoke java_complete_tree on the effective method's body, if | |
3610 | any. | |
3611 | (resolve_expression_name): Now use lookup_name_in_blocks to search | |
3612 | local variable decls and print out an error when variables are | |
3613 | undefined. | |
3614 | (patch_method_invocation_stmt): Inserted comment before the | |
3615 | function's code. | |
3616 | (lookup_method_invoke): Chain method's arguments using chainon | |
3617 | with the current arg list as a second argument. Inserted missing | |
3618 | IDENTIFIER_POINTER when reporting an error on methods not found. | |
3619 | (refine_accessible_methods_list): Don't retain constructors. | |
3620 | (patch_arguments): Function removed. | |
3621 | (java_complete_tree): Inserted comment before the function's | |
3622 | code. New case for BLOCKs. Moved the WFL case a bit | |
3623 | further. Complete function's arguments. | |
3624 | (build_expr_block, enter_block, exit_block, lookup_name_in_blocks, | |
3625 | maybe_absorb_scoping_blocks): New functions. | |
3626 | ||
3627 | Mon Apr 27 10:50:05 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3628 | ||
3629 | * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if | |
3630 | previously set. | |
3631 | * jcf-parse.c (parse_source_file, java_error_count): New forward | |
3632 | and extern declarations. | |
3633 | (java_parse_abort_on_error): Macro moved. | |
3634 | (jcf_parse_source): fatal called if fopen fails. Now calls | |
3635 | parse_source_file. | |
3636 | (parse_source_file): New parse_only parameter. Reflects the | |
3637 | elimination of the second pass. | |
3638 | (yyparse): parse_source_file called with argument set to 0. | |
3639 | * jcf.h (JCF_ZERO): Sets java_source to zero. | |
3640 | * lex.c (java_init_lex): pass argument is gone. Function modified | |
3641 | to be called once during the analysis of a file. | |
3642 | (java_unget_unicode): Fixed typo in fatal message. | |
3643 | (java_get_line_col): Likewise. | |
3644 | (java_lval): Likewise. String literals no longer built during | |
3645 | second pass. | |
3646 | * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into | |
3647 | account. | |
3648 | * parse.h (MODIFIER_WFL): New macro. | |
3649 | (parse_check_super, parser_check_super_interface): Now return int. | |
3650 | (parser_chain_incomplete_item, not_builtin_p, | |
3651 | complete_method_decl): Declarations removed. | |
3652 | (build_method_invocation_stmt, build_invoke): Renamed using the | |
3653 | `patch' instead of `build' | |
3654 | (register-incomplete_type, obtain_incomplete_type, | |
3655 | java_complete_tree, java_complete_expand_method, | |
3656 | unresolved_type_p, create_jdep_list): New function declarations. | |
3657 | (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS, | |
3658 | END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted. | |
3659 | (jdep): New typedef on new struct _jdep. | |
3660 | (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL, | |
3661 | JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, | |
3662 | JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, | |
3663 | JDEP_RESOLVED_P): New macros. | |
3664 | (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD, | |
3665 | JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE, | |
3666 | JDEP_VARIABLE): New enum values and jdep kinds. | |
3667 | (jdeplist): New typedef on struct _jdeplist. | |
3668 | (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New | |
3669 | macros. | |
3670 | (CALL_EXPR_PRIMARY): New macro. | |
3671 | (struct parser_ctxt): Fields java_pass, current_method_decl, | |
3672 | method_decl_list deleted. New field jdeplist. | |
3673 | (INCOMPLETE_P): Macro deleted. | |
3674 | * parse.y (single_type_import_declaration:): Removed pass switch. | |
3675 | (type_import_on_demand_declaration): Likewise. | |
3676 | (field_declaration:): Removed pass switch on all sub rules. | |
3677 | (class_declaration:): Call the complete_class_decl removed on | |
3678 | class_body rules. | |
3679 | (method_declaration:): Removed second pass switch. No longer chain | |
3680 | methods decl when method_header reduced. | |
3681 | (method_header:): Sub rules no longer depend on pass switch. | |
3682 | (method_declarator:): Likewise. | |
3683 | (method_body:): Likewise. | |
3684 | (abstract_method_declaration:): Likewise. | |
3685 | (block_statement:): Likewise. | |
3686 | (local_variable_declaration:): Likewise. | |
3687 | (argument_list:): Likewise. | |
3688 | (method_invocation:): Likewise. Call to build_method_invocation_stmt | |
3689 | removed. Partial CLASS_EXPR tree node built instead. | |
3690 | (postfix_expression:): Removed pass switch on all sub rules. | |
3691 | (java_pop_parser_context): Free classd_list content. | |
3692 | (yyerror): Call obstrack_grow0 to finalize error message. | |
3693 | (check_class_interface_creation): Comment modified to reflect new | |
3694 | returned value meaning. Removed second pass switch. Return 1 if an | |
3695 | error was found, 0 otherwise. Adjust pointer on filename if a | |
3696 | leading path separator was found. | |
3697 | (maybe_create_class_interface_decl): Removed first pass switch | |
3698 | when linking the class decl to the class_list. Install a new | |
3699 | jdep_list for the class. | |
3700 | (add_superinterfaces): List of unresolved interfaces is | |
3701 | gone. Unresolved interfaces are directly added to the current | |
3702 | dependencies list. | |
3703 | (create_interface): Second pass shortcut removed. | |
3704 | ctpx->modifier_ctx access through MODIFIER_WFL. | |
3705 | (create_class): Second pass shortcut removed. Call to | |
3706 | register_incomplete_type replaces the call to | |
3707 | parser_chain_incomplete_item. | |
3708 | (complete_class_decl): Function removed. | |
3709 | (duplicate_declaration_error): New way of retrieving redeclared | |
3710 | item type. | |
3711 | (register_fields): Call to lookup_modifier_cl replaced by | |
3712 | MODIFIER_WFL. New way of handling unresolved type, using | |
3713 | unresolved_type_p and obtain_incomplete_type. | |
3714 | register_incomplete_type replaces call to parser_chain_incomplete_item. | |
3715 | (patch_stage): New static global variable. | |
3716 | (method_header): New way of handling unresolved type, using | |
3717 | unresolved_type_p and obtain_incomplete_type. patch_stage used to | |
3718 | indicates that the method decl needs to be patched. | |
3719 | (check_abstract_method_header): Call to lookup_modifier_cl | |
3720 | replaced by MODIFIER_WFL. | |
3721 | (method_declarator): Incomplete argument type are registered | |
3722 | calling register_incomplete_type. Patch on the declared method is | |
3723 | issued in that case. | |
3724 | (unresolved_type_p): New function. | |
3725 | (parser_check_super_interface): New comment to reflect function's | |
3726 | modified returned type (int). Function and has a new argument | |
3727 | this_wfl. Call to parse_error_context uses this_wfl instead of | |
3728 | relying on lookup_cl. | |
3729 | (parser_check_super): Comment reflects function's new returned | |
3730 | type (int). Function returns non zero value on error. | |
3731 | (create_jdep_list, reverse_jdep_list, obtain_incomplete_type, | |
3732 | register_incomplete_type, jdep_resolve_class): New functions to | |
3733 | handle incomplete types in declarations. | |
3734 | (java_complete_class): Rewritten to work with the new incomplete | |
3735 | type handling scheme. | |
3736 | (complete_class_report_errors): Likewise. | |
3737 | (complete_method_decl): Removed: it jobs is now handled by | |
3738 | java_complete_class. | |
3739 | (do_resolve_class): Class loaded in not already loaded and not | |
3740 | found in Java source code. | |
3741 | (java_check_regular_methods, java_check_abstract_methods): Don't | |
3742 | call complete_method_decl anymore. | |
3743 | (lookup_modifier_cl, not_builtin_p): Functions deleted. | |
3744 | (read_import_dir): Got rid of the pass number dependency. | |
3745 | (declare_local_variables): New handling of unresolved types (patch | |
3746 | issued). | |
3747 | (source_start_java_method): New parameter level. Function called | |
3748 | with level set to 1 when argument types are potentially | |
3749 | unresolved. Called to complete the job with level set to 2 once | |
3750 | types are complete. | |
3751 | (source_end_java_method): Call to permanent_allocation | |
3752 | removed. Waiting to be replaced by a more suitable obstack | |
3753 | management. | |
3754 | (java_complete_expand_methods, java_complete_expand_method, | |
3755 | java_expand_finals): New functions. | |
3756 | (build_method_invocation_stmt): Renamed | |
3757 | patch_method_invocation_stmt. Extracts function call expression | |
3758 | (wfl) and arguments (args) from CALL_EXPR tree operands. | |
3759 | (build_invoke): Renamed patch_invoke. Fixed typo in fatal | |
3760 | call. Patch the function and argument operand of the CALL_EXPR | |
3761 | tree argument. | |
3762 | (patch_argument, java_complete_tree): New functions. | |
3763 | ||
3764 | Mon Apr 20 18:26:57 1998 Per Bothner <bothner@cygnus.com> | |
3765 | ||
3766 | Recover from missing fields and methods (i.e. error instead of fatal). | |
3767 | * decl.c, java-tree.h (TYPE_identifier_node): New global constant. | |
3768 | * expr.c (expand_invoke): Recover from missing method. | |
3769 | (expand_java_field_op): Recover from missing field. | |
3770 | Inline references to java.lang.{Integer,Char,...}.TYPE. | |
3771 | * typeck.c (get_type_from_signature), java-tree.h: New function. | |
3772 | * class.c (add_method): Use get_type_from_signature. | |
3773 | (build_class_ref): Handle a class that was not found. | |
3774 | * typeck.c (convert): Handle conversion to pointers (for convenience). | |
3775 | * verify.c (verify_jvm_instructions): Use get_type_from_signature | |
3776 | instead of lookup_field to handle missing fields. | |
3777 | ||
3778 | * jcf-parse.c (process_zip_dir): Set java_source. | |
3779 | ||
3780 | 1998-04-20 Brendan Kehoe <brendan@cygnus.com> | |
3781 | ||
3782 | * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME. | |
3783 | ||
3784 | Tue Apr 14 15:59:54 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3785 | ||
3786 | * jcf-parse.c (load_class): Don't change input_filename before | |
3787 | calling jcf_parse_source (but still do it before calling | |
3788 | jcf_parse). | |
3789 | (jcf_parse_source): Assign input_filename after having saved the | |
3790 | parser context. | |
3791 | * lex.c (java_init_lex): Chain a WFL node to the import on demand | |
3792 | list. ctxp->modifier_ctx zeroed according to its new | |
3793 | definition. ctxp->filename initialized. Removed | |
3794 | JAVA_MODIFIER_CTX_UNMARK. | |
3795 | (java_unget_unicode): Update the character based column position. | |
3796 | (java_allocate_new_line): ref_count not used anymore. Always free | |
3797 | ctxp->p_line. Initialize c_line->char_col to 0. | |
3798 | (java_get_unicode): Update the character based column position. | |
3799 | (java_lex): Use ctxp->elc to store current position in source | |
3800 | file, at the beginning of the parsed token. Set modifier_ctx entry | |
3801 | corresponding to the parse modifier to a WFL node. Return a WFL | |
3802 | node when an identifier is parsed. | |
3803 | (java_lex_error): Now uses ctxp->elc to store current position in | |
3804 | source. | |
3805 | (build_wfl_node, java_is_eol, java_get_line_col): New functions. | |
3806 | * lex.h (build_wfl_node): New function definitions. | |
3807 | (struct java_line): ref_count and next fields are gone. New field | |
3808 | char_col. | |
3809 | (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN, | |
3810 | JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted. | |
3811 | (JAVA_COLUMN_DELTA): New macro. | |
3812 | (java_lc): New typedef on new struct _java_lc. | |
3813 | * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types. | |
3814 | (parse_error_context, parse_warning_context): Changed prototypes. | |
3815 | (java_get_line_col): Added as an available global function. | |
3816 | (JAVA_MODIFIER_CTX_UNMARK): Macro removed. | |
3817 | (IC_DECL): Replaced by macro IC_TYPE | |
3818 | (DEPEND_WFL): New macro. | |
3819 | (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first | |
3820 | wrong modifier. | |
3821 | (exit_java_complete_class): Removed a commented out statement. | |
3822 | (struct parser_ctxt): Added comments on fields. modifier_ctx is | |
3823 | now an array of tree nodes. Deleted fields line_list and | |
3824 | e_line. New field elc, to replace e_line. | |
3825 | * parse.y (array_type:): Build WFL node. | |
3826 | (qualified_name:): Build a single WFL node out of two. Retain | |
3827 | the location information of the first node in the resulting node. | |
3828 | (package_declaration:): Use package name as a WFL node | |
3829 | (single_type_import_declaration:): Use imported name as a WFL node. | |
3830 | (type_import_on_demand_declaration:): Use root of the imported | |
3831 | packages as a WFL node. | |
3832 | (field_declaration:): Removed unused local variable cl. | |
3833 | (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK. | |
3834 | (yyerror): New static elc. Removed static error_line, error_pos. | |
3835 | New local code_from_source. Save ctxp->elc into elc at the first | |
3836 | pass. Call java_get_line_col to get a string of the line where | |
3837 | the error occured. | |
3838 | (debug_line): Removed static function. | |
3839 | (parse_error_context, parse_warning_context): Parameter cl is now | |
3840 | a WFL node. Use its value to initialize ctxp->elc. | |
3841 | (redefinition_error): Parameter cl is now a WFL node. | |
3842 | (parse_add_interface): New parameter wfl. No longer call | |
3843 | lookup_cl, use wfl instead. | |
3844 | (check_class_interface_creation): Parameter cl is now a WFL node. | |
3845 | (maybe_create_class_interface_decl): Likewise. | |
3846 | (add_superinterfaces): New function. | |
3847 | (create_interface): Removed local cl, node, super_decl, | |
3848 | super_decl_type. Function now uses id as a WFL node. Better | |
3849 | warning/error report on obsolete or forbidden mix of | |
3850 | modifiers. Now calls add_superinterfaces to register interfaces. | |
3851 | (create_class): Removed local cl, node. Local variable id is used | |
3852 | as a WFL node. Better error report on forbidden modifier | |
3853 | mix. Uses add_superinterfaces to register interfaces. | |
3854 | (find_field): Argument cl is now a WFL node. Now store the WFL | |
3855 | node of a fields that needs to be checked for their | |
3856 | initialization. | |
3857 | (method_header): Local variable node non longer used. Local | |
3858 | variable id replaces cl. | |
3859 | (check_modifiers_consistency): Local variable cl is now a WFL | |
3860 | node. | |
3861 | (method_declarator): Local variable cl replaced by parameter id. | |
3862 | (parser_qualified_name): Now uses parameter name as a WFL node. | |
3863 | (parser_check_super_interface): New parameter wfl, for achieve | |
3864 | greater accuracy during error reports. | |
3865 | (parser_chain_incomplete_item): New parameter named location. Used, | |
3866 | along the decl, to construct the incomplete item node. | |
3867 | (java_complete_class): resolve_class now uses WFL node extracted | |
3868 | from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE | |
3869 | where appropriate. | |
3870 | (complete_method_decl): Unresolved function's argument types are WFL. | |
3871 | (resolve_class): Parameter cl is now a WFL node. | |
3872 | (resolve_and_layout): Likewise. | |
3873 | (do_resolve_class): Likewise. Try first to use cl and then do the | |
3874 | lookup on the decl when calling check_pkg_class_access. | |
3875 | (complete_class_report_errors): Use IC_TYPE in place of | |
3876 | TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency | |
3877 | instead of doing a lookup over the decl. | |
3878 | (java_check_final): Use WFL info from field tree list. | |
3879 | (lookup_cl): Rewritten and returns a statically defined WFL node. | |
3880 | (lookup_modifier_cl): Now uses information from WFL nodes. | |
3881 | (process_imports): Likewise. | |
3882 | (read_import_dir): name and cl arguments replaced by a single WFL | |
3883 | node. Function modified accordingly. | |
3884 | (find_in_imports_on_demand): Now uses WFL node. | |
3885 | (check_pkg_class_access): cl argument is now a WFL node. | |
3886 | (declare_local_variables): Fixed to use WFL nodes. | |
3887 | (resolve_expression_name): Likewise. | |
3888 | (build_method_invocation_stmt): name_combo argument renamed | |
3889 | wfl. Function modified to use WFL nodes. | |
3890 | (build_invoke): cl used as a WFL node when calling build_expr_wfl. | |
3891 | (lookup_method_invoke): cl is now a WFL node. Added missing | |
3892 | IDENTIFIER_POINTER to class type decl name. | |
3893 | ||
3894 | Tue Apr 14 15:23:29 1998 Dave Brolley <brolley@cygnus.com> | |
3895 | ||
3896 | * lang.c (init_parse): Now returns char* containing the filename. | |
3897 | ||
3898 | Fri Apr 10 11:36:04 1998 Per Bothner <bothner@cygnus.com> | |
3899 | ||
3900 | * class.c (layout_class): Mangle repeated arg types to match cc1plus. | |
3901 | ||
3902 | * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node. | |
3903 | * class.c (make_class_data): If flag_assume_compiled, initial class | |
3904 | state is CSTATE_PREPARED; make superclass and interfaces direct | |
3905 | references, rather than constant pool indexes. | |
3906 | ||
3907 | Thu Apr 9 16:10:56 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3908 | ||
3909 | * parser.y: Include flags.h. Removed debug variable pl. | |
3910 | (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl. | |
3911 | (block:): Likewise. | |
3912 | (labeled_statement_nsi:): Generate debug info when reducing | |
3913 | expression_statement:. | |
3914 | (check_pkg_class_access): get_access_flags_from_decl invokation | |
3915 | fixed for new CLASS_* flags location. | |
3916 | (source_end_java_method): Save/restore parser context when | |
3917 | entering/leaving this routine. Restore lineno to its right value | |
3918 | before calling expand_end_bindings. | |
3919 | (build_method_invocation_stmt): build_invoke called with the | |
3920 | current line information. | |
3921 | (build_invoke): New argument cl. Wrap the function call around a | |
3922 | wfl node. | |
3923 | (refine_accessible_methods_list): Changed comment, removed | |
3924 | unnecessary code. | |
3925 | * parse.h: Fixed typo in comments. | |
3926 | (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location. | |
3927 | (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro. | |
3928 | (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1, | |
3929 | parser_ccb_indent. | |
3930 | * lex.c (java_lex): Record the last closing curly bracket of a | |
3931 | function. | |
3932 | * jcf-parse.c (jcf_parse_source): Now calls | |
3933 | java_check_methods. Clarified comment, fixed typo. | |
3934 | ||
3935 | 1998-04-09 Dave Brolley <brolley@cygnus.com> | |
3936 | ||
3937 | * lang.c (init_parse): Expose for non USE_CPPLIB builds. | |
3938 | (finish_parse): Expose for non USE_CPPLIB builds. | |
3939 | ||
3940 | Wed Apr 8 13:06:23 1998 Jeffrey A Law (law@cygnus.com) | |
3941 | ||
3942 | * lang.c (lang_print_xnode): New function. | |
3943 | ||
3944 | Fri Apr 3 13:22:41 1998 Per Bothner <bothner@cygnus.com> | |
3945 | ||
3946 | * decl.c (class_dtable_decl), java-tree.h: New tree node. | |
3947 | * class.c (get_dispatch_vector, get_dispatch_table): New functions | |
3948 | used to build a class's dispatch table. | |
3949 | (make_class_data): Generate dispatch table if flag_assume_compiled. | |
3950 | Set dtable of class object to address of class_dtable_decl. | |
3951 | ||
3952 | * decl.c (int_decl_processing): Make soft_badarrayindex_node | |
3953 | be volatile and have side effects - generates better code. | |
3954 | ||
3955 | * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc: | |
3956 | These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs. | |
3957 | ||
3958 | * expr.c (expand_invoke): If class is final, method is | |
3959 | effectively final, so can call it directly. | |
3960 | ||
3961 | * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros. | |
3962 | ||
3963 | * Makefile.in, Make-lang.in: Add missing $(exeext)s. | |
3964 | ||
3965 | Thu Mar 19 16:59:16 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3966 | ||
3967 | * parse.y (build_method_invocation_stmt): Removed extra argument | |
3968 | to build_invoke. | |
3969 | ||
3970 | Mon Mar 16 17:25:19 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
3971 | ||
3972 | * expr.c (dtable_indent): Now static global. | |
3973 | (expand_invoke): Now call invoke_build_dtable and | |
3974 | build_invokevirtual. | |
3975 | (invoke_build_dtable, build_invokevirtual): New functions. | |
3976 | * jcf-io.c (find_class): Defer issuing a warning by setting | |
3977 | jcf->outofsynch to 1. | |
3978 | * jcf-parse.c (jcf_out_of_synch): New function. | |
3979 | (load_class): Test this_jcf.outofsynch flag and call | |
3980 | jcf_out_of_synch accordingly. | |
3981 | * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in | |
3982 | comment indentation. | |
3983 | * lex.c (java_get_unicode): Fixed code indentation. | |
3984 | (java_lex): Create string literal. Fixed typo. Removed several | |
3985 | premature obstack_free. | |
3986 | * parse.h: New enums for name resolution and invocation mode. | |
3987 | (struct qualification): New data structure. | |
3988 | (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros. | |
3989 | (do_resolve_class, build_method_invocation_stmt, | |
3990 | breakdown_qualified, qualify_ambiguous_name, resolve_and_layout, | |
3991 | debug_line, identical_subpath_p, invocation_mode, | |
3992 | refine_accessible_methods_list, build_invoke, | |
3993 | lookup_method_invoke): New functions declared. | |
3994 | (build_invokevirtual, invoke_build_dtable, match_java_method, | |
3995 | build_field_ref, jcf_out_of_synch): New references to external | |
3996 | functions. | |
3997 | (struct parse_ctxt): Removed artificial_constructor field. | |
3998 | * parse.y: (array_type:): Type defined for this rule. | |
3999 | (class_type:): Installed default rule for interface_type:. | |
4000 | (array_type:): Now build Java array type. | |
4001 | (qualified_name:): Now use obstack_grow0. | |
4002 | (method_declaration:): Skip the artificial constructor added to | |
4003 | the list, if any. | |
4004 | (abstract_method_declaration:): Execute the code only during pass 1. | |
4005 | (block:): Installed default rule in block_statements:. | |
4006 | (block_statement:): Add the statement to the method during pass 2. | |
4007 | (statement_expression): Installed default rule for | |
4008 | method_invocation:. | |
4009 | (argument_list:): Added code to build the argument list. | |
4010 | (method_invocation:): Added call to create the method invocation | |
4011 | node. | |
4012 | (yyerror): Now use obstack_grow0. Removed bogus obstack_free. | |
4013 | (debug_line): New function for debug. | |
4014 | (complete_class_decl): No longer do something during pass 1. | |
4015 | (method_header): Use BUILD_PTR_FROM_NAME. | |
4016 | (parser_qualified_classname): Use obstack_grow0. Removed bogus | |
4017 | obstack_free. | |
4018 | (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified | |
4019 | function's main comment. | |
4020 | (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete | |
4021 | classes. | |
4022 | (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types. | |
4023 | (resolve_class): Now works with arrays. | |
4024 | (do_resolve_class, resolve_and_layout): New functions. | |
4025 | (java_check_regular_methods): Reverse method list before and after | |
4026 | having processed it. No longer set ctxp->artificial_constructor. | |
4027 | (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch | |
4028 | accordingly. Fixed typo in issued error message. Now use | |
4029 | obstack_grow0. | |
4030 | (find_in_imports_on_demand): Now use obstack_grow0. | |
4031 | (declare_local_variables): Use BUILD_PTR_FROM_NAME. | |
4032 | (source_end_java_method): Call expand_expr_stmt instead of | |
4033 | expand_expr. Calls it before calling expand_function_end. | |
4034 | (java_method_add_stmt): Do nothing if errors were found during | |
4035 | parsing. | |
4036 | (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo. | |
4037 | (build_method_invocation_stmt, build_invoke, invocation_mode, | |
4038 | lookup_method_invoke, refine_accessible_methods_list, | |
4039 | qualify_ambiguous_name, breakdown_qualified, identical_subpath_p): | |
4040 | New functions. | |
4041 | * typeck.c (build_java_signature): Properly end method signature | |
4042 | if return type skipped. | |
4043 | (match_java_method): New function. | |
4044 | ||
4045 | Mon Mar 16 10:40:47 1998 Per Bothner <bothner@cygnus.com> | |
4046 | ||
4047 | * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode. | |
4048 | ||
4049 | Wed Feb 25 08:55:49 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4050 | ||
4051 | * expr.c (build_invoke_non_interface): New function. | |
4052 | (methods_ident, ncode_ident): Now static globals. | |
4053 | (expand_invoke): Use build_invoke_non_interface. | |
4054 | * java-tree.h (struct lang_decl): New field function_decl_body. | |
4055 | (DECL_FUNCTION_BODY): New macro. | |
4056 | * jcf-parse.c (jcf_parse_source): Deeper check before setting | |
4057 | CLASS_FROM_SOURCE_P. | |
4058 | (parse_source_file): Fixed typos. Call java_layout_parsed_class | |
4059 | before starting pass 2. Call to java_generate_parsed_class replaced | |
4060 | by java_register_parsed_class. | |
4061 | * lex.c: Fixed typo in header. Some line width related formating. | |
4062 | * lex.h: Some line width related formating. | |
4063 | * parse.h (source_end_java_method, resolve_expression_name, | |
4064 | complete_class_decl, maybe_create_class_interface_decl, | |
4065 | check_class_interface_creation): New static function declarations. | |
4066 | (java_layout_parsed_class, java_method_add_stmt): New function | |
4067 | declarations. | |
4068 | (struct parser_ctxt): Field mark_class_generate removed. New | |
4069 | fields class_list and artificial_constructor. | |
4070 | * parse.y: Fixed typo in header. | |
4071 | (class_declaration:): Call complete_class_decl when class body | |
4072 | parsed. | |
4073 | (method_declaration:): Call source_end_java_method in pass 2 when | |
4074 | the method body is defined. | |
4075 | (postfix_expression:): Do expression name resolution on sub-rule | |
4076 | name during pass 2. | |
4077 | (create_class, create_interface): Merged common pieces. | |
4078 | (check_class_interface_creation, maybe_create_class_interface_decl): | |
4079 | New functions. | |
4080 | (complete_class_decl): New function. | |
4081 | (register_fields): Fixed line width related typo. | |
4082 | (method_header): Correctly skip first argument when fixing | |
4083 | argument line. Changed the loop. | |
4084 | (java_check_circular_reference): Now use ctxp->class_list. | |
4085 | (java_complete_class): Removed start/stop marking. | |
4086 | (java_check_regular_methods): Now takes a class decl as an | |
4087 | argument. Add default constructor if none were encountered. | |
4088 | (java_check_methods): Now use ctxp->class_list. Changed call to | |
4089 | java_check_regular_methods. | |
4090 | (source_start_java_method): Set DECL_ARG_TYPE for each function | |
4091 | arguments. | |
4092 | (source_end_java_method, java_method_add_stmt): New functions. | |
4093 | (java_generate_parsed_class): No longer exists. | |
4094 | (java_layout_parsed_class, java_register_parsed_class): New functions. | |
4095 | (resolve_expression_name): New function. | |
4096 | ||
4097 | Thu Feb 12 11:54:28 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4098 | ||
4099 | * jcf-parse.c: (parse_source_file): Check on errors after init lex. | |
4100 | * lex.c: (java_init_lex): Defer ctxp->java_pass initialization | |
4101 | until pass initializations are done. Call read_import_dir with | |
4102 | pass set to 0. | |
4103 | * parse.h: (lookup_modifier_cl): New function declared. | |
4104 | (INTERFACE_FIELD_MODIFIERS): New macro. | |
4105 | (OBSOLETE_MODIFIER_WARNING): New macro. | |
4106 | * parse.y: (register_fields): Class type and current field name in | |
4107 | local variables. Check modifier(s) if adding field(s) to an interface. | |
4108 | (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING | |
4109 | and report errors using the faulty modifier line context. | |
4110 | (lookup_modifier_cl): New function. | |
4111 | (read_import_dir): Detect and report default import processing | |
4112 | failure. | |
4113 | ||
4114 | 1998-02-11 Brendan Kehoe <brendan@cygnus.com> | |
4115 | ||
4116 | Add a pair of -fassume-compiled/-fno-assume-compiled options. | |
4117 | * class.c (is_compiled_class): Return 1 after making sure it | |
4118 | qualifies as loaded, if FLAG_ASSUME_COMPILED is set. | |
4119 | * lang-options.h: Add -fassume-compiled/-fno-assume-compiled. | |
4120 | * java-tree.h (flag_assume_compiled): Add decl. | |
4121 | * lang.c (lang_f_options): Add the flag. | |
4122 | (flag_assume_compiled): Add decl, default to 0. | |
4123 | ||
4124 | Wed Feb 11 11:27:59 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4125 | ||
4126 | * class.c (class_depth): Call to load_class uses extra VERBOSE arg. | |
4127 | (is_compiled_class): Likewise. | |
4128 | (layout_class): Likewise. | |
4129 | (layout_class): Detect and lay out classes defined in source code. | |
4130 | (interface_of_p, add_interface_do, may_add_interface): New | |
4131 | function. | |
4132 | (add_interface): Now use add_interface_do. | |
4133 | (add_method_1): New function. | |
4134 | (add_method): Now use add_method_1. | |
4135 | (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG. | |
4136 | (complete_start_java_method): New function. | |
4137 | (start_java_mehod): Now call complete_start_java_method. | |
4138 | * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg. | |
4139 | (expand_invoke): Likewise and fixed typo. | |
4140 | *gjava.c: (print_super_field): Use new argument to find_class | |
4141 | DO_CLASS_FILE. | |
4142 | (main): Likewise. | |
4143 | *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE. | |
4144 | (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME, | |
4145 | QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on | |
4146 | IDENTIFIER_NODE. | |
4147 | (CLASS_COMPLETE_P): New flag on TYPE_DECL. | |
4148 | (add_method_1, push_class): New prototypes. | |
4149 | *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument. | |
4150 | *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip | |
4151 | directory where the class was found. | |
4152 | (find_class): New argument DO_CLASS_FILE. Function find_class | |
4153 | modified accordingly. | |
4154 | *jcf-parse.c: (fix_class_path): New function. | |
4155 | (load_class): Use new VERBOSE argument. load_class now finds and | |
4156 | loads/parses .class/.java files. Save read_state of current_jcf | |
4157 | if necessary. | |
4158 | (java_parser_abort_on_error): New macro. | |
4159 | (jcf_parse_source, parse_source_file): New function. | |
4160 | (jcf_parse): Fixed typo. | |
4161 | (yyparse): Call parse_source_file () only. | |
4162 | (process_zip_dir): Fixed typo, fix zdir->filename_length when | |
4163 | writing the real class name back in the zip directory entry. | |
4164 | (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null. | |
4165 | (jcf_figure_file_type): Fixed bogus alloc and bcopy. | |
4166 | *jcf.h: (typedef struct JCF): New fields java_source and zipd. | |
4167 | (find_class): Prototype fixed. | |
4168 | *lex.c: Added 1998 time stamp. | |
4169 | Removed all static global variables, moved into the parser | |
4170 | context data structure.. Now include unistd.h if SEEK_SET not | |
4171 | defined. | |
4172 | (java_init_lex): Rewritten. | |
4173 | (java_sneak_unicode): Modified current unicode access in current line. | |
4174 | (java_unget_unicode): Likewise. | |
4175 | (java_allocate_new_line): New allocation management. | |
4176 | (java_read_char): Modified access and storage of unget_utf8_value. | |
4177 | New way of processing current unicode. | |
4178 | (java_store_unicode, java_read_unicode): Fixed typo in declaration. | |
4179 | (java_get_unicode): Now use the parser context. | |
4180 | (java_lineterminator): Likewise. | |
4181 | (java_lex): Now used java_lval argument (pointer to YYSTYPE), part | |
4182 | of the reentrant parser implementation. Function now use the | |
4183 | parser context data structure and java_lval. Fixed production of | |
4184 | the float and double constant "out of range" error message. Fixed | |
4185 | obstack use. Return integer value when hitting a modifier. Now | |
4186 | return type for TRUE, FALSE and other predefined types. Return | |
4187 | identifier as a TREE_LIST list containing the current line context | |
4188 | as the TREE_VALUE sub-node. | |
4189 | (java_unicode_2_utf8): Fixed typo in declaration. | |
4190 | (java_lex_error): Now use the parser context data structure. | |
4191 | *lex.h: Added 1998 time stamp. | |
4192 | (struct java_line): New fields ref_count and next. | |
4193 | (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN, | |
4194 | JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros. | |
4195 | (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed. | |
4196 | *parse.h: Added 1998 time stamp. | |
4197 | (java_parse_source_file): Renamed from parse_source_file. | |
4198 | (YYERROR_NOW, YYNOT_TWICE): Fixed. | |
4199 | (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS, | |
4200 | INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS, | |
4201 | JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL, | |
4202 | THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS, | |
4203 | END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class, | |
4204 | CLASS_OR_INTERFACE, INCOMPLETE_P): New macros. | |
4205 | (struct parser_ctxt): New data structure to keep the parser context. | |
4206 | *parse.y: Added 1998 time stamp, got rid of static global variables. | |
4207 | (java_error_count, ctxp): New global variables. | |
4208 | (%union): New value field. | |
4209 | (numeric_type, integral_type): Rules removed. | |
4210 | (primitive_type): Rule defined to handle integral, float, double and | |
4211 | boolean types. | |
4212 | (qualified_name, package_declaration, | |
4213 | single_type_import_declaration, type_import_on_demand_declaration, | |
4214 | modifiers, class_declaration, super, interfaces, | |
4215 | interface_type_list, class_body, field_declaration, | |
4216 | field_declaration, variable_declarators, variable_declarator, | |
4217 | variable_declarator_id, method_declaration, method_header, | |
4218 | formal_parameter_list, formal_parameter, method_body, block, | |
4219 | static, interface_declaration, extends_interfaces, | |
4220 | abstract_method_declaration, local_variable_declarators): Rules now | |
4221 | define actions. | |
4222 | (force_error, do_warning): New global statics. | |
4223 | (push_parser_context, parser_context_save_global, | |
4224 | parser_context_restore_global, pop_parser_context): New functions. | |
4225 | (yyerror): Now uses the global parser context. Fixed use of obstack. | |
4226 | (parse_error, parse_error_context, parse_warning_context, | |
4227 | java_accstring_lookup, redefinition_error, check_modifiers, | |
4228 | parser_add_interface, create_interface, create_class, find_field, | |
4229 | duplicate_declaration_error, register_fields, method_header, | |
4230 | check_modifiers_consistency, check_abstract_method_header, | |
4231 | method_declarator, parser_qualified_classname, | |
4232 | parser_check_super_interface, parser_check_super, | |
4233 | parser_chain_incomplete_item, java_check_circular_reference, | |
4234 | layout_class_from_source, java_complete_class, | |
4235 | complete_method_decl, resolve_class, complete_class_report_errors, | |
4236 | java_check_final, check_method_redefinition, | |
4237 | java_check_regular_methods, java_check_abstract_methods, | |
4238 | java_check_methods, lookup_java_interface_method2, | |
4239 | lookup_java_method2, lookup_cl, find_name_in_single_imports, | |
4240 | process_imports, find_in_imports, read_import_entry, | |
4241 | read_import_dir, find_in_imports_on_demand, | |
4242 | check_pkg_class_access, not_builtin_p, declare_local_variables, | |
4243 | source_start_java_method, java_generate_parsed_class): New | |
4244 | functions. | |
4245 | *typeck.c: (signature_include_return): New global variable. | |
4246 | (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether | |
4247 | to add the function returned type in the signature. | |
4248 | ||
4249 | 1998-02-09 Brendan Kehoe <brendan@cygnus.com> | |
4250 | ||
4251 | * jcf-io.c (open_in_zip): Use strncmp and LEN. | |
4252 | ||
4253 | Thu Jan 29 16:12:13 1998 Dave Brolley <brolley@cygnus.com> | |
4254 | ||
4255 | * Make-lang.in (java.info): Added. | |
4256 | (java.install-info): Added | |
4257 | ||
4258 | 1998-01-27 Brendan Kehoe <brendan@cygnus.com> | |
4259 | ||
4260 | * Makefile.in (clean): Also remove java/parse.c. | |
4261 | ||
4262 | 1998-01-26 Brendan Kehoe <brendan@cygnus.com> | |
4263 | ||
4264 | Add a pair of -fbounds-check/-fno-bounds-check options. | |
4265 | * lang.c (lang_decode_option): Add code to grok arguments. | |
4266 | (flag_bounds_check): Add decl. | |
4267 | (lang_f_options): New array w/ the option in it. | |
4268 | * java-tree.h (flag_bounds_check): Add decl. | |
4269 | * lang-options.h: New file. | |
4270 | * expr.c (build_java_arrayaccess): Use flag_bounds_check instead | |
4271 | of a static macro value. | |
4272 | (JAVA_ARRAY_EXCEPTION): Delete macro. | |
4273 | ||
4274 | Fri Jan 23 14:19:47 1998 Per Bothner <bothner@cygnus.com> | |
4275 | ||
4276 | * typeck.c (build_java_array_type): Fix two bugs in previous change. | |
4277 | * expr.c (build_anewarray): Add missing promote_type. | |
4278 | ||
4279 | Thu Jan 22 17:43:45 1998 Per Bothner <bothner@cygnus.com> | |
4280 | ||
4281 | Add array types with known length to optimize bounds checking. | |
4282 | * typeck.c (build_java_array_type): Take length parameter. | |
4283 | (java_array_type_length, build_prim_array_type): New functions. | |
4284 | * java-tree.h: Update for new functions. | |
4285 | * expr.c, typeck.c, verify.c: Update build_java_array_type calls. | |
4286 | * class.c: Use build_prim_array_type. | |
4287 | * expr.c (can_widen_reference_to): Handle known-length array types. | |
4288 | (verify_jvm_instructions): Keep track of integer push instructions | |
4289 | followed by newarray/anewarray, so we can build known-length arrays. | |
4290 | (JAVA_ARRAY_DATA_OFFSET): Replace by ... | |
4291 | (java_array_data_offset): New function. | |
4292 | (build_java_array_length_access): New function. Optimize if constant. | |
4293 | (build_java_arrayaccess): Constant fold bounds check. | |
4294 | (expand_java_newarray, expand_java_anewarray): Replaced by ... | |
4295 | (build_newarray, build_anewarray): New functions. | |
4296 | (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray. | |
4297 | * verify.c (merge_types): Handle known-lengh array types. | |
4298 | ||
4299 | Mon Jan 19 13:09:25 1998 Per Bothner <bothner@cygnus.com> | |
4300 | ||
4301 | * expr.c (expand_byte_code): Fix performace bug, which caused | |
4302 | searching linenumber_table to be linear rather than constant. | |
4303 | ||
4304 | Fri Dec 12 19:18:42 1997 Per Bothner <bothner@cygnus.com> | |
4305 | ||
4306 | * Makefile.in (BISON, BISONFLAGS): Add missing macros. | |
4307 | ||
4308 | * decl.c, java-tree.h (soft_fmod_node): New global. | |
4309 | * decl.c (init_decl_processing): Define __builtin_fmod. | |
4310 | * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE | |
4311 | using __builtin_fmod. | |
4312 | ||
4313 | Thu Dec 4 13:22:59 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4314 | ||
4315 | * keyword.h: New file, output of keyword.gperf as processed by | |
4316 | gperf. | |
4317 | * lex.c (java_lex_init): Initialize java_error_flag. | |
4318 | * parse.c (YYERROR_NOW): Uses java_error_flag. | |
4319 | * parse.y: New static java_error_flag. Useless definition of | |
4320 | buffer_error gone. | |
4321 | * parse.y (java_error): Portable error recovery using | |
4322 | java_error_flag (not yet completely tuned). | |
4323 | ||
4324 | 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com> | |
4325 | ||
4326 | * Makefile.in (parse.c): Use $(srcdir) for parse.y. | |
4327 | ||
4328 | Wed Dec 3 18:37:42 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4329 | ||
4330 | * Makefile.in: (JAVA_OBJS): New object jcf-parse.o. | |
4331 | (parse.c, lex.c, keyword.h): New rules for Java source code | |
4332 | front-end. | |
4333 | * parse.c: Renamed into jcf-parse.c. | |
4334 | * jcf-parse.c (yyparse): Invoke the parser to process Java source code. | |
4335 | * keyword.gperf: New file, Java keywords. | |
4336 | * parse.y: New file, Java language grammar. | |
4337 | * parse.h: New file, Java language grammar definitions. | |
4338 | * lex.c: New file, Java language lexer. | |
4339 | * lex.h: New file, Java language lexer definitions. | |
4340 | ||
4341 | Wed Dec 3 17:00:17 1997 Per Bothner <bothner@cygnus.com> | |
4342 | ||
4343 | * decl.c (clinit_identifier_node), java-tree.h: New global. | |
4344 | * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed. | |
4345 | * verify.c (verify_jvm_instructions): Inline use of removed macros. | |
4346 | * expr.c (expand_java_field_op): Check for invalid assignment | |
4347 | to final field. | |
4348 | ||
4349 | * jcf-reader.c (get_attribute): Test for wrong attribute length. | |
4350 | ||
4351 | Mon Oct 27 17:46:36 1997 Per Bothner <bothner@cygnus.com> | |
4352 | ||
4353 | * verify.c (verify_jvm_instructions): When processing a handler, | |
4354 | attempt to set the current_subr to the right value. | |
4355 | (More complicated code combines Sep 17 and Oct 22 versions.) | |
4356 | ||
4357 | Fri Oct 24 11:36:54 1997 Per Bothner <bothner@cygnus.com> | |
4358 | ||
4359 | * class.c (push_class): Figure out (guess) name of source file. | |
4360 | * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl. | |
4361 | (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE. | |
4362 | (parse_class_file): Change return type from int to void. | |
4363 | Call debug_start_source_file/debug_end_source_file. | |
4364 | ||
4365 | * expr.c (build_java_binop): Fix masking 2nd operand. | |
4366 | * decl.c (init_decl_processing): Set sizetype first. | |
4367 | ||
4368 | Wed Oct 22 19:39:05 1997 Per Bothner <bothner@cygnus.com> | |
4369 | ||
4370 | * verify.c (verify_jvm_instructions): Don't set current_subr to NULL. | |
4371 | (Revert Sep 17 change.) | |
4372 | ||
4373 | Tue Oct 21 15:09:02 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4374 | ||
4375 | * parse.c (process_zip_dir): Skip ZIP entries not bearing the | |
4376 | .class extension in their name and fix thing so we don't process | |
4377 | them parse_zip_file_entries(). | |
4378 | (parse_zip_file_entries): Cleaned unused local variables. | |
4379 | ||
4380 | Mon Oct 20 14:52:42 1997 Per Bothner <bothner@cygnus.com> | |
4381 | ||
4382 | * expr.c (can_widen_reference_to): Allows equal array element types. | |
4383 | (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index). | |
4384 | * jcf-dump.c (RET): Get (and print) index. | |
4385 | ||
4386 | * verify.c (verify_jvm_instructions case OPCODE_anewarray): | |
4387 | Promote element type to POINTER_TYPE. | |
4388 | ||
4389 | Mon Oct 20 13:40:41 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4390 | ||
4391 | * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir, | |
4392 | find_in_current_zip, jcf_figure_file_type): Moved from | |
4393 | jcf-reader.c to parse.c. | |
4394 | * zextract.c: (read_zip_archive): takes file_comment_length possible | |
4395 | field into account. | |
4396 | ||
4397 | Mon Oct 20 11:45:06 1997 Per Bothner <bothner@cygnus.com> | |
4398 | ||
4399 | * verify.c (verify_jvm_instructions): Var can also be promoted to int. | |
4400 | ||
4401 | * verify.c (merge_types): Handle array types even better ... | |
4402 | ||
4403 | Fri Oct 17 15:56:37 1997 Per Bothner <bothner@cygnus.com> | |
4404 | ||
4405 | * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND. | |
4406 | ||
4407 | * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL. | |
4408 | * class.c (make_class_data): Don't build fields_decl if no fields. | |
4409 | When building fields_decl, skip if DECL_ARTIFICAL. | |
4410 | ||
4411 | * expr.c (java_stack_swap): Update stack_type_map. | |
4412 | * verify.c (merge_types): Handle array types better. | |
4413 | ||
4414 | Wed Oct 15 18:09:45 1997 Per Bothner <bothner@cygnus.com> | |
4415 | ||
4416 | * class.c (add_field): Don't promote short integral fields to | |
4417 | int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't. | |
4418 | * expr.c (push_value): Promote and convert short integral values. | |
4419 | ||
4420 | * decl.c, java-tree.h (integer_two_node): New constant node. | |
4421 | * verify.c (merge_types): Check for TYPE_RETURN_ADDR. | |
4422 | ||
4423 | Wed Oct 15 17:04:50 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4424 | ||
4425 | * class.c (append_gpp_mangled_type): Use function argument | |
4426 | unpromoted type to generate mangled name. | |
4427 | ||
4428 | Mon Oct 13 16:52:55 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4429 | ||
4430 | * constants.c (build_constant_data_ref): Now uses current_class | |
4431 | instead of main_class. | |
4432 | (build_constants_constructor): Now uses current_class instead of | |
4433 | main_class. | |
4434 | * zipfile.h: (struct ZipFileCache): Now defined here. Declaration | |
4435 | of the global variable SeepZipFiles done here. | |
4436 | * zextract.c (read_zip_archive): extra_field optional field taken | |
4437 | into account while computing the position of the class file in the | |
4438 | archive. | |
4439 | * verify.c (verify_jvm_instructions): Use current_jcf to search | |
4440 | the constant pool. | |
4441 | * parse.c (load_class): First search for the class to load in the | |
4442 | current zip file. Saves current_jcf (restored before returning | |
4443 | from that function). Don't call JCF_FINISH in the class was found | |
4444 | in the current ZIP file. | |
4445 | (jcf_parse): If the class was found in the current ZIP file, save | |
4446 | its tree_constant_pool (for later reuse). | |
4447 | (parse_class_file): New function. Process each method defined in | |
4448 | the current class and record the class as to be later registered. | |
4449 | (yyparse): Rewritten. Figure the type of the current file and switch | |
4450 | accordingly. | |
4451 | * lang.c: New global variable current_jcf. | |
4452 | (lang_init): Removed compiling_from_source test (done later, in | |
4453 | yyparse). Removed call the jcf_parse (). | |
4454 | * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values. | |
4455 | (typedef struct JCF): New fields seen_in_zip (to mark a class found | |
4456 | in the current ZIP file) and zip_offset (offset to the class data in | |
4457 | the current zip file). | |
4458 | * jcf-reader.c: zipfile.h included. | |
4459 | localToFile: New ZipFileCache static global variable | |
4460 | (parse_zip_file_entries): New function. Browse the current ZIP | |
4461 | file directory and process each class found. | |
4462 | (process_zip_dir): New function. Register each class found in the | |
4463 | ZIP file directory. The class aren't parsed but a valid JCF is | |
4464 | link to each of them. | |
4465 | (find_in_current_zip): New function. Search for a class in the | |
4466 | current ZIP file directory. If found, prepare the class so that it | |
4467 | can be loaded. | |
4468 | (jcf_figure_file_type): New function. Examine the file structure | |
4469 | to figure a class file, a ZIP file. If none of these categories are | |
4470 | matched, a source file is assumed. | |
4471 | * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h). | |
4472 | SeenZipFile: New global variable. | |
4473 | (open_in_zip): Use zipmember's length to accelerate the search for | |
4474 | a member. If zipmember was NULL and zip file successfully read, | |
4475 | return 0. | |
4476 | * java-tree.h: New global variable current_jcf declared. Added | |
4477 | declaration for current_constant_pool_tags, current_constant_pool_data, | |
4478 | current_constant_pool_length, current_constant_pool_data_ref. | |
4479 | (struct lang_type): Augmented with two fields. struct JCF *jcf (to | |
4480 | store the JCF of classes seen in a zip file) and tree *constant_pool | |
4481 | (to save a loaded class constant pool). current_class declared here. | |
4482 | * expr.c (expand_invoke): Use current_jcf instead of main_jcf to | |
4483 | retrieve method_ref_constant. | |
4484 | (PUSHC): java_push_constant_from_pool now uses current_jcf. | |
4485 | (OBJECT): get_class_constant now uses current_jcf. | |
4486 | (ARRAY_NEW_PTR): get_class_constant now uses current_jcf. | |
4487 | (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf. | |
4488 | (expand_invoke): Now uses current_class instead of main_class | |
4489 | (build_class_init): Now uses current_class instead of main_class | |
4490 | * class.c: New static global variable registered_class. | |
4491 | (register_class): New function. | |
4492 | (emit_register_class): Modified to use registered_class instead of | |
4493 | main_class | |
4494 | (is_compiled_class): Now take into account class seen in the archive. | |
4495 | ||
4496 | Mon Oct 6 12:03:23 1997 Per Bothner <bothner@cygnus.com> | |
4497 | ||
4498 | * except.h: Renamed to: java-except.h. | |
4499 | * parse.c, except.c, expr.c, verify.c: Update #include accordingly. | |
4500 | * except.c: Add semi-working (commented out) implementation. | |
4501 | ||
4502 | * expr.c (expand_iinc): Add needed flush_quick_stack. | |
4503 | * parse.c (set_source_filename): New function. | |
4504 | (give_name_to_class): Set input_filename from package.classname.java. | |
4505 | ||
4506 | * jcf-io.c (find_class): Don't look first in ".". | |
4507 | ||
4508 | Wed Oct 1 11:26:10 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4509 | ||
4510 | * zextract.c (read_zip_archive): Now takes into account the | |
4511 | extra_field field. | |
4512 | * expr.c (can_widen_reference_to): Modified to handle sub-interfaces. | |
4513 | ||
4514 | Sat Sep 20 12:44:28 1997 Per Bothner <bothner@cygnus.com> | |
4515 | ||
4516 | * constants.c, java-tree.h (build_internal_class_name): New function. | |
4517 | (alloc_class_constant): Re-implement using build_internal_class_name. | |
4518 | * class.c (make_class_data): Likewise. | |
4519 | * class.c (hashUtf8String): Make hash algorithm match String.hashCode. | |
4520 | ||
4521 | Wed Sep 17 13:15:23 1997 Per Bothner <bothner@cygnus.com> | |
4522 | ||
4523 | * verify.c (verify_jvm_instructions): Temporarily set current_subr | |
4524 | to NULL before pushing an exception handler target. | |
4525 | ||
4526 | * expr.c (flush_quick_stack): Save from low stack indexes to high. | |
4527 | (java_stack_swap, java_stack_dup): Re-write to be safe from | |
4528 | clobbering registers. | |
4529 | (build_class_init): New function. | |
4530 | ||
4531 | Wed Sep 17 11:02:41 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4532 | ||
4533 | * typeck.c (build_java_array_type): Temporary use | |
4534 | permanent_obstack to create the array 'length' field. | |
4535 | * expr.c (lookup_label): Temporay use permanent_obstack to create | |
4536 | label if not found. | |
4537 | * class.c (push_super_field): Tempory use permanent_obstack. | |
4538 | ||
4539 | Mon Sep 15 11:33:31 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4540 | ||
4541 | * typeck.c (type_for_mode): Now handles double_type_node and | |
4542 | float_type_node. | |
4543 | * verify.c (verify_jvm_instructions): The instruction following | |
4544 | the wide bytecode is checked. OPCODE_ret added to the list of | |
4545 | wide. | |
4546 | ||
4547 | Thu Sep 11 19:45:18 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4548 | ||
4549 | * class.c (make_class): Temporary use permanent_obstack. Set the | |
4550 | class CLASS_P field to 1. | |
4551 | (push_class): Temporary use permanent_obstack. | |
4552 | (set_super_info): Temporary use permanent_obstack. | |
4553 | (add_method): Temporary use permanent_obstack, set | |
4554 | METHOD_TRANSIENT(). | |
4555 | (add_field): Temporary use permanent_obstack. Sets | |
4556 | FIELD_VOLATILE() and FIELD_TRANSIENT(). | |
4557 | (build_class_ref): Temporary use permanent_obstack if the class | |
4558 | isn't compiled. | |
4559 | (build_static_field_ref): Temporary use permanent_obstack when | |
4560 | creating field's rtl. | |
4561 | (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT, | |
4562 | ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods | |
4563 | and fields. Function finalized, as far as flag handling. | |
4564 | (push_class_static_dummy_field): Temporary use permanent_obstack. | |
4565 | (emit_register_class): Force generation of class registration at | |
4566 | -O3 or deeper. | |
4567 | * decl.c (end_java_method): Call permanent_allocation() before | |
4568 | returning. | |
4569 | * expr.c (can_widen_reference_to): Added comment to interface | |
4570 | handling, fixed typo. | |
4571 | (lookup_field): Now uses CLASS_P() to correct FIXME | |
4572 | (expand_invoke): Verification on public && !static && | |
4573 | !abstract moved into soft_lookupinterfacemethod (kaffe). | |
4574 | Use Object class dtable if objectref is an array when expanding | |
4575 | invokeinterface. | |
4576 | (java_push_constant_from_pool): Temporary use permanent_obstack | |
4577 | for CONSTANT_string | |
4578 | * parse.c (get_ref_constant): Temporary use permanent_obstack to | |
4579 | create constant references. | |
4580 | (get_constant): Temporary use permanent_obstack to create constant. | |
4581 | (load_class): Temporary use permanent_obstack to load class. | |
4582 | (jcf_parse): Temporary use permanent_obstack to perform class | |
4583 | layout. | |
4584 | * typeck.c: (parse_signature_string): Temporary use permanent_obstack. | |
4585 | (build_java_signature): Temporary use permanent_obstack. | |
4586 | * verify.c: (verify_jvm_instruction): removed unecessary verification | |
4587 | on ACC_SUPER flag. | |
4588 | * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined. | |
4589 | (FIELD_VOLATILE, FIELD_TRANSIENT): Defined. | |
4590 | (CLASS_P): Defined | |
4591 | ||
4592 | Thu Sep 11 11:57:32 1997 Per Bothner <bothner@cygnus.com> | |
4593 | ||
4594 | * class.c (append_gpp_mangled_type): Fix typo. | |
4595 | (emit_register_class): Use main_class to get class object, rather | |
4596 | than looking for no-longer-existing static decl starting with _CL. | |
4597 | * typeck.c (parse_signature_type): Promote array element type | |
4598 | if it is a RECORD_TYPE. | |
4599 | ||
4600 | Wed Sep 10 16:09:23 1997 Per Bothner <bothner@cygnus.com> | |
4601 | ||
4602 | * class.c (push_class_static_dummy_field): New function. | |
4603 | (mangle_static_field): New. Do G++-style mangling of static fields. | |
4604 | (layout_class): Mandle static fields here, not in add_field. | |
4605 | (build_class_ref): The class object is now a dummy static field. | |
4606 | * decl.c (find_local_variable): Look for best, instead of first match. | |
4607 | * expr.c (push_type): Always promote_type, not just for RECORD_TYPE. | |
4608 | (build_java_athrow): Don't check here if exception is Throwable. | |
4609 | * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN. | |
4610 | (TYPE_USED): Removed. No longer used ... | |
4611 | * parse.c (jcf_parse): Call push_class_static_dummy_field. | |
4612 | * verify.c (push_pending_label): New function. | |
4613 | (push_pending_block): Renamed to check_pending_block. | |
4614 | (merge_types): Remove unneeded suuport for TYPE_UNUSED. | |
4615 | (verify_jvm_instructions): Only reset prev_eh_ranges (to force | |
4616 | re-checking possible handlers) after a store (less wasted work). | |
4617 | Check for null handler (finally) before calling add_handler. | |
4618 | Various changes to (finally?) correctly handle try/finally. | |
4619 | ||
4620 | 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com> | |
4621 | ||
4622 | * class.c: Include stdio.h. | |
4623 | ||
4624 | Thu Sep 4 21:30:55 1997 Per Bothner <bothner@cygnus.com> | |
4625 | ||
4626 | * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS) | |
4627 | to make sure class is initialized before static/special invoke. | |
4628 | ||
4629 | * verify.c (verify_jvm_instructions): On a store instruction, | |
4630 | call find_local_variable to force pre-allocation of decl and rtx. | |
4631 | * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots. | |
4632 | ||
4633 | Wed Sep 3 16:13:23 1997 Per Bothner <bothner@cygnus.com> | |
4634 | ||
4635 | * class.c (build_class_ref): Strip off "promoted_" if need be. | |
4636 | (make_field_value): Call build_java_signature when needed. | |
4637 | (layout_class): Don't make_function_rtl if METHOD_ABSTRACT. | |
4638 | * expr.c (build_java_athrow): Don't push_value of exception. | |
4639 | (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to | |
4640 | match specification of [fd]cmp[lg] for NaNs. | |
4641 | (expand_byte_code): Add support for exception handler ranges. | |
4642 | * except.c: Add skeleton for EH code-generation. | |
4643 | * verify.c (merge_types): Treat all promoted integral types as equal. | |
4644 | * constants.c (build_constants_constructor): To force creation of | |
4645 | current_constant_pool_data_ref, call build_constant_data_ref. | |
4646 | ||
4647 | * javaop.def (lload): Fix typo. | |
4648 | * jcf-dump.c (main): Clear filename to prevent possibly-bad free. | |
4649 | ||
4650 | Tue Sep 2 17:37:25 1997 Brendan Kehoe <brendan@lisa.cygnus.com> | |
4651 | ||
4652 | * parse.c: Don't include function.h. | |
4653 | ||
4654 | Wed Aug 27 18:33:04 1997 Per Bothner <bothner@cygnus.com> | |
4655 | ||
4656 | * except.[ch]: New files. | |
4657 | * Makefile.in (JAVA_OBJS): Add except.o | |
4658 | * expr.c: Temporary warning about unimplemented exceptions. | |
4659 | * verify.c: Verify exception handlers. | |
4660 | ||
4661 | * jcf-dump.c (disassemble_method): Print exception table. | |
4662 | ||
4663 | Wed Aug 27 13:26:58 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4664 | ||
4665 | * expr.c (verify_jvm_instructions): Started a thorough | |
4666 | verification of invoke* bytecodes. | |
4667 | (expand_byte_code): flush quick stack if PC is the target of a | |
4668 | branch. and undef RET (conflicting with config/i386/i386.h). | |
4669 | (expand_java_arrayload): Fixed bogus cast, when Boolean type is | |
4670 | used. | |
4671 | (expand_invoke): Now handles invokeinterface and do more | |
4672 | verification according to the bytecode. | |
4673 | (lookup_field): Don't try to load the class if processing | |
4674 | dtable_type. | |
4675 | (can_widen_reference_to): Now handles interfaces. | |
4676 | * decl.c (init_decl_processing): New global variable | |
4677 | soft_lookupinterfacemethod_node, declared in java-tree.h. | |
4678 | Call set_super_info on string_type_node. | |
4679 | * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now | |
4680 | defined. | |
4681 | * class.c (set_super_info): Fills the CLASS_* flags according to | |
4682 | access_flags. | |
4683 | (get_access_flags_from_decl): Handles all class flags. | |
4684 | ||
4685 | Tue Aug 26 18:54:34 1997 Per Bothner <bothner@cygnus.com> | |
4686 | ||
4687 | * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC. | |
4688 | * parse.c (yyparse): Check for abstract method, and missing code. | |
4689 | * expr.c (expand_byte_code): Change interface. | |
4690 | * lang.c (put_decl_node): Print promoted types prettier. | |
4691 | * verify.c (verify_jvm_instruction): Change interface. | |
4692 | Partial support for scanning exception table. | |
4693 | For load instructions, handle promoted integral types. | |
4694 | ||
4695 | Thu Aug 21 13:48:01 1997 Per Bothner <bothner@cygnus.com> | |
4696 | ||
4697 | * verify.c: New file, with contents moved from expr.c. | |
4698 | * expr.c: Bunch of stuff (mostly verification) moved to verify.c. | |
4699 | * typeck.c (is_array_type_p): Moved here from expr.c. | |
4700 | * java-tree.h: Add some now-needed function declarations. | |
4701 | * Makefile.in (JAVA_OBJS): Added verify.o. | |
4702 | ||
4703 | Wed Aug 20 14:34:34 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4704 | ||
4705 | * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the | |
4706 | METHOD_ABSTRACT flag. | |
4707 | ||
4708 | * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4. | |
4709 | (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros. | |
4710 | (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5 | |
4711 | ||
4712 | * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global | |
4713 | variables. | |
4714 | (start_java_method): Hook for SYNCHRONIZED methods. | |
4715 | ||
4716 | * expr.c (build_java_jsr, build_java_ret): New functions | |
4717 | (JSR,PRE): New macros | |
4718 | (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured. | |
4719 | (verify_jvm_instructions): tableswitch, lookupswitch, | |
4720 | monitorenter, monitorexit, goto_w: verified. | |
4721 | (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label | |
4722 | (build_java_monitor): New function. | |
4723 | (MONITOR_OPERATION): Modified to call build_java_monitor() | |
4724 | (verify_jvm_instructions): Started a thorough verification of | |
4725 | invoke* bytecodes. | |
4726 | ||
4727 | Tue Aug 19 13:35:49 1997 Per Bothner <bothner@cygnus.com> | |
4728 | ||
4729 | Support verification of jsr/ret subroutines (used for try/finally). | |
4730 | * decl.c (return_address_type_node): New type node. | |
4731 | * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE, | |
4732 | RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR, | |
4733 | LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros. | |
4734 | (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED, | |
4735 | TYPE_USED): New macros for special types in type_map. | |
4736 | ||
4737 | * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET. | |
4738 | (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by | |
4739 | BCODE_JUMP_TARGET. | |
4740 | * expr.c (expand_byte_code): Fix logic to warn of unused instructions. | |
4741 | ||
4742 | * expr.c (can_widen_reference_to): New function. | |
4743 | (pop_type): Use it. | |
4744 | (merge_type_state): Support handling start of subroutine. | |
4745 | (push_pending_block): Return char* error message, instead of calling | |
4746 | fatal on an error. Also handle subroutines. | |
4747 | (verify_jvm_instructions): Handle errors from push_poending_block. | |
4748 | Support jsr and ret instructions. | |
4749 | ||
4750 | Tue Aug 19 13:33:36 1997 Per Bothner <bothner@cygnus.com> | |
4751 | ||
4752 | * jcf-io.c (find_classfile): Fix thinko. | |
4753 | * jcf-dump.c: Add CONVERT2 (to match changed javaop.def). | |
4754 | ||
4755 | Tue Aug 12 20:14:45 1997 Jason Merrill <jason@yorick.cygnus.com> | |
4756 | ||
4757 | * Makefile.in (BISON): Remove. | |
4758 | ||
4759 | Thu Aug 7 23:08:24 1997 Per Bothner <bothner@cygnus.com> | |
4760 | ||
4761 | * Makefile.in: Convert to autoconf. | |
4762 | * config-lang.in (outputs): Added java/Makefile. | |
4763 | ||
4764 | * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in: | |
4765 | Rename cc1java to jc1. | |
4766 | ||
4767 | * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB. | |
4768 | * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags. | |
4769 | ||
4770 | * class.c (class_depth): Do load_class if needed. | |
4771 | ||
4772 | Mostly better verification. | |
4773 | * decl.c (pushdecl): Set TYPE_STUB_DECL for a type. | |
4774 | (init_decl_processing): Change return type of soft_checkcast. | |
4775 | * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value. | |
4776 | * lang.c (put_decl_string, put_decl_node, lang_printable_name, | |
4777 | lang_print_error): New functions. | |
4778 | (lang_init): Set global hook print_error_function to lang_print_error. | |
4779 | * expr.c: In the type_map ptr_type_node is only used for null now. | |
4780 | (pop_type, merge_types): Hence ptr_type_node matches any reference. | |
4781 | (merge_types): Dererence pointer to record types before comparing. | |
4782 | (decode_newarray_type, merge_types): On error just return NULL. | |
4783 | (build_java_binop): Add preliminary implementation (with warning) | |
4784 | for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]). | |
4785 | (lookup_label): Set DECL_IGNORED_P (for dwarf2out). | |
4786 | (expand_compare, expand_java_goto, expand_java_call): Don't | |
4787 | push_pending_block, since that only makes sense when verifying. | |
4788 | (merge_type_state): Different return codes. | |
4789 | (push_pending_block): A block may need to be verified more than once. | |
4790 | (expand_byte_code): Warn about unused code at code generation time. | |
4791 | (verify_jvm_instruction): Changed logic, since code may need to be | |
4792 | re-verified if type-state has changed. Also, better error handling. | |
4793 | Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof. | |
4794 | Improve newarray, anewarray, ?aload, athrow, | |
4795 | * java-tree.h (LABEL_CHANGED): New macro. | |
4796 | ||
4797 | Tue Aug 5 12:21:27 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4798 | ||
4799 | * decl.c (soft_athrow_node): New global variable initialized. | |
4800 | * javaop.def (i2b, i2c, i2s): Invoke CONVERT2 | |
4801 | * typeck.c (convert): Added support for REAL_TYPE. | |
4802 | (convert_to_char): New function. | |
4803 | (convert): Handle CHAR_TYPE. | |
4804 | * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/ | |
4805 | SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT. | |
4806 | (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to | |
4807 | promoted type. | |
4808 | (verify_jvm_instructions): Added break a the end of bogus unop: label. | |
4809 | (OPCODE_<b|c|s>astore): Pop an int operand from the type stack | |
4810 | (OPCODE_<b|c|s>astore): Push the promoted type onto the stack | |
4811 | (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b. | |
4812 | (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified | |
4813 | to Use The Right Things. | |
4814 | (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as | |
4815 | compatible with INT. BOOLEAN is made equivalent to BYTE. | |
4816 | (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull, | |
4817 | OPCODE_ifnonnull): Now supported. | |
4818 | (build_java_athrow): New function. | |
4819 | ||
4820 | Mon Aug 4 15:46:45 1997 Per Bothner <bothner@cygnus.com> | |
4821 | ||
4822 | Rename method name <init> to match G++ (and fix mangling). | |
4823 | * class.c (layout_class): Replace method name of <init> by class name. | |
4824 | (make_method_value): Do inverse renaming of constructor from <init>. | |
4825 | * java-tree.h (DECL_CONSTRUCTOR_P): New macro. | |
4826 | * typeck.c (lookup_java_constructor): New function. | |
4827 | * expr.c (expand_invoke): If method_name is <init>, call | |
4828 | lookup_java_constructor to find constructor. | |
4829 | ||
4830 | * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double. | |
4831 | ||
4832 | Fri Aug 1 11:37:09 1997 Alexandre Petit-Bianco <apbianco@cygnus.com> | |
4833 | ||
4834 | * parse.c (get_class_constant): Modified to handle array "classes" | |
4835 | * typeck.c (set_local_type): Bug fixed when filling type_map[] with | |
4836 | wide type. | |
4837 | (convert): Modified to handle real type. | |
4838 | * java-tree.h (soft_badarrayindex_node, soft_anewarray_node, | |
4839 | soft_multianewarray, soft_newarray_node, soft_throw_node): New global | |
4840 | variables declared. | |
4841 | * decl.c (soft_badarrayindex_node, soft_anewarray_node, | |
4842 | soft_multianewarray, soft_newarray_node, soft_throw_node): New | |
4843 | global variables initialized. | |
4844 | (find_local_variable): Handles the case of a pointer | |
4845 | (end_java_method): Restore the use of one more scope | |
4846 | * expr.c (build_java_arraynull_check, build_java_arrayaccess, | |
4847 | build_java_array_length_access, expand_java_arrayload, | |
4848 | expand_java_arraystore, expand_java_array_length, | |
4849 | expand_java_multianewarray, expand_java_anewarray, | |
4850 | build_java_check_indexed_type, is_array_type_p, | |
4851 | build_java_throw_out_of_bound_exception): New functions. | |
4852 | (STORE_INTERNAL): Now forces type of the decl to be type of the value. | |
4853 | (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore, | |
4854 | OPCODE_<t>aload): Implemented code for verification. | |
4855 | (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM | |
4856 | ARRAY_NEW_MULTI): Macro defined. | |
4857 | (CONVERT): Modified to invoke convert(). | |
4858 | (case OPCODE_aload2): Fixed index typo from 2 to 1. | |
4859 | ||
4860 | Thu Jul 31 12:48:18 1997 Per Bothner <bothner@cygnus.com> | |
4861 | ||
4862 | * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c). | |
4863 | (build_class_ref, is_compiled_class): Handle pointer-to-record types. | |
4864 | (make_class_data): Field name needs '/' as package prefix. | |
4865 | * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors. | |
4866 | ||
4867 | Fri Jul 25 11:44:21 1997 Per Bothner <bothner@cygnus.com> | |
4868 | ||
4869 | Implement debug information for local variables. | |
4870 | * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT, | |
4871 | DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC, | |
4872 | DECL_LOCAL_SLOT_CHAIN): New macros. | |
4873 | (struct lang_decl_var): New type. | |
4874 | * parse.c (give_name_to_locals): Move to decl.c. | |
4875 | * decl.c (give_name_to_locals): Re-written to Do The Right Thing. | |
4876 | (start_java_method): Re-write parameter handling. | |
4877 | (pending_local_decls): New global variable. | |
4878 | (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions. | |
4879 | (find_local_variable): Accept pc so we can skips decls not in range. | |
4880 | (struct binding_level): Add end_pc field. | |
4881 | * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels. | |
4882 | (various): Change so current pc gets passed to find_local_variable. | |
4883 | ||
4884 | * decl.c (init_decl_processing): Re-arrange fields in | |
4885 | class_type_node and and method_type_node to match kaffe 0.9.1. | |
4886 | * class.c (make_method_value, make_class_data): Update | |
4887 | initializations to match. | |
4888 | ||
4889 | Wed Jul 16 17:17:50 1997 Per Bothner <bothner@cygnus.com> | |
4890 | ||
4891 | * class.c (unicode_mangling_length, emit_unicode_mangled_name, | |
4892 | append_gpp_mangled_name, append_gpp_mangled_type): New functions. | |
4893 | (push_super_field): New function. | |
4894 | (make_class_data): Handle inheritance of class static initializer. | |
4895 | (layout_class): New name mangling. | |
4896 | * constants.c (build_constant_data_ref): Init type of data array | |
4897 | to a one-element array. | |
4898 | (build_constants_constructor): Set DECL_SIZE from complete array type. | |
4899 | * decl.c: Rename class_type, object_type etc to class_type_node, | |
4900 | object_type_node etc. Make former inherit from latter. | |
4901 | * expr.c (expand_invoke): Add cast of function address. | |
4902 | * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New. | |
4903 | * parse.c (yyparse): Don't call layout_class here. | |
4904 | * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT. | |
4905 | ||
4906 | Sat Jun 14 12:06:57 1997 Per Bothner <bothner@cygnus.com> | |
4907 | ||
4908 | * decl.c, class.c: Update method type to match latest Kaffe snapshot. | |
4909 | * constants.c (lookup_name_constant): Renamed to alloc_name_constant. | |
4910 | (alloc_class_constant): New. | |
4911 | * expr.c (expand_invoke): Make sure method's class is initialized. | |
4912 | * class.c (interits_from_p, emit_register_class): New functions. | |
4913 | * parse.c (yyparse): Call emit_register_class. | |
4914 | ||
4915 | Mon Jun 9 18:08:06 1997 Per Bothner <bothner@cygnus.com> | |
4916 | ||
4917 | * constants.c: New file, to handle constant pool. | |
4918 | * Makefile.in (JAVA_OBJS): Add constants.o. | |
4919 | * decl.c (init_decl_processing): Update, fix, finish various structs. | |
4920 | (pushdecl_top_level): New. | |
4921 | * parse.c (layout_class): Moved to class.c. | |
4922 | * expr.c (java_push_constant_from_pool): New function. | |
4923 | * class.c (build_class_ref): Make work fully | |
4924 | (make_class_data): Emit super-class, constant pool, interface vector. | |
4925 | ||
4926 | Tue Jun 3 10:14:31 1997 Per Bothner <bothner@cygnus.com> | |
4927 | ||
4928 | java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove. | |
4929 | (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New. | |
4930 | * class.c (class_depth): New function. | |
4931 | (lookup_named_class): Replaced by new function lookup_class. | |
4932 | * decl.c (object_type_node, string_type_node): New. | |
4933 | Remove various types that we no longer need. | |
4934 | * expr.c (verify_jvm_instructions): New separate verifier pass. | |
4935 | (push_type, pop_type): New functions for verifier. | |
4936 | (type_stack_dup, pop_argument_types, merge_types): Likewise. | |
4937 | (expand_byte_code): Simplify, since we assume already verified. | |
4938 | (expand_invoke): Now mostly works. | |
4939 | * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w. | |
4940 | * lang.c (main_class): Move to parse.c. Don't make_class yet. | |
4941 | * parse.c: Wait to allocate class object until we know its name. | |
4942 | (layout_class): Calculate DECL_VINDEX for each virtual method. | |
4943 | * typeck.c (get_array_type): Rename to ... | |
4944 | (build_java_array_type): ... and provide working implementation. | |
4945 | (build_java_signature): New function - build Java signature of type. | |
4946 | (set_java_signature): New function - cache signature with type. | |
4947 | (lookup_java_method): New function. | |
4948 | ||
4949 | Tue May 6 22:08:24 1997 Per Bothner <bothner@deneb.cygnus.com> | |
4950 | ||
4951 | * class.c (ident_subst): Take extra SUFFIX parameter. | |
4952 | (add_field): Set DECL_ASSEMBLER_NAME of static fields; more. | |
4953 | (set_constant_value, build_static_field_ref, is_compiled_class): New. | |
4954 | (build_class_ref): Actually implement. | |
4955 | * decl.c, java-tree.h: Renamed some xx_type to xx_type_node. | |
4956 | * decl.c (builtin_function): New. | |
4957 | (init_decl_processing): Update for current Kaffe. Declare some | |
4958 | builtin Kaffe functions. | |
4959 | * expr.c (build_address_of): New. | |
4960 | (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST): | |
4961 | Renamed (from expand_java_new etc), and added working implementations. | |
4962 | (build_field_ref): Now also handle static fields. | |
4963 | (expand_invoke): Implement invokestatic, and start implement rest. | |
4964 | * java-opcodes.h: Use javaop.def to avoid duplicated list. | |
4965 | * javaop.def: Rename invokevirt -> invokevirtual. | |
4966 | * lang.c (use_handles): Removed. | |
4967 | * parse.c: Add support for ConstantValue atribute. | |
4968 | Handle nested loading of a class. (JPOOL_UTF): New. | |
4969 | ||
4970 | Tue Mar 11 20:11:05 1997 Per Bothner <bothner@deneb.cygnus.com> | |
4971 | ||
4972 | * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case. | |
4973 | ||
4974 | Thu Feb 27 14:24:29 1997 Per Bothner <bothner@deneb.cygnus.com> | |
4975 | ||
4976 | * Make-lang.in (java.install-man): New empty rule. | |
4977 | * typeck.c (set_local_type): New function. | |
4978 | * expr.c (STORE_INTERNAL): Call find_local_variable, | |
4979 | not find_stack_slot. Call set_local_type. | |
4980 | ||
4981 | Wed Feb 12 16:11:05 1997 Per Bothner <bothner@kalessin.cygnus.com> | |
4982 | ||
4983 | * java-tree.h: Various new macros for constructing RECORD_TYPEs, | |
4984 | and building RECORD_TYPE CONSTRUCTORs. | |
4985 | Also support for creating Utf8Const objects from an INDETIFIER_NODE. | |
4986 | ||
4987 | * lang.c (use_handles): Change the default to 0. | |
4988 | * decl.c: Define and build class_type, field_type, utf8const_type. | |
4989 | * class.c (make_class_data, make_field_value, | |
4990 | get_access_flags_from_decl, build_class_ref, build_utf8_ref, | |
4991 | hashUtf8String, strLengthUtf8, mangled_classname: | |
4992 | Functions to build reflective data structures. | |
4993 | * parse.c (yyparse): Call make_class_data. | |
4994 | ||
4995 | * jcf-io.c (open_class, find_classfile): New functions. | |
4996 | * jcf-dump.c: Support reading classfile from explicitly-named | |
4997 | class file (without CLASSPATH searching). | |
4998 | ||
4999 | Thu Oct 24 14:10:16 1996 Per Bothner <bothner@deneb.cygnus.com> | |
5000 | ||
5001 | * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8. | |
5002 | * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8): | |
5003 | Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here. | |
5004 | (get_constant): Now trivial for CONSTANT_Utf8. | |
5005 | ||
5006 | * jcf.h: Make NEW_CPOOL the default. | |
5007 | * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL. | |
5008 | ||
5009 | Thu Oct 24 13:52:45 1996 Per Bothner <bothner@deneb.cygnus.com> | |
5010 | ||
5011 | New directory. |