1 /* Process declarations and variables for the GNU compiler for the
3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.
23 Java and all Java-based marks are trademarks or registered trademarks
24 of Sun Microsystems, Inc. in the United States and other countries.
25 The Free Software Foundation is independent of Sun Microsystems, Inc. */
27 /* Hacked by Per Bothner <bothner@cygnus.com> February 1996. */
31 #include "coretypes.h"
38 #include "java-tree.h"
44 #include "java-except.h"
48 #include "tree-inline.h"
51 #if defined (DEBUG_JAVA_BINDING_LEVELS)
52 extern void indent (void);
55 static tree
push_jvm_slot (int, tree
);
56 static tree
lookup_name_current_level (tree
);
57 static tree
push_promoted_type (const char *, tree
);
58 static struct binding_level
*make_binding_level (void);
59 static tree
create_primitive_vtable (const char *);
60 static tree
check_local_named_variable (tree
, tree
, int, int *);
61 static tree
check_local_unnamed_variable (tree
, tree
, tree
);
63 /* Name of the Cloneable class. */
64 tree java_lang_cloneable_identifier_node
;
66 /* Name of the Serializable class. */
67 tree java_io_serializable_identifier_node
;
69 /* The DECL_MAP is a mapping from (index, type) to a decl node.
70 If index < max_locals, it is the index of a local variable.
71 if index >= max_locals, then index-max_locals is a stack slot.
72 The DECL_MAP mapping is represented as a TREE_VEC whose elements
73 are a list of decls (VAR_DECL or PARM_DECL) chained by
74 DECL_LOCAL_SLOT_CHAIN; the index finds the TREE_VEC element, and then
75 we search the chain for a decl with a matching TREE_TYPE. */
77 static GTY(()) tree decl_map
;
79 /* A list of local variables VAR_DECLs for this method that we have seen
80 debug information, but we have not reached their starting (byte) PC yet. */
82 static GTY(()) tree pending_local_decls
;
84 /* Push a local variable or stack slot into the decl_map,
85 and assign it an rtl. */
87 #if defined(DEBUG_JAVA_BINDING_LEVELS)
88 int binding_depth
= 0;
89 int is_class_level
= 0;
97 for (i
= 0; i
< binding_depth
*2; i
++)
100 #endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */
102 /* Copy the value in decl into every alias in the same local variable
105 update_aliases (tree decl
, int index
)
107 tree tmp
= TREE_VEC_ELT (decl_map
, index
);
108 tree type
= TREE_TYPE (decl
);
109 while (tmp
!= NULL_TREE
)
112 && ! LOCAL_VAR_OUT_OF_SCOPE_P (tmp
)
113 && TYPE_MODE (type
) == TYPE_MODE (TREE_TYPE (tmp
)))
115 tree src
= build1 (NOP_EXPR
, TREE_TYPE (tmp
), decl
);
117 (build (MODIFY_EXPR
, TREE_TYPE (tmp
), tmp
, src
));
119 tmp
= DECL_LOCAL_SLOT_CHAIN (tmp
);
124 push_jvm_slot (int index
, tree decl
)
126 tree type
= TREE_TYPE (decl
);
129 DECL_CONTEXT (decl
) = current_function_decl
;
130 layout_decl (decl
, 0);
132 /* Look for another variable of the same mode in this slot. */
133 tmp
= TREE_VEC_ELT (decl_map
, index
);
134 while (tmp
!= NULL_TREE
)
136 if (! LOCAL_VAR_OUT_OF_SCOPE_P (tmp
)
137 && TYPE_MODE (type
) == TYPE_MODE (TREE_TYPE (tmp
)))
139 /* At the point of its creation this decl inherits whatever
141 tree src
= build1 (NOP_EXPR
, TREE_TYPE (decl
), tmp
);
143 (build (MODIFY_EXPR
, TREE_TYPE (decl
), decl
, src
));
146 tmp
= DECL_LOCAL_SLOT_CHAIN (tmp
);
149 /* Now link the decl into the decl_map. */
150 if (DECL_LANG_SPECIFIC (decl
) == NULL
)
152 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl
);
153 DECL_LOCAL_START_PC (decl
) = 0;
154 DECL_LOCAL_END_PC (decl
) = DECL_CODE_LENGTH (current_function_decl
);
155 DECL_LOCAL_SLOT_NUMBER (decl
) = index
;
157 DECL_LOCAL_SLOT_CHAIN (decl
) = TREE_VEC_ELT (decl_map
, index
);
158 TREE_VEC_ELT (decl_map
, index
) = decl
;
160 if (TREE_CODE (decl
) != PARM_DECL
)
165 /* Find out if 'decl' passed in fits the defined PC location better than
166 'best'. Return decl if it does, return best if it doesn't. If decl
167 is returned, then updated is set to true. */
170 check_local_named_variable (tree best
, tree decl
, int pc
, int *updated
)
172 if (pc
>= DECL_LOCAL_START_PC (decl
)
173 && pc
< DECL_LOCAL_END_PC (decl
))
175 if (best
== NULL_TREE
176 || (DECL_LOCAL_START_PC (decl
) > DECL_LOCAL_START_PC (best
)
177 && DECL_LOCAL_END_PC (decl
) < DECL_LOCAL_END_PC (best
)))
187 /* Find the best declaration based upon type. If 'decl' fits 'type' better
188 than 'best', return 'decl'. Otherwise return 'best'. */
191 check_local_unnamed_variable (tree best
, tree decl
, tree type
)
193 if (TREE_TYPE (decl
) == type
194 || (TREE_CODE (TREE_TYPE (decl
)) == TREE_CODE (type
)
195 && TYPE_PRECISION (TREE_TYPE (decl
)) <= 32
196 && TYPE_PRECISION (type
) <= 32
197 && TREE_CODE (type
) != POINTER_TYPE
)
198 || (TREE_CODE (TREE_TYPE (decl
)) == POINTER_TYPE
199 && type
== ptr_type_node
))
201 if (best
== NULL_TREE
202 || (TREE_TYPE (decl
) == type
&& TREE_TYPE (best
) != type
))
210 /* Find a VAR_DECL (or PARM_DECL) at local index INDEX that has type TYPE,
211 that is valid at PC (or -1 if any pc).
212 If there is no existing matching decl, allocate one. */
215 find_local_variable (int index
, tree type
, int pc
)
217 tree decl
= TREE_VEC_ELT (decl_map
, index
);
218 tree best
= NULL_TREE
;
219 int found_scoped_var
= 0;
221 /* Scan through every declaration that has been created in this slot. */
222 while (decl
!= NULL_TREE
)
224 bool has_name
= false;
225 tree name
= DECL_NAME (decl
);
226 if (name
&& IDENTIFIER_POINTER (name
))
227 has_name
= IDENTIFIER_POINTER (name
)[0] != '#';
229 /* Variables created in give_name_to_locals() have a name and have
230 a specified scope, so we can handle them specifically. We want
231 to use the specific decls created for those so they are assigned
232 the right variables in the debugging information. */
235 /* This is a variable we have a name for, so it has a scope
236 supplied in the class file. But it only matters when we
237 actually have a PC to use. If pc<0, then we are asking
238 for a stack slot and this decl won't be one of those. */
240 best
= check_local_named_variable (best
, decl
, pc
,
243 /* We scan for type information unless we found a variable in the
244 proper scope already. */
245 else if (!found_scoped_var
)
247 /* If we don't have scoping information for a variable, we use
248 a different method to look it up. */
249 best
= check_local_unnamed_variable (best
, decl
, type
);
252 decl
= DECL_LOCAL_SLOT_CHAIN (decl
);
255 if (best
!= NULL_TREE
)
258 /* If we don't find a match, create one with the type passed in.
259 Ths name of the variable is #n#m, which n is the variable index
260 in the local variable area and m is a dummy identifier for
261 uniqueness -- multiple variables may share the same local
267 sprintf (buf
, "#%d#%d", index
, uniq
++);
268 name
= get_identifier (buf
);
270 return push_jvm_slot (index
, build_decl (VAR_DECL
, name
, type
));
275 /* Same as find_local_index, except that INDEX is a stack index. */
278 find_stack_slot (int index
, tree type
)
280 return find_local_variable (index
+ DECL_MAX_LOCALS (current_function_decl
),
284 struct binding_level
GTY(())
286 /* A chain of _DECL nodes for all variables, constants, functions,
287 * and typedef types. These are in the reverse of the order supplied.
291 /* For each level, a list of shadowed outer-level local definitions
292 to be restored when this level is popped.
293 Each link is a TREE_LIST whose TREE_PURPOSE is an identifier and
294 whose TREE_VALUE is its old definition (a kind of ..._DECL node). */
297 /* For each level (except not the global one),
298 a chain of BLOCK nodes for all the levels
299 that were entered and exited one level down. */
302 /* The BLOCK node for this level, if one has been preallocated.
303 If 0, the BLOCK is allocated (if needed) when the level is popped. */
306 /* The binding level which this one is contained in (inherits from). */
307 struct binding_level
*level_chain
;
309 /* The bytecode PC that marks the end of this level. */
311 /* The bytecode PC that marks the start of this level. */
314 /* The statements in this binding level. */
317 /* An exception range associated with this binding level. */
318 struct eh_range
* GTY((skip (""))) exception_range
;
320 /* Binding depth at which this level began. Used only for debugging. */
321 unsigned binding_depth
;
324 #define NULL_BINDING_LEVEL (struct binding_level *) NULL
326 /* The binding level currently in effect. */
328 static GTY(()) struct binding_level
*current_binding_level
;
330 /* A chain of binding_level structures awaiting reuse. */
332 static GTY(()) struct binding_level
*free_binding_level
;
334 /* The outermost binding level, for names of file scope.
335 This is created when the compiler is started and exists
336 through the entire run. */
338 static GTY(()) struct binding_level
*global_binding_level
;
340 /* A PC value bigger than any PC value we may ever may encounter. */
342 #define LARGEST_PC (( (unsigned int)1 << (HOST_BITS_PER_INT - 1)) - 1)
344 /* Binding level structures are initialized by copying this one. */
346 static const struct binding_level clear_binding_level
348 NULL_TREE
, /* names */
349 NULL_TREE
, /* shadowed */
350 NULL_TREE
, /* blocks */
351 NULL_TREE
, /* this_lock */
352 NULL_BINDING_LEVEL
, /* level_chain */
353 LARGEST_PC
, /* end_pc */
356 NULL
, /* exception_range */
357 0, /* binding_depth */
361 /* A list (chain of TREE_LIST nodes) of all LABEL_DECLs in the function
362 that have names. Here so we can clear out their names' definitions
363 at the end of the function. */
365 static tree named_labels
;
367 /* A list of LABEL_DECLs from outer contexts that are currently shadowed. */
369 static tree shadowed_labels
;
372 tree java_global_trees
[JTI_MAX
];
374 /* Build (and pushdecl) a "promoted type" for all standard
375 types shorter than int. */
378 push_promoted_type (const char *name
, tree actual_type
)
380 tree type
= make_node (TREE_CODE (actual_type
));
382 tree in_min
= TYPE_MIN_VALUE (int_type_node
);
383 tree in_max
= TYPE_MAX_VALUE (int_type_node
);
385 tree in_min
= TYPE_MIN_VALUE (actual_type
);
386 tree in_max
= TYPE_MAX_VALUE (actual_type
);
388 TYPE_MIN_VALUE (type
) = copy_node (in_min
);
389 TREE_TYPE (TYPE_MIN_VALUE (type
)) = type
;
390 TYPE_MAX_VALUE (type
) = copy_node (in_max
);
391 TREE_TYPE (TYPE_MAX_VALUE (type
)) = type
;
392 TYPE_PRECISION (type
) = TYPE_PRECISION (int_type_node
);
394 pushdecl (build_decl (TYPE_DECL
, get_identifier (name
), type
));
398 /* Return a definition for a builtin function named NAME and whose data type
399 is TYPE. TYPE should be a function type with argument types.
400 FUNCTION_CODE tells later passes how to compile calls to this function.
401 See tree.h for its possible values.
403 If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME,
404 the name to be called if we can't opencode the function. If
405 ATTRS is nonzero, use that for the function's attribute list. */
408 builtin_function (const char *name
,
411 enum built_in_class
class,
412 const char *library_name
,
413 tree attrs ATTRIBUTE_UNUSED
)
415 tree decl
= build_decl (FUNCTION_DECL
, get_identifier (name
), type
);
416 DECL_EXTERNAL (decl
) = 1;
417 TREE_PUBLIC (decl
) = 1;
419 SET_DECL_ASSEMBLER_NAME (decl
, get_identifier (library_name
));
420 make_decl_rtl (decl
, NULL
);
422 DECL_BUILT_IN_CLASS (decl
) = class;
423 DECL_FUNCTION_CODE (decl
) = function_code
;
427 /* Return tree that represents a vtable for a primitive array. */
429 create_primitive_vtable (const char *name
)
434 sprintf (buf
, "_Jv_%sVTable", name
);
435 r
= build_decl (VAR_DECL
, get_identifier (buf
), ptr_type_node
);
436 DECL_EXTERNAL (r
) = 1;
448 java_init_decl_processing (void)
451 tree field
= NULL_TREE
;
454 init_class_processing ();
455 init_resource_processing ();
457 current_function_decl
= NULL
;
458 current_binding_level
= NULL_BINDING_LEVEL
;
459 free_binding_level
= NULL_BINDING_LEVEL
;
460 pushlevel (0); /* make the binding_level structure for global names */
461 global_binding_level
= current_binding_level
;
463 /* The code here must be similar to build_common_tree_nodes{,_2} in
464 tree.c, especially as to the order of initializing common nodes. */
465 error_mark_node
= make_node (ERROR_MARK
);
466 TREE_TYPE (error_mark_node
) = error_mark_node
;
468 /* Create sizetype first - needed for other types. */
469 initialize_sizetypes ();
471 byte_type_node
= make_signed_type (8);
472 pushdecl (build_decl (TYPE_DECL
, get_identifier ("byte"), byte_type_node
));
473 short_type_node
= make_signed_type (16);
474 pushdecl (build_decl (TYPE_DECL
, get_identifier ("short"), short_type_node
));
475 int_type_node
= make_signed_type (32);
476 pushdecl (build_decl (TYPE_DECL
, get_identifier ("int"), int_type_node
));
477 long_type_node
= make_signed_type (64);
478 pushdecl (build_decl (TYPE_DECL
, get_identifier ("long"), long_type_node
));
480 unsigned_byte_type_node
= make_unsigned_type (8);
481 pushdecl (build_decl (TYPE_DECL
, get_identifier ("unsigned byte"),
482 unsigned_byte_type_node
));
483 unsigned_short_type_node
= make_unsigned_type (16);
484 pushdecl (build_decl (TYPE_DECL
, get_identifier ("unsigned short"),
485 unsigned_short_type_node
));
486 unsigned_int_type_node
= make_unsigned_type (32);
487 pushdecl (build_decl (TYPE_DECL
, get_identifier ("unsigned int"),
488 unsigned_int_type_node
));
489 unsigned_long_type_node
= make_unsigned_type (64);
490 pushdecl (build_decl (TYPE_DECL
, get_identifier ("unsigned long"),
491 unsigned_long_type_node
));
493 /* This is not a java type, however tree-dfa requires a definition for
495 size_type_node
= make_unsigned_type (POINTER_SIZE
);
496 set_sizetype (size_type_node
);
498 /* Define these next since types below may used them. */
499 integer_type_node
= java_type_for_size (INT_TYPE_SIZE
, 0);
500 integer_zero_node
= build_int_2 (0, 0);
501 integer_one_node
= build_int_2 (1, 0);
502 integer_two_node
= build_int_2 (2, 0);
503 integer_four_node
= build_int_2 (4, 0);
504 integer_minus_one_node
= build_int_2 (-1, -1);
506 /* A few values used for range checking in the lexer. */
507 decimal_int_max
= build_int_2 (0x80000000, 0);
508 TREE_TYPE (decimal_int_max
) = unsigned_int_type_node
;
509 #if HOST_BITS_PER_WIDE_INT == 64
510 decimal_long_max
= build_int_2 (0x8000000000000000LL
, 0);
512 #if HOST_BITS_PER_WIDE_INT == 32
513 decimal_long_max
= build_int_2 (0, 0x80000000);
515 #error "unsupported size"
518 TREE_TYPE (decimal_long_max
) = unsigned_long_type_node
;
520 size_zero_node
= size_int (0);
521 size_one_node
= size_int (1);
522 bitsize_zero_node
= bitsize_int (0);
523 bitsize_one_node
= bitsize_int (1);
524 bitsize_unit_node
= bitsize_int (BITS_PER_UNIT
);
526 long_zero_node
= build_int_2 (0, 0);
527 TREE_TYPE (long_zero_node
) = long_type_node
;
529 void_type_node
= make_node (VOID_TYPE
);
530 pushdecl (build_decl (TYPE_DECL
, get_identifier ("void"), void_type_node
));
531 layout_type (void_type_node
); /* Uses size_zero_node */
532 ptr_type_node
= build_pointer_type (void_type_node
);
533 t
= make_node (VOID_TYPE
);
534 layout_type (t
); /* Uses size_zero_node */
535 return_address_type_node
= build_pointer_type (t
);
537 null_pointer_node
= build_int_2 (0, 0);
538 TREE_TYPE (null_pointer_node
) = ptr_type_node
;
541 /* Make a type to be the domain of a few array types
542 whose domains don't really matter.
543 200 is small enough that it always fits in size_t
544 and large enough that it can hold most function names for the
545 initializations of __FUNCTION__ and __PRETTY_FUNCTION__. */
546 short_array_type_node
= build_prim_array_type (short_type_node
, 200);
548 char_type_node
= make_node (CHAR_TYPE
);
549 TYPE_PRECISION (char_type_node
) = 16;
550 fixup_unsigned_type (char_type_node
);
551 pushdecl (build_decl (TYPE_DECL
, get_identifier ("char"), char_type_node
));
553 boolean_type_node
= make_node (BOOLEAN_TYPE
);
554 TYPE_PRECISION (boolean_type_node
) = 1;
555 fixup_unsigned_type (boolean_type_node
);
556 pushdecl (build_decl (TYPE_DECL
, get_identifier ("boolean"),
558 boolean_false_node
= TYPE_MIN_VALUE (boolean_type_node
);
559 boolean_true_node
= TYPE_MAX_VALUE (boolean_type_node
);
561 promoted_byte_type_node
562 = push_promoted_type ("promoted_byte", byte_type_node
);
563 promoted_short_type_node
564 = push_promoted_type ("promoted_short", short_type_node
);
565 promoted_char_type_node
566 = push_promoted_type ("promoted_char", char_type_node
);
567 promoted_boolean_type_node
568 = push_promoted_type ("promoted_boolean", boolean_type_node
);
570 float_type_node
= make_node (REAL_TYPE
);
571 TYPE_PRECISION (float_type_node
) = 32;
572 pushdecl (build_decl (TYPE_DECL
, get_identifier ("float"),
574 layout_type (float_type_node
);
576 double_type_node
= make_node (REAL_TYPE
);
577 TYPE_PRECISION (double_type_node
) = 64;
578 pushdecl (build_decl (TYPE_DECL
, get_identifier ("double"),
580 layout_type (double_type_node
);
582 float_zero_node
= build_real (float_type_node
, dconst0
);
583 double_zero_node
= build_real (double_type_node
, dconst0
);
585 /* These are the vtables for arrays of primitives. */
586 boolean_array_vtable
= create_primitive_vtable ("boolean");
587 byte_array_vtable
= create_primitive_vtable ("byte");
588 char_array_vtable
= create_primitive_vtable ("char");
589 short_array_vtable
= create_primitive_vtable ("short");
590 int_array_vtable
= create_primitive_vtable ("int");
591 long_array_vtable
= create_primitive_vtable ("long");
592 float_array_vtable
= create_primitive_vtable ("float");
593 double_array_vtable
= create_primitive_vtable ("double");
595 one_elt_array_domain_type
= build_index_type (integer_one_node
);
596 utf8const_type
= make_node (RECORD_TYPE
);
597 PUSH_FIELD (utf8const_type
, field
, "hash", unsigned_short_type_node
);
598 PUSH_FIELD (utf8const_type
, field
, "length", unsigned_short_type_node
);
599 FINISH_RECORD (utf8const_type
);
600 utf8const_ptr_type
= build_pointer_type (utf8const_type
);
602 atable_type
= build_array_type (ptr_type_node
,
603 one_elt_array_domain_type
);
604 TYPE_NONALIASED_COMPONENT (atable_type
) = 1;
605 atable_ptr_type
= build_pointer_type (atable_type
);
607 symbol_type
= make_node (RECORD_TYPE
);
608 PUSH_FIELD (symbol_type
, field
, "clname", utf8const_ptr_type
);
609 PUSH_FIELD (symbol_type
, field
, "name", utf8const_ptr_type
);
610 PUSH_FIELD (symbol_type
, field
, "signature", utf8const_ptr_type
);
611 FINISH_RECORD (symbol_type
);
613 symbols_array_type
= build_array_type (symbol_type
,
614 one_elt_array_domain_type
);
615 symbols_array_ptr_type
= build_pointer_type (symbols_array_type
);
617 /* As you're adding items here, please update the code right after
618 this section, so that the filename containing the source code of
619 the pre-defined class gets registered correctly. */
620 unqualified_object_id_node
= get_identifier ("Object");
621 object_type_node
= lookup_class (get_identifier ("java.lang.Object"));
622 object_ptr_type_node
= promote_type (object_type_node
);
623 string_type_node
= lookup_class (get_identifier ("java.lang.String"));
624 string_ptr_type_node
= promote_type (string_type_node
);
625 class_type_node
= lookup_class (get_identifier ("java.lang.Class"));
626 throwable_type_node
= lookup_class (get_identifier ("java.lang.Throwable"));
627 exception_type_node
= lookup_class (get_identifier ("java.lang.Exception"));
628 runtime_exception_type_node
=
629 lookup_class (get_identifier ("java.lang.RuntimeException"));
630 error_exception_type_node
=
631 lookup_class (get_identifier ("java.lang.Error"));
633 rawdata_ptr_type_node
634 = promote_type (lookup_class (get_identifier ("gnu.gcj.RawData")));
636 add_predefined_file (get_identifier ("java/lang/Class.java"));
637 add_predefined_file (get_identifier ("java/lang/Error.java"));
638 add_predefined_file (get_identifier ("java/lang/Object.java"));
639 add_predefined_file (get_identifier ("java/lang/RuntimeException.java"));
640 add_predefined_file (get_identifier ("java/lang/String.java"));
641 add_predefined_file (get_identifier ("java/lang/Throwable.java"));
642 add_predefined_file (get_identifier ("gnu/gcj/RawData.java"));
643 add_predefined_file (get_identifier ("java/lang/Exception.java"));
644 add_predefined_file (get_identifier ("java/lang/ClassNotFoundException.java"));
645 add_predefined_file (get_identifier ("java/lang/NoClassDefFoundError.java"));
647 methodtable_type
= make_node (RECORD_TYPE
);
648 layout_type (methodtable_type
);
649 build_decl (TYPE_DECL
, get_identifier ("methodtable"), methodtable_type
);
650 methodtable_ptr_type
= build_pointer_type (methodtable_type
);
652 TYPE_identifier_node
= get_identifier ("TYPE");
653 init_identifier_node
= get_identifier ("<init>");
654 clinit_identifier_node
= get_identifier ("<clinit>");
655 finit_identifier_node
= get_identifier ("finit$");
656 instinit_identifier_node
= get_identifier ("instinit$");
657 void_signature_node
= get_identifier ("()V");
658 length_identifier_node
= get_identifier ("length");
659 finalize_identifier_node
= get_identifier ("finalize");
660 this_identifier_node
= get_identifier ("this");
661 super_identifier_node
= get_identifier ("super");
662 continue_identifier_node
= get_identifier ("continue");
663 access0_identifier_node
= get_identifier ("access$0");
664 classdollar_identifier_node
= get_identifier ("class$");
666 java_lang_cloneable_identifier_node
= get_identifier ("java.lang.Cloneable");
667 java_io_serializable_identifier_node
=
668 get_identifier ("java.io.Serializable");
670 /* for lack of a better place to put this stub call */
671 init_expr_processing();
673 constants_type_node
= make_node (RECORD_TYPE
);
674 PUSH_FIELD (constants_type_node
, field
, "size", unsigned_int_type_node
);
675 PUSH_FIELD (constants_type_node
, field
, "tags", ptr_type_node
);
676 PUSH_FIELD (constants_type_node
, field
, "data", ptr_type_node
);
677 FINISH_RECORD (constants_type_node
);
678 build_decl (TYPE_DECL
, get_identifier ("constants"), constants_type_node
);
680 access_flags_type_node
= unsigned_short_type_node
;
682 dtable_type
= make_node (RECORD_TYPE
);
683 dtable_ptr_type
= build_pointer_type (dtable_type
);
685 otable_type
= build_array_type (integer_type_node
,
686 one_elt_array_domain_type
);
687 TYPE_NONALIASED_COMPONENT (otable_type
) = 1;
688 otable_ptr_type
= build_pointer_type (otable_type
);
690 PUSH_FIELD (object_type_node
, field
, "vtable", dtable_ptr_type
);
691 DECL_FCONTEXT (field
) = object_type_node
;
692 TYPE_VFIELD (object_type_node
) = field
;
694 /* This isn't exactly true, but it is what we have in the source.
695 There is an unresolved issue here, which is whether the vtable
696 should be marked by the GC. */
697 if (! flag_hash_synchronization
)
698 PUSH_FIELD (object_type_node
, field
, "sync_info",
699 build_pointer_type (object_type_node
));
700 for (t
= TYPE_FIELDS (object_type_node
); t
!= NULL_TREE
; t
= TREE_CHAIN (t
))
701 FIELD_PRIVATE (t
) = 1;
702 FINISH_RECORD (object_type_node
);
704 field_type_node
= make_node (RECORD_TYPE
);
705 field_ptr_type_node
= build_pointer_type (field_type_node
);
706 method_type_node
= make_node (RECORD_TYPE
);
707 method_ptr_type_node
= build_pointer_type (method_type_node
);
709 set_super_info (0, class_type_node
, object_type_node
, 0);
710 set_super_info (0, string_type_node
, object_type_node
, 0);
711 class_ptr_type
= build_pointer_type (class_type_node
);
713 PUSH_FIELD (class_type_node
, field
, "next", class_ptr_type
);
714 PUSH_FIELD (class_type_node
, field
, "name", utf8const_ptr_type
);
715 PUSH_FIELD (class_type_node
, field
, "accflags", access_flags_type_node
);
716 PUSH_FIELD (class_type_node
, field
, "superclass", class_ptr_type
);
717 PUSH_FIELD (class_type_node
, field
, "constants", constants_type_node
);
718 PUSH_FIELD (class_type_node
, field
, "methods", method_ptr_type_node
);
719 PUSH_FIELD (class_type_node
, field
, "method_count", short_type_node
);
720 PUSH_FIELD (class_type_node
, field
, "vtable_method_count", short_type_node
);
721 PUSH_FIELD (class_type_node
, field
, "fields", field_ptr_type_node
);
722 PUSH_FIELD (class_type_node
, field
, "size_in_bytes", int_type_node
);
723 PUSH_FIELD (class_type_node
, field
, "field_count", short_type_node
);
724 PUSH_FIELD (class_type_node
, field
, "static_field_count", short_type_node
);
725 PUSH_FIELD (class_type_node
, field
, "vtable", dtable_ptr_type
);
726 PUSH_FIELD (class_type_node
, field
, "otable", otable_ptr_type
);
727 PUSH_FIELD (class_type_node
, field
, "otable_syms",
728 symbols_array_ptr_type
);
729 PUSH_FIELD (class_type_node
, field
, "atable", atable_ptr_type
);
730 PUSH_FIELD (class_type_node
, field
, "atable_syms",
731 symbols_array_ptr_type
);
732 PUSH_FIELD (class_type_node
, field
, "catch_classes", ptr_type_node
);
733 PUSH_FIELD (class_type_node
, field
, "interfaces",
734 build_pointer_type (class_ptr_type
));
735 PUSH_FIELD (class_type_node
, field
, "loader", ptr_type_node
);
736 PUSH_FIELD (class_type_node
, field
, "interface_count", short_type_node
);
737 PUSH_FIELD (class_type_node
, field
, "state", byte_type_node
);
738 PUSH_FIELD (class_type_node
, field
, "thread", ptr_type_node
);
739 PUSH_FIELD (class_type_node
, field
, "depth", short_type_node
);
740 PUSH_FIELD (class_type_node
, field
, "ancestors", ptr_type_node
);
741 PUSH_FIELD (class_type_node
, field
, "idt", ptr_type_node
);
742 PUSH_FIELD (class_type_node
, field
, "arrayclass", ptr_type_node
);
743 PUSH_FIELD (class_type_node
, field
, "protectionDomain", ptr_type_node
);
744 PUSH_FIELD (class_type_node
, field
, "hack_signers", ptr_type_node
);
745 PUSH_FIELD (class_type_node
, field
, "chain", ptr_type_node
);
746 PUSH_FIELD (class_type_node
, field
, "aux_info", ptr_type_node
);
747 for (t
= TYPE_FIELDS (class_type_node
); t
!= NULL_TREE
; t
= TREE_CHAIN (t
))
748 FIELD_PRIVATE (t
) = 1;
749 push_super_field (class_type_node
, object_type_node
);
751 FINISH_RECORD (class_type_node
);
752 build_decl (TYPE_DECL
, get_identifier ("Class"), class_type_node
);
754 field_info_union_node
= make_node (UNION_TYPE
);
755 PUSH_FIELD (field_info_union_node
, field
, "boffset", int_type_node
);
756 PUSH_FIELD (field_info_union_node
, field
, "addr", ptr_type_node
);
758 PUSH_FIELD (field_info_union_node
, field
, "idx", unsigned_short_type_node
);
760 layout_type (field_info_union_node
);
762 PUSH_FIELD (field_type_node
, field
, "name", utf8const_ptr_type
);
763 PUSH_FIELD (field_type_node
, field
, "type", class_ptr_type
);
764 PUSH_FIELD (field_type_node
, field
, "accflags", access_flags_type_node
);
765 PUSH_FIELD (field_type_node
, field
, "bsize", unsigned_short_type_node
);
766 PUSH_FIELD (field_type_node
, field
, "info", field_info_union_node
);
767 FINISH_RECORD (field_type_node
);
768 build_decl (TYPE_DECL
, get_identifier ("Field"), field_type_node
);
770 nativecode_ptr_array_type_node
771 = build_array_type (nativecode_ptr_type_node
, one_elt_array_domain_type
);
773 PUSH_FIELD (dtable_type
, field
, "class", class_ptr_type
);
774 PUSH_FIELD (dtable_type
, field
, "methods", nativecode_ptr_array_type_node
);
775 FINISH_RECORD (dtable_type
);
776 build_decl (TYPE_DECL
, get_identifier ("dispatchTable"), dtable_type
);
778 #define jint_type int_type_node
779 #define jint_ptr_type ptr_type_node
781 jexception_type
= make_node (RECORD_TYPE
);
782 PUSH_FIELD (jexception_type
, field
, "start_pc", ptr_type_node
);
783 PUSH_FIELD (jexception_type
, field
, "end_pc", ptr_type_node
);
784 PUSH_FIELD (jexception_type
, field
, "handler_pc", ptr_type_node
);
785 PUSH_FIELD (jexception_type
, field
, "catch_type", class_ptr_type
);
786 FINISH_RECORD (jexception_type
);
787 build_decl (TYPE_DECL
, get_identifier ("jexception"), field_type_node
);
788 jexception_ptr_type
= build_pointer_type (jexception_type
);
790 lineNumberEntry_type
= make_node (RECORD_TYPE
);
791 PUSH_FIELD (lineNumberEntry_type
, field
, "line_nr", unsigned_short_type_node
);
792 PUSH_FIELD (lineNumberEntry_type
, field
, "start_pc", ptr_type_node
);
793 FINISH_RECORD (lineNumberEntry_type
);
795 lineNumbers_type
= make_node (RECORD_TYPE
);
796 PUSH_FIELD (lineNumbers_type
, field
, "length", unsigned_int_type_node
);
797 FINISH_RECORD (lineNumbers_type
);
799 #define instn_ptr_type_node ptr_type_node /* XXX JH */
801 #define lineNumbers_ptr_type_node build_pointer_type(lineNumbers_type)
803 PUSH_FIELD (method_type_node
, field
, "name", utf8const_ptr_type
);
804 PUSH_FIELD (method_type_node
, field
, "signature", utf8const_ptr_type
);
805 PUSH_FIELD (method_type_node
, field
, "accflags", access_flags_type_node
);
806 PUSH_FIELD (method_type_node
, field
, "index", unsigned_short_type_node
);
807 PUSH_FIELD (method_type_node
, field
, "ncode", nativecode_ptr_type_node
);
808 PUSH_FIELD (method_type_node
, field
, "throws", ptr_type_node
);
809 FINISH_RECORD (method_type_node
);
810 build_decl (TYPE_DECL
, get_identifier ("Method"), method_type_node
);
812 endlink
= end_params_node
= tree_cons (NULL_TREE
, void_type_node
, NULL_TREE
);
814 t
= tree_cons (NULL_TREE
, class_ptr_type
,
815 tree_cons (NULL_TREE
, int_type_node
, endlink
));
816 alloc_object_node
= builtin_function ("_Jv_AllocObject",
817 build_function_type (ptr_type_node
, t
),
818 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
819 DECL_IS_MALLOC (alloc_object_node
) = 1;
820 alloc_no_finalizer_node
=
821 builtin_function ("_Jv_AllocObjectNoFinalizer",
822 build_function_type (ptr_type_node
, t
),
823 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
824 DECL_IS_MALLOC (alloc_no_finalizer_node
) = 1;
826 t
= tree_cons (NULL_TREE
, ptr_type_node
, endlink
);
827 soft_initclass_node
= builtin_function ("_Jv_InitClass",
828 build_function_type (void_type_node
,
830 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
832 throw_node
= builtin_function ("_Jv_Throw",
833 build_function_type (ptr_type_node
, t
),
834 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
835 /* Mark throw_nodes as `noreturn' functions with side effects. */
836 TREE_THIS_VOLATILE (throw_node
) = 1;
837 TREE_SIDE_EFFECTS (throw_node
) = 1;
839 t
= build_function_type (int_type_node
, endlink
);
840 soft_monitorenter_node
841 = builtin_function ("_Jv_MonitorEnter", t
, 0, NOT_BUILT_IN
,
843 soft_monitorexit_node
844 = builtin_function ("_Jv_MonitorExit", t
, 0, NOT_BUILT_IN
,
847 t
= tree_cons (NULL_TREE
, int_type_node
,
848 tree_cons (NULL_TREE
, int_type_node
, endlink
));
850 = builtin_function ("_Jv_NewPrimArray",
851 build_function_type(ptr_type_node
, t
),
852 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
853 DECL_IS_MALLOC (soft_newarray_node
) = 1;
855 t
= tree_cons (NULL_TREE
, int_type_node
,
856 tree_cons (NULL_TREE
, class_ptr_type
,
857 tree_cons (NULL_TREE
, object_ptr_type_node
, endlink
)));
859 = builtin_function ("_Jv_NewObjectArray",
860 build_function_type (ptr_type_node
, t
),
861 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
862 DECL_IS_MALLOC (soft_anewarray_node
) = 1;
864 /* There is no endlink here because _Jv_NewMultiArray is a varargs
866 t
= tree_cons (NULL_TREE
, ptr_type_node
,
867 tree_cons (NULL_TREE
, int_type_node
, NULL_TREE
));
868 soft_multianewarray_node
869 = builtin_function ("_Jv_NewMultiArray",
870 build_function_type (ptr_type_node
, t
),
871 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
872 DECL_IS_MALLOC (soft_multianewarray_node
) = 1;
874 t
= build_function_type (void_type_node
,
875 tree_cons (NULL_TREE
, int_type_node
, endlink
));
876 soft_badarrayindex_node
877 = builtin_function ("_Jv_ThrowBadArrayIndex", t
,
878 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
879 /* Mark soft_badarrayindex_node as a `noreturn' function with side
881 TREE_THIS_VOLATILE (soft_badarrayindex_node
) = 1;
882 TREE_SIDE_EFFECTS (soft_badarrayindex_node
) = 1;
884 soft_nullpointer_node
885 = builtin_function ("_Jv_ThrowNullPointerException",
886 build_function_type (void_type_node
, endlink
),
887 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
888 /* Mark soft_nullpointer_node as a `noreturn' function with side
890 TREE_THIS_VOLATILE (soft_nullpointer_node
) = 1;
891 TREE_SIDE_EFFECTS (soft_nullpointer_node
) = 1;
893 t
= tree_cons (NULL_TREE
, class_ptr_type
,
894 tree_cons (NULL_TREE
, object_ptr_type_node
, endlink
));
896 = builtin_function ("_Jv_CheckCast",
897 build_function_type (ptr_type_node
, t
),
898 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
899 t
= tree_cons (NULL_TREE
, object_ptr_type_node
,
900 tree_cons (NULL_TREE
, class_ptr_type
, endlink
));
902 = builtin_function ("_Jv_IsInstanceOf",
903 build_function_type (boolean_type_node
, t
),
904 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
905 t
= tree_cons (NULL_TREE
, object_ptr_type_node
,
906 tree_cons (NULL_TREE
, object_ptr_type_node
, endlink
));
907 soft_checkarraystore_node
908 = builtin_function ("_Jv_CheckArrayStore",
909 build_function_type (void_type_node
, t
),
910 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
911 t
= tree_cons (NULL_TREE
, ptr_type_node
,
912 tree_cons (NULL_TREE
, ptr_type_node
,
913 tree_cons (NULL_TREE
, int_type_node
, endlink
)));
914 soft_lookupinterfacemethod_node
915 = builtin_function ("_Jv_LookupInterfaceMethodIdx",
916 build_function_type (ptr_type_node
, t
),
917 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
919 t
= tree_cons (NULL_TREE
, object_ptr_type_node
,
920 tree_cons (NULL_TREE
, ptr_type_node
,
921 tree_cons (NULL_TREE
, ptr_type_node
,
922 tree_cons (NULL_TREE
, int_type_node
,
924 soft_lookupjnimethod_node
925 = builtin_function ("_Jv_LookupJNIMethod",
926 build_function_type (ptr_type_node
, t
),
927 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
928 t
= tree_cons (NULL_TREE
, ptr_type_node
, endlink
);
929 soft_getjnienvnewframe_node
930 = builtin_function ("_Jv_GetJNIEnvNewFrame",
931 build_function_type (ptr_type_node
, t
),
932 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
933 soft_jnipopsystemframe_node
934 = builtin_function ("_Jv_JNI_PopSystemFrame",
935 build_function_type (ptr_type_node
, t
),
936 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
939 = builtin_function ("_Jv_divI",
940 build_function_type (int_type_node
, t
),
941 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
944 = builtin_function ("_Jv_remI",
945 build_function_type (int_type_node
, t
),
946 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
949 = builtin_function ("_Jv_divJ",
950 build_function_type (long_type_node
, t
),
951 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
954 = builtin_function ("_Jv_remJ",
955 build_function_type (long_type_node
, t
),
956 0, NOT_BUILT_IN
, NULL
, NULL_TREE
);
958 /* Initialize variables for except.c. */
959 eh_personality_libfunc
= init_one_libfunc (USING_SJLJ_EXCEPTIONS
960 ? "__gcj_personality_sj0"
961 : "__gcj_personality_v0");
963 lang_eh_runtime_type
= do_nothing
;
967 initialize_builtins ();
968 soft_fmod_node
= built_in_decls
[BUILT_IN_FMOD
];
970 soft_fmodf_node
= built_in_decls
[BUILT_IN_FMODF
];
975 /* Look up NAME in the current binding level and its superiors
976 in the namespace of variables, functions and typedefs.
977 Return a ..._DECL node of some kind representing its definition,
978 or return 0 if it is undefined. */
981 lookup_name (tree name
)
984 if (current_binding_level
!= global_binding_level
985 && IDENTIFIER_LOCAL_VALUE (name
))
986 val
= IDENTIFIER_LOCAL_VALUE (name
);
988 val
= IDENTIFIER_GLOBAL_VALUE (name
);
992 /* Similar to `lookup_name' but look only at current binding level and
993 the previous one if its the parameter level. */
996 lookup_name_current_level (tree name
)
1000 if (current_binding_level
== global_binding_level
)
1001 return IDENTIFIER_GLOBAL_VALUE (name
);
1003 if (IDENTIFIER_LOCAL_VALUE (name
) == 0)
1006 for (t
= current_binding_level
->names
; t
; t
= TREE_CHAIN (t
))
1007 if (DECL_NAME (t
) == name
)
1013 /* Use a binding level to record a labeled block declaration */
1016 push_labeled_block (tree lb
)
1018 tree name
= DECL_NAME (LABELED_BLOCK_LABEL (lb
));
1019 struct binding_level
*b
= current_binding_level
;
1020 tree oldlocal
= IDENTIFIER_LOCAL_VALUE (name
);
1022 b
->shadowed
= tree_cons (name
, oldlocal
, b
->shadowed
);
1023 TREE_CHAIN (lb
) = b
->names
;
1025 IDENTIFIER_LOCAL_VALUE (name
) = lb
;
1028 /* Pop the current binding level, reinstalling values for the previous
1032 pop_labeled_block (void)
1034 struct binding_level
*b
= current_binding_level
;
1035 tree label
= b
->names
;
1036 IDENTIFIER_LOCAL_VALUE (DECL_NAME (LABELED_BLOCK_LABEL (label
))) =
1039 IDENTIFIER_LOCAL_VALUE (TREE_PURPOSE (b
->shadowed
)) =
1040 TREE_VALUE (b
->shadowed
);
1042 /* Pop the current level, and free the structure for reuse. */
1043 current_binding_level
= current_binding_level
->level_chain
;
1044 b
->level_chain
= free_binding_level
;
1045 free_binding_level
= b
;
1048 /* Record a decl-node X as belonging to the current lexical scope.
1049 Check for errors (such as an incompatible declaration for the same
1050 name already seen in the same scope).
1052 Returns either X or an old decl for the same name.
1053 If an old decl is returned, it may have been smashed
1054 to agree with what X says. */
1060 tree name
= DECL_NAME (x
);
1061 struct binding_level
*b
= current_binding_level
;
1063 if (TREE_CODE (x
) != TYPE_DECL
)
1064 DECL_CONTEXT (x
) = current_function_decl
;
1067 t
= lookup_name_current_level (name
);
1068 if (t
!= 0 && t
== error_mark_node
)
1069 /* error_mark_node is 0 for a while during initialization! */
1072 error ("%J'%D' used prior to declaration", x
, x
);
1075 /* If we're naming a hitherto-unnamed type, set its TYPE_NAME
1076 to point to the TYPE_DECL.
1077 Since Java does not have typedefs, a type can only have
1078 one (true) name, given by a class, interface, or builtin. */
1079 if (TREE_CODE (x
) == TYPE_DECL
1080 && TYPE_NAME (TREE_TYPE (x
)) == 0
1081 && TREE_TYPE (x
) != error_mark_node
)
1083 TYPE_NAME (TREE_TYPE (x
)) = x
;
1084 TYPE_STUB_DECL (TREE_TYPE (x
)) = x
;
1087 /* This name is new in its binding level.
1088 Install the new declaration and return it. */
1089 if (b
== global_binding_level
)
1091 /* Install a global value. */
1093 IDENTIFIER_GLOBAL_VALUE (name
) = x
;
1097 /* Here to install a non-global value. */
1098 tree oldlocal
= IDENTIFIER_LOCAL_VALUE (name
);
1099 IDENTIFIER_LOCAL_VALUE (name
) = x
;
1102 /* Warn if shadowing an argument at the top level of the body. */
1103 if (oldlocal
!= 0 && !DECL_EXTERNAL (x
)
1104 /* This warning doesn't apply to the parms of a nested fcn. */
1105 && ! current_binding_level
->parm_flag
1106 /* Check that this is one level down from the parms. */
1107 && current_binding_level
->level_chain
->parm_flag
1108 /* Check that the decl being shadowed
1109 comes from the parm level, one level up. */
1110 && chain_member (oldlocal
, current_binding_level
->level_chain
->names
))
1112 if (TREE_CODE (oldlocal
) == PARM_DECL
)
1113 pedwarn ("declaration of `%s' shadows a parameter",
1114 IDENTIFIER_POINTER (name
));
1116 pedwarn ("declaration of `%s' shadows a symbol from the parameter list",
1117 IDENTIFIER_POINTER (name
));
1120 /* Maybe warn if shadowing something else. */
1121 else if (warn_shadow
&& !DECL_EXTERNAL (x
)
1122 /* No shadow warnings for internally generated vars. */
1123 && DECL_SOURCE_LINE (x
) != 0
1124 /* No shadow warnings for vars made for inlining. */
1125 && ! DECL_FROM_INLINE (x
))
1127 const char *warnstring
= 0;
1129 if (TREE_CODE (x
) == PARM_DECL
1130 && current_binding_level
->level_chain
->parm_flag
)
1131 /* Don't warn about the parm names in function declarator
1132 within a function declarator.
1133 It would be nice to avoid warning in any function
1134 declarator in a declaration, as opposed to a definition,
1135 but there is no way to tell it's not a definition. */
1137 else if (oldlocal
!= 0 && TREE_CODE (oldlocal
) == PARM_DECL
)
1138 warnstring
= "declaration of `%s' shadows a parameter";
1139 else if (oldlocal
!= 0)
1140 warnstring
= "declaration of `%s' shadows previous local";
1141 else if (IDENTIFIER_GLOBAL_VALUE (name
) != 0
1142 && IDENTIFIER_GLOBAL_VALUE (name
) != error_mark_node
)
1143 warnstring
= "declaration of `%s' shadows global declaration";
1146 warning (warnstring
, IDENTIFIER_POINTER (name
));
1150 /* If storing a local value, there may already be one (inherited).
1151 If so, record it for restoration when this binding level ends. */
1153 b
->shadowed
= tree_cons (name
, oldlocal
, b
->shadowed
);
1157 /* Put decls on list in reverse order.
1158 We will reverse them later if necessary. */
1159 TREE_CHAIN (x
) = b
->names
;
1166 pushdecl_force_head (tree x
)
1168 current_binding_level
->names
= x
;
1171 /* Like pushdecl, only it places X in GLOBAL_BINDING_LEVEL, if appropriate. */
1174 pushdecl_top_level (tree x
)
1177 struct binding_level
*b
= current_binding_level
;
1179 current_binding_level
= global_binding_level
;
1181 current_binding_level
= b
;
1185 /* Nonzero if we are currently in the global binding level. */
1188 global_bindings_p (void)
1190 return current_binding_level
== global_binding_level
;
1193 /* Return the list of declarations of the current level.
1194 Note that this list is in reverse order unless/until
1195 you nreverse it; and when you do nreverse it, you must
1196 store the result back using `storedecls' or you will lose. */
1201 return current_binding_level
->names
;
1204 /* Create a new `struct binding_level'. */
1206 static struct binding_level
*
1207 make_binding_level (void)
1210 return ggc_alloc_cleared (sizeof (struct binding_level
));
1214 pushlevel (int unused ATTRIBUTE_UNUSED
)
1216 struct binding_level
*newlevel
= NULL_BINDING_LEVEL
;
1219 /* If this is the top level of a function,
1220 just make sure that NAMED_LABELS is 0. */
1222 if (current_binding_level
== global_binding_level
)
1226 /* Reuse or create a struct for this binding level. */
1228 if (free_binding_level
)
1230 newlevel
= free_binding_level
;
1231 free_binding_level
= free_binding_level
->level_chain
;
1235 newlevel
= make_binding_level ();
1238 /* Add this level to the front of the chain (stack) of levels that
1241 *newlevel
= clear_binding_level
;
1242 newlevel
->level_chain
= current_binding_level
;
1243 current_binding_level
= newlevel
;
1244 #if defined(DEBUG_JAVA_BINDING_LEVELS)
1245 newlevel
->binding_depth
= binding_depth
;
1247 fprintf (stderr
, "push %s level %p pc %d\n",
1248 (is_class_level
) ? "class" : "block", newlevel
, current_pc
);
1251 #endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */
1254 /* Exit a binding level.
1255 Pop the level off, and restore the state of the identifier-decl mappings
1256 that were in effect when this level was entered.
1258 If KEEP is nonzero, this level had explicit declarations, so
1259 and create a "block" (a BLOCK node) for the level
1260 to record its declarations and subblocks for symbol table output.
1262 If FUNCTIONBODY is nonzero, this level is the body of a function,
1263 so create a block as if KEEP were set and also clear out all
1266 If REVERSE is nonzero, reverse the order of decls before putting
1267 them into the BLOCK. */
1270 poplevel (int keep
, int reverse
, int functionbody
)
1273 /* The chain of decls was accumulated in reverse order.
1274 Put it into forward order, just for cleanliness. */
1276 tree subblocks
= current_binding_level
->blocks
;
1280 int block_previously_created
;
1282 #if defined(DEBUG_JAVA_BINDING_LEVELS)
1285 if (current_binding_level
->end_pc
!= LARGEST_PC
)
1286 fprintf (stderr
, "pop %s level %p pc %d (end pc %d)\n",
1287 (is_class_level
) ? "class" : "block", current_binding_level
, current_pc
,
1288 current_binding_level
->end_pc
);
1290 fprintf (stderr
, "pop %s level %p pc %d\n",
1291 (is_class_level
) ? "class" : "block", current_binding_level
, current_pc
);
1293 if (is_class_level
!= (current_binding_level
== class_binding_level
))
1296 fprintf (stderr
, "XXX is_class_level != (current_binding_level == class_binding_level)\n");
1300 #endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */
1302 /* Get the decls in the order they were written.
1303 Usually current_binding_level->names is in reverse order.
1304 But parameter decls were previously put in forward order. */
1307 current_binding_level
->names
1308 = decls
= nreverse (current_binding_level
->names
);
1310 decls
= current_binding_level
->names
;
1312 for (decl
= decls
; decl
; decl
= TREE_CHAIN (decl
))
1313 if (TREE_CODE (decl
) == VAR_DECL
1314 && DECL_LANG_SPECIFIC (decl
) != NULL
1315 && DECL_LOCAL_SLOT_NUMBER (decl
))
1316 LOCAL_VAR_OUT_OF_SCOPE_P (decl
) = 1;
1318 /* If there were any declarations in that level,
1319 or if this level is a function body,
1320 create a BLOCK to record them for the life of this function. */
1323 block_previously_created
= (current_binding_level
->this_block
!= 0);
1324 if (block_previously_created
)
1325 block
= current_binding_level
->this_block
;
1326 else if (keep
|| functionbody
)
1328 block
= make_node (BLOCK
);
1329 TREE_TYPE (block
) = void_type_node
;
1332 if (current_binding_level
->exception_range
)
1333 expand_end_java_handler (current_binding_level
->exception_range
);
1337 /* If any statements have been generated at this level, create a
1338 BIND_EXPR to hold them and copy the variables to it. This
1339 only applies to the bytecode compiler. */
1340 if (current_binding_level
->stmts
)
1343 tree
*var
= &BLOCK_VARS (block
);
1345 /* Copy decls from names list, ignoring labels. */
1348 tree next
= TREE_CHAIN (decl
);
1349 if (TREE_CODE (decl
) != LABEL_DECL
)
1352 var
= &TREE_CHAIN (decl
);
1358 bind
= build (BIND_EXPR
, TREE_TYPE (block
), BLOCK_VARS (block
),
1359 BLOCK_EXPR_BODY (block
), block
);
1360 BIND_EXPR_BODY (bind
) = current_binding_level
->stmts
;
1362 if (BIND_EXPR_BODY (bind
)
1363 && TREE_SIDE_EFFECTS (BIND_EXPR_BODY (bind
)))
1364 TREE_SIDE_EFFECTS (bind
) = 1;
1366 /* FIXME: gimplifier brain damage. */
1367 if (BIND_EXPR_BODY (bind
) == NULL
)
1368 BIND_EXPR_BODY (bind
) = build_java_empty_stmt ();
1370 current_binding_level
->stmts
= NULL
;
1374 BLOCK_VARS (block
) = decls
;
1376 BLOCK_SUBBLOCKS (block
) = subblocks
;
1379 /* In each subblock, record that this is its superior. */
1381 for (link
= subblocks
; link
; link
= TREE_CHAIN (link
))
1382 BLOCK_SUPERCONTEXT (link
) = block
;
1384 /* Clear out the meanings of the local variables of this level. */
1386 for (link
= decls
; link
; link
= TREE_CHAIN (link
))
1388 tree name
= DECL_NAME (link
);
1389 if (name
!= 0 && IDENTIFIER_LOCAL_VALUE (name
) == link
)
1391 /* If the ident. was used or addressed via a local extern decl,
1392 don't forget that fact. */
1393 if (DECL_EXTERNAL (link
))
1395 if (TREE_USED (link
))
1396 TREE_USED (name
) = 1;
1397 if (TREE_ADDRESSABLE (link
))
1398 TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (link
)) = 1;
1400 IDENTIFIER_LOCAL_VALUE (name
) = 0;
1404 /* Restore all name-meanings of the outer levels
1405 that were shadowed by this level. */
1407 for (link
= current_binding_level
->shadowed
; link
; link
= TREE_CHAIN (link
))
1408 IDENTIFIER_LOCAL_VALUE (TREE_PURPOSE (link
)) = TREE_VALUE (link
);
1410 /* If the level being exited is the top level of a function,
1411 check over all the labels, and clear out the current
1412 (function local) meanings of their names. */
1416 /* If this is the top level block of a function,
1417 the vars are the function's parameters.
1418 Don't leave them in the BLOCK because they are
1419 found in the FUNCTION_DECL instead. */
1421 BLOCK_VARS (block
) = 0;
1423 /* Clear out the definitions of all label names,
1424 since their scopes end here,
1425 and add them to BLOCK_VARS. */
1428 for (link
= named_labels
; link
; link
= TREE_CHAIN (link
))
1430 tree label
= TREE_VALUE (link
);
1432 if (DECL_INITIAL (label
) == 0)
1434 error ("%Jlabel '%D' used but not defined", label
, label
);
1435 /* Avoid crashing later. */
1436 define_label (input_location
, DECL_NAME (label
));
1438 else if (warn_unused
[UNUSED_LABEL
] && !TREE_USED (label
))
1439 warning ("%Jlabel '%D' defined but not used", label
, label
);
1440 IDENTIFIER_LABEL_VALUE (DECL_NAME (label
)) = 0;
1442 /* Put the labels into the "variables" of the
1443 top-level block, so debugger can see them. */
1444 TREE_CHAIN (label
) = BLOCK_VARS (block
);
1445 BLOCK_VARS (block
) = label
;
1450 /* Pop the current level, and free the structure for reuse. */
1453 struct binding_level
*level
= current_binding_level
;
1454 current_binding_level
= current_binding_level
->level_chain
;
1456 level
->level_chain
= free_binding_level
;
1457 free_binding_level
= level
;
1460 /* Dispose of the block that we just made inside some higher level. */
1463 DECL_INITIAL (current_function_decl
) = block
;
1464 DECL_SAVED_TREE (current_function_decl
) = bind
;
1470 if (!block_previously_created
)
1471 current_binding_level
->blocks
1472 = chainon (current_binding_level
->blocks
, block
);
1474 /* If we did not make a block for the level just exited,
1475 any blocks made for inner levels
1476 (since they cannot be recorded as subblocks in that level)
1477 must be carried forward so they will later become subblocks
1478 of something else. */
1480 current_binding_level
->blocks
1481 = chainon (current_binding_level
->blocks
, subblocks
);
1484 java_add_stmt (bind
);
1488 TREE_USED (block
) = 1;
1493 maybe_pushlevels (int pc
)
1495 #if defined(DEBUG_JAVA_BINDING_LEVELS)
1499 while (pending_local_decls
!= NULL_TREE
&&
1500 DECL_LOCAL_START_PC (pending_local_decls
) <= pc
)
1502 tree
*ptr
= &pending_local_decls
;
1503 tree decl
= *ptr
, next
;
1504 int end_pc
= DECL_LOCAL_END_PC (decl
);
1506 while (*ptr
!= NULL_TREE
1507 && DECL_LOCAL_START_PC (*ptr
) <= pc
1508 && DECL_LOCAL_END_PC (*ptr
) == end_pc
)
1509 ptr
= &TREE_CHAIN (*ptr
);
1510 pending_local_decls
= *ptr
;
1513 /* Force non-nested range to be nested in current range. */
1514 if (end_pc
> current_binding_level
->end_pc
)
1515 end_pc
= current_binding_level
->end_pc
;
1517 maybe_start_try (pc
, end_pc
);
1521 current_binding_level
->end_pc
= end_pc
;
1522 current_binding_level
->start_pc
= pc
;
1523 current_binding_level
->names
= NULL
;
1524 for ( ; decl
!= NULL_TREE
; decl
= next
)
1526 next
= TREE_CHAIN (decl
);
1527 push_jvm_slot (DECL_LOCAL_SLOT_NUMBER (decl
), decl
);
1531 maybe_start_try (pc
, 0);
1535 maybe_poplevels (int pc
)
1537 #if defined(DEBUG_JAVA_BINDING_LEVELS)
1541 while (current_binding_level
->end_pc
<= pc
)
1545 /* Terminate any binding which began during the range beginning at
1546 start_pc. This tidies up improperly nested local variable ranges
1547 and exception handlers; a variable declared within an exception
1548 range is forcibly terminated when that exception ends. */
1551 force_poplevels (int start_pc
)
1553 while (current_binding_level
->start_pc
> start_pc
)
1555 if (pedantic
&& current_binding_level
->start_pc
> start_pc
)
1556 warning ("%JIn %D: overlapped variable and exception ranges at %d",
1557 current_function_decl
, current_function_decl
,
1558 current_binding_level
->start_pc
);
1563 /* Insert BLOCK at the end of the list of subblocks of the
1564 current binding level. This is used when a BIND_EXPR is expanded,
1565 to handle the BLOCK node inside the BIND_EXPR. */
1568 insert_block (tree block
)
1570 TREE_USED (block
) = 1;
1571 current_binding_level
->blocks
1572 = chainon (current_binding_level
->blocks
, block
);
1575 /* Set the BLOCK node for the innermost scope
1576 (the one we are currently in). */
1579 set_block (tree block
)
1581 current_binding_level
->this_block
= block
;
1582 current_binding_level
->names
= chainon (current_binding_level
->names
,
1583 BLOCK_VARS (block
));
1584 current_binding_level
->blocks
= chainon (current_binding_level
->blocks
,
1585 BLOCK_SUBBLOCKS (block
));
1588 /* integrate_decl_tree calls this function. */
1591 java_dup_lang_specific_decl (tree node
)
1594 struct lang_decl
*x
;
1596 if (!DECL_LANG_SPECIFIC (node
))
1599 lang_decl_size
= sizeof (struct lang_decl
);
1600 x
= ggc_alloc (lang_decl_size
);
1601 memcpy (x
, DECL_LANG_SPECIFIC (node
), lang_decl_size
);
1602 DECL_LANG_SPECIFIC (node
) = x
;
1606 give_name_to_locals (JCF
*jcf
)
1608 int i
, n
= DECL_LOCALVARIABLES_OFFSET (current_function_decl
);
1609 int code_offset
= DECL_CODE_OFFSET (current_function_decl
);
1611 pending_local_decls
= NULL_TREE
;
1615 n
= JCF_readu2 (jcf
);
1616 for (i
= 0; i
< n
; i
++)
1618 int start_pc
= JCF_readu2 (jcf
);
1619 int length
= JCF_readu2 (jcf
);
1620 int name_index
= JCF_readu2 (jcf
);
1621 int signature_index
= JCF_readu2 (jcf
);
1622 int slot
= JCF_readu2 (jcf
);
1623 tree name
= get_name_constant (jcf
, name_index
);
1624 tree type
= parse_signature (jcf
, signature_index
);
1625 if (slot
< DECL_ARG_SLOT_COUNT (current_function_decl
)
1627 && length
== DECL_CODE_LENGTH (current_function_decl
))
1629 tree decl
= TREE_VEC_ELT (decl_map
, slot
);
1630 DECL_NAME (decl
) = name
;
1631 SET_DECL_ASSEMBLER_NAME (decl
, name
);
1632 if (TREE_CODE (decl
) != PARM_DECL
|| TREE_TYPE (decl
) != type
)
1633 warning ("bad type in parameter debug info");
1638 int end_pc
= start_pc
+ length
;
1639 tree decl
= build_decl (VAR_DECL
, name
, type
);
1640 if (end_pc
> DECL_CODE_LENGTH (current_function_decl
))
1642 warning ("%Jbad PC range for debug info for local '%D'",
1644 end_pc
= DECL_CODE_LENGTH (current_function_decl
);
1647 /* Adjust start_pc if necessary so that the local's first
1648 store operation will use the relevant DECL as a
1649 destination. Fore more information, read the leading
1650 comments for expr.c:maybe_adjust_start_pc. */
1651 start_pc
= maybe_adjust_start_pc (jcf
, code_offset
, start_pc
, slot
);
1653 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl
);
1654 DECL_LOCAL_SLOT_NUMBER (decl
) = slot
;
1655 DECL_LOCAL_START_PC (decl
) = start_pc
;
1657 /* FIXME: The range used internally for exceptions and local
1658 variable ranges, is a half-open interval:
1659 start_pc <= pc < end_pc. However, the range used in the
1660 Java VM spec is inclusive at both ends:
1661 start_pc <= pc <= end_pc. */
1664 DECL_LOCAL_END_PC (decl
) = end_pc
;
1666 /* Now insert the new decl in the proper place in
1667 pending_local_decls. We are essentially doing an insertion sort,
1668 which works fine, since the list input will normally already
1670 ptr
= &pending_local_decls
;
1671 while (*ptr
!= NULL_TREE
1672 && (DECL_LOCAL_START_PC (*ptr
) > start_pc
1673 || (DECL_LOCAL_START_PC (*ptr
) == start_pc
1674 && DECL_LOCAL_END_PC (*ptr
) < end_pc
)))
1675 ptr
= &TREE_CHAIN (*ptr
);
1676 TREE_CHAIN (decl
) = *ptr
;
1681 pending_local_decls
= nreverse (pending_local_decls
);
1683 /* Fill in default names for the parameters. */
1684 for (parm
= DECL_ARGUMENTS (current_function_decl
), i
= 0;
1685 parm
!= NULL_TREE
; parm
= TREE_CHAIN (parm
), i
++)
1687 if (DECL_NAME (parm
) == NULL_TREE
)
1689 int arg_i
= METHOD_STATIC (current_function_decl
) ? i
+1 : i
;
1691 DECL_NAME (parm
) = get_identifier ("this");
1695 sprintf (buffer
, "ARG_%d", arg_i
);
1696 DECL_NAME (parm
) = get_identifier (buffer
);
1698 SET_DECL_ASSEMBLER_NAME (parm
, DECL_NAME (parm
));
1704 build_result_decl (tree fndecl
)
1706 tree restype
= TREE_TYPE (TREE_TYPE (fndecl
));
1707 tree result
= DECL_RESULT (fndecl
);
1710 /* To be compatible with C_PROMOTING_INTEGER_TYPE_P in cc1/cc1plus. */
1711 if (INTEGRAL_TYPE_P (restype
)
1712 && TYPE_PRECISION (restype
) < TYPE_PRECISION (integer_type_node
))
1713 restype
= integer_type_node
;
1714 result
= build_decl (RESULT_DECL
, NULL_TREE
, restype
);
1715 DECL_CONTEXT (result
) = fndecl
;
1716 DECL_RESULT (fndecl
) = result
;
1722 start_java_method (tree fndecl
)
1727 current_function_decl
= fndecl
;
1728 announce_function (fndecl
);
1730 i
= DECL_MAX_LOCALS(fndecl
) + DECL_MAX_STACK(fndecl
);
1731 decl_map
= make_tree_vec (i
);
1732 type_map
= xrealloc (type_map
, i
* sizeof (tree
));
1734 #if defined(DEBUG_JAVA_BINDING_LEVELS)
1735 fprintf (stderr
, "%s:\n", lang_printable_name (fndecl
, 2));
1737 #endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */
1738 pushlevel (1); /* Push parameters. */
1740 ptr
= &DECL_ARGUMENTS (fndecl
);
1741 for (tem
= TYPE_ARG_TYPES (TREE_TYPE (fndecl
)), i
= 0;
1742 tem
!= end_params_node
; tem
= TREE_CHAIN (tem
), i
++)
1744 tree parm_name
= NULL_TREE
, parm_decl
;
1745 tree parm_type
= TREE_VALUE (tem
);
1746 if (i
>= DECL_MAX_LOCALS (fndecl
))
1749 parm_decl
= build_decl (PARM_DECL
, parm_name
, parm_type
);
1750 DECL_CONTEXT (parm_decl
) = fndecl
;
1751 if (targetm
.calls
.promote_prototypes (parm_type
)
1752 && TYPE_PRECISION (parm_type
) < TYPE_PRECISION (integer_type_node
)
1753 && INTEGRAL_TYPE_P (parm_type
))
1754 parm_type
= integer_type_node
;
1755 DECL_ARG_TYPE (parm_decl
) = parm_type
;
1758 ptr
= &TREE_CHAIN (parm_decl
);
1760 /* Add parm_decl to the decl_map. */
1761 push_jvm_slot (i
, parm_decl
);
1763 type_map
[i
] = TREE_TYPE (parm_decl
);
1764 if (TYPE_IS_WIDE (TREE_TYPE (parm_decl
)))
1767 type_map
[i
] = void_type_node
;
1771 DECL_ARG_SLOT_COUNT (current_function_decl
) = i
;
1773 while (i
< DECL_MAX_LOCALS(fndecl
))
1774 type_map
[i
++] = NULL_TREE
;
1776 build_result_decl (fndecl
);
1778 /* Push local variables. */
1783 end_java_method (void)
1785 tree fndecl
= current_function_decl
;
1787 /* pop out of function */
1790 /* pop out of its parameters */
1793 BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl
)) = fndecl
;
1795 flag_unit_at_a_time
= 0;
1796 finish_method (fndecl
);
1798 if (! flag_unit_at_a_time
)
1800 /* Nulling these fields when we no longer need them saves
1802 DECL_SAVED_TREE (fndecl
) = NULL
;
1803 DECL_STRUCT_FUNCTION (fndecl
) = NULL
;
1804 DECL_INITIAL (fndecl
) = NULL_TREE
;
1806 current_function_decl
= NULL_TREE
;
1809 /* Prepare a method for expansion. */
1812 finish_method (tree fndecl
)
1814 tree
*tp
= &DECL_SAVED_TREE (fndecl
);
1816 /* Wrap body of synchronized methods in a monitorenter,
1817 plus monitorexit cleanup. */
1818 if (METHOD_SYNCHRONIZED (fndecl
))
1820 tree enter
, exit
, lock
;
1821 if (METHOD_STATIC (fndecl
))
1822 lock
= build_class_ref (DECL_CONTEXT (fndecl
));
1824 lock
= DECL_ARGUMENTS (fndecl
);
1825 BUILD_MONITOR_ENTER (enter
, lock
);
1826 BUILD_MONITOR_EXIT (exit
, lock
);
1827 *tp
= build (COMPOUND_EXPR
, void_type_node
,
1829 build (TRY_FINALLY_EXPR
, void_type_node
, *tp
, exit
));
1832 /* Prepend class initialization for static methods reachable from
1834 if (METHOD_STATIC (fndecl
) && ! METHOD_PRIVATE (fndecl
)
1835 && ! DECL_CLINIT_P (fndecl
)
1836 && ! CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (fndecl
))))
1838 tree clas
= DECL_CONTEXT (fndecl
);
1839 tree init
= build (CALL_EXPR
, void_type_node
,
1840 build_address_of (soft_initclass_node
),
1841 build_tree_list (NULL_TREE
, build_class_ref (clas
)),
1843 *tp
= build (COMPOUND_EXPR
, TREE_TYPE (*tp
), init
, *tp
);
1846 /* Convert function tree to GENERIC prior to inlining. */
1847 java_genericize (fndecl
);
1849 /* Store the end of the function, so that we get good line number
1850 info for the epilogue. */
1851 if (DECL_STRUCT_FUNCTION (fndecl
))
1852 cfun
= DECL_STRUCT_FUNCTION (fndecl
);
1854 allocate_struct_function (fndecl
);
1855 cfun
->function_end_locus
.file
= DECL_SOURCE_FILE (fndecl
);
1856 cfun
->function_end_locus
.line
= DECL_FUNCTION_LAST_LINE (fndecl
);
1858 /* Defer inlining and expansion to the cgraph optimizers. */
1859 cgraph_finalize_function (fndecl
, false);
1862 /* Optimize and expand a function's entire body. */
1865 java_expand_body (tree fndecl
)
1867 tree_rest_of_compilation (fndecl
, 0);
1870 /* We pessimistically marked all methods and fields external until we
1871 knew what set of classes we were planning to compile. Now mark those
1872 associated with CLASS to be generated locally as not external. */
1875 java_mark_decl_local (tree decl
)
1877 DECL_EXTERNAL (decl
) = 0;
1879 /* If we've already constructed DECL_RTL, give encode_section_info
1880 a second chance, now that we've changed the flags. */
1881 if (DECL_RTL_SET_P (decl
))
1882 make_decl_rtl (decl
, NULL
);
1886 java_mark_class_local (tree
class)
1890 for (t
= TYPE_FIELDS (class); t
; t
= TREE_CHAIN (t
))
1891 if (FIELD_STATIC (t
))
1892 java_mark_decl_local (t
);
1894 for (t
= TYPE_METHODS (class); t
; t
= TREE_CHAIN (t
))
1895 if (!METHOD_ABSTRACT (t
) && (!METHOD_NATIVE (t
) || flag_jni
))
1896 java_mark_decl_local (t
);
1899 /* Add a statement to a compound_expr. */
1902 add_stmt_to_compound (tree existing
, tree type
, tree stmt
)
1908 tree expr
= build (COMPOUND_EXPR
, type
, existing
, stmt
);
1909 TREE_SIDE_EFFECTS (expr
)
1910 = TREE_SIDE_EFFECTS (existing
) | TREE_SIDE_EFFECTS (stmt
);
1917 /* Add a statement to the compound_expr currently being
1921 java_add_stmt (tree stmt
)
1924 annotate_with_locus (stmt
, input_location
);
1926 return current_binding_level
->stmts
1927 = add_stmt_to_compound (current_binding_level
->stmts
,
1928 TREE_TYPE (stmt
), stmt
);
1931 /* Add a variable to the current scope. */
1934 java_add_local_var (tree decl
)
1936 tree
*vars
= ¤t_binding_level
->names
;
1938 TREE_CHAIN (decl
) = next
;
1940 DECL_CONTEXT (decl
) = current_function_decl
;
1941 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl
);
1945 /* Return a pointer to the compound_expr currently being
1951 return ¤t_binding_level
->stmts
;
1954 /* Register an exception range as belonging to the current binding
1955 level. There may only be one: if there are more, we'll create more
1956 binding levels. However, each range can have multiple handlers,
1957 and these are expanded when we call expand_end_java_handler(). */
1960 register_exception_range (struct eh_range
*range
, int pc
, int end_pc
)
1962 if (current_binding_level
->exception_range
)
1964 current_binding_level
->exception_range
= range
;
1965 current_binding_level
->end_pc
= end_pc
;
1966 current_binding_level
->start_pc
= pc
;
1969 #include "gt-java-decl.h"