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