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