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