#include "config.h"
#include "system.h"
#include "tree.h"
#include "input.h"
#include "rtl.h"
#include "expr.h"
#include "java-tree.h"
#include "jcf.h"
#include "toplev.h"
#include "langhooks.h"
#include "langhooks-def.h"
#include "flags.h"
#include "xref.h"
#include "ggc.h"
#include "diagnostic.h"
#include "tree-inline.h"
#include "splay-tree.h"
#include "tree-dump.h"
struct string_option
{
const char *const string;
int *const variable;
const int on_value;
};
static const char *java_init PARAMS ((const char *));
static void java_finish PARAMS ((void));
static void java_init_options PARAMS ((void));
static bool java_post_options PARAMS ((void));
static int java_decode_option PARAMS ((int, char **));
static void put_decl_string PARAMS ((const char *, int));
static void put_decl_node PARAMS ((tree));
static void java_print_error_function PARAMS ((diagnostic_context *,
const char *));
static int process_option_with_no PARAMS ((const char *,
const struct string_option *,
int));
static tree java_tree_inlining_walk_subtrees PARAMS ((tree *,
int *,
walk_tree_fn,
void *,
void *));
static int java_unsafe_for_reeval PARAMS ((tree));
static int merge_init_test_initialization PARAMS ((void * *,
void *));
static int inline_init_test_initialization PARAMS ((void * *,
void *));
static bool java_can_use_bit_fields_p PARAMS ((void));
static int java_dump_tree PARAMS ((void *, tree));
static void dump_compound_expr PARAMS ((dump_info_p, tree));
#ifndef TARGET_OBJECT_SUFFIX
# define TARGET_OBJECT_SUFFIX ".o"
#endif
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
const char tree_code_type[] = {
#include "tree.def"
'x',
#include "java-tree.def"
};
#undef DEFTREECODE
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
const unsigned char tree_code_length[] = {
#include "tree.def"
0,
#include "java-tree.def"
};
#undef DEFTREECODE
#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
const char *const tree_code_name[] = {
#include "tree.def"
"@@dummy",
#include "java-tree.def"
};
#undef DEFTREECODE
static bool inhibit_error_function_printing;
int compiling_from_source;
char * resource_name;
int flag_emit_class_files = 0;
int flag_filelist_file = 0;
int flag_emit_xref = 0;
int flag_wall = 0;
int flag_redundant = 0;
int flag_use_divide_subroutine = 1;
int flag_use_boehm_gc = 0;
int flag_hash_synchronization;
int flag_assert = 1;
int flag_jni = 0;
int flag_newer = 1;
int flag_check_references = 0;
const char *current_encoding = NULL;
int flag_extraneous_semicolon;
int flag_force_classes_archive_check;
int flag_optimize_sci = 1;
int flag_indirect_dispatch = 0;
int flag_store_check = 1;
static int version_flag = 0;
int flag_really_inline = 0;
static const struct string_option
lang_f_options[] =
{
{"emit-class-file", &flag_emit_class_files, 1},
{"emit-class-files", &flag_emit_class_files, 1},
{"filelist-file", &flag_filelist_file, 1},
{"use-divide-subroutine", &flag_use_divide_subroutine, 1},
{"use-boehm-gc", &flag_use_boehm_gc, 1},
{"hash-synchronization", &flag_hash_synchronization, 1},
{"jni", &flag_jni, 1},
{"check-references", &flag_check_references, 1},
{"force-classes-archive-check", &flag_force_classes_archive_check, 1},
{"optimize-static-class-initialization", &flag_optimize_sci, 1 },
{"indirect-dispatch", &flag_indirect_dispatch, 1},
{"store-check", &flag_store_check, 1},
{"assert", &flag_assert, 1}
};
static const struct string_option
lang_W_options[] =
{
{ "redundant-modifiers", &flag_redundant, 1 },
{ "extraneous-semicolon", &flag_extraneous_semicolon, 1 },
{ "out-of-date", &flag_newer, 1 }
};
JCF *current_jcf;
static int dependency_tracking = 0;
#define DEPEND_SET_FILE 1
#define DEPEND_ENABLE 2
#define DEPEND_TARGET_SET 4
#define DEPEND_FILE_ALREADY_SET 8
struct language_function GTY(())
{
int unused;
};
#undef LANG_HOOKS_NAME
#define LANG_HOOKS_NAME "GNU Java"
#undef LANG_HOOKS_INIT
#define LANG_HOOKS_INIT java_init
#undef LANG_HOOKS_FINISH
#define LANG_HOOKS_FINISH java_finish
#undef LANG_HOOKS_INIT_OPTIONS
#define LANG_HOOKS_INIT_OPTIONS java_init_options
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION java_decode_option
#undef LANG_HOOKS_POST_OPTIONS
#define LANG_HOOKS_POST_OPTIONS java_post_options
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE java_parse_file
#undef LANG_HOOKS_UNSAFE_FOR_REEVAL
#define LANG_HOOKS_UNSAFE_FOR_REEVAL java_unsafe_for_reeval
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable
#undef LANG_HOOKS_EXPAND_EXPR
#define LANG_HOOKS_EXPAND_EXPR java_expand_expr
#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
#define LANG_HOOKS_TRUTHVALUE_CONVERSION java_truthvalue_conversion
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
#define LANG_HOOKS_DECL_PRINTABLE_NAME lang_printable_name
#undef LANG_HOOKS_PRINT_ERROR_FUNCTION
#define LANG_HOOKS_PRINT_ERROR_FUNCTION java_print_error_function
#undef LANG_HOOKS_CAN_USE_BIT_FIELDS_P
#define LANG_HOOKS_CAN_USE_BIT_FIELDS_P java_can_use_bit_fields_p
#undef LANG_HOOKS_TYPE_FOR_MODE
#define LANG_HOOKS_TYPE_FOR_MODE java_type_for_mode
#undef LANG_HOOKS_TYPE_FOR_SIZE
#define LANG_HOOKS_TYPE_FOR_SIZE java_type_for_size
#undef LANG_HOOKS_SIGNED_TYPE
#define LANG_HOOKS_SIGNED_TYPE java_signed_type
#undef LANG_HOOKS_UNSIGNED_TYPE
#define LANG_HOOKS_UNSIGNED_TYPE java_unsigned_type
#undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE
#define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE java_signed_or_unsigned_type
#undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES
#define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES java_tree_inlining_walk_subtrees
#undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
#define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN java_dump_tree
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
static int
process_option_with_no (p, table, table_size)
const char *p;
const struct string_option *table;
int table_size;
{
int j;
for (j = 0; j < table_size; j++)
{
if (!strcmp (p, table[j].string))
{
*table[j].variable = table[j].on_value;
return 1;
}
if (p[0] == 'n' && p[1] == 'o' && p[2] == '-'
&& ! strcmp (p+3, table[j].string))
{
*table[j].variable = ! table[j].on_value;
return 1;
}
}
return 0;
}
static int
java_decode_option (argc, argv)
int argc __attribute__ ((__unused__));
char **argv;
{
char *p = argv[0];
jcf_path_init ();
if (strcmp (p, "-version") == 0)
{
version_flag = 1;
return 0;
}
#define CLARG "-fcompile-resource="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
resource_name = p + sizeof (CLARG) - 1;
return 1;
}
#undef CLARG
#define CLARG "-fassume-compiled="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
add_assume_compiled (p + sizeof (CLARG) - 1, 0);
return 1;
}
#undef CLARG
#define CLARG "-fno-assume-compiled="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
add_assume_compiled (p + sizeof (CLARG) - 1, 1);
return 1;
}
#undef CLARG
#define CLARG "-fassume-compiled"
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
add_assume_compiled ("", 0);
return 1;
}
#undef CLARG
#define CLARG "-fno-assume-compiled"
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
add_assume_compiled ("", 1);
return 1;
}
#undef CLARG
#define CLARG "-fCLASSPATH="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
#define CLARG "-fclasspath="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
#define CLARG "-fbootclasspath="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_bootclasspath_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
#define CLARG "-fextdirs="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_extdirs_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
else if (strncmp (p, "-I", 2) == 0)
{
jcf_path_include_arg (p + 2);
return 1;
}
#define ARG "-foutput-class-dir="
if (strncmp (p, ARG, sizeof (ARG) - 1) == 0)
{
jcf_write_base_directory = p + sizeof (ARG) - 1;
return 1;
}
#undef ARG
#define ARG "-fencoding="
if (strncmp (p, ARG, sizeof (ARG) - 1) == 0)
{
current_encoding = p + sizeof (ARG) - 1;
return 1;
}
#undef ARG
#define ARG "-finline-functions"
if (strncmp (p, ARG, sizeof (ARG) - 1) == 0)
{
flag_inline_functions = 1;
flag_really_inline = 1;
return 1;
}
#undef ARG
if (p[0] == '-' && p[1] == 'f')
{
p += 2;
if (process_option_with_no (p, lang_f_options,
ARRAY_SIZE (lang_f_options)))
return 1;
return dump_switch_p (p);
}
if (strcmp (p, "-Wall") == 0)
{
flag_wall = 1;
flag_redundant = 1;
flag_extraneous_semicolon = 1;
set_Wunused (1);
return 1;
}
if (p[0] == '-' && p[1] == 'W')
{
p += 2;
return process_option_with_no (p, lang_W_options,
ARRAY_SIZE (lang_W_options));
}
if (strcmp (p, "-MD") == 0)
{
jcf_dependency_init (1);
dependency_tracking |= DEPEND_SET_FILE | DEPEND_ENABLE;
return 1;
}
else if (strcmp (p, "-MMD") == 0)
{
jcf_dependency_init (0);
dependency_tracking |= DEPEND_SET_FILE | DEPEND_ENABLE;
return 1;
}
else if (strcmp (p, "-M") == 0)
{
jcf_dependency_init (1);
dependency_tracking |= DEPEND_ENABLE;
return 1;
}
else if (strcmp (p, "-MM") == 0)
{
jcf_dependency_init (0);
dependency_tracking |= DEPEND_ENABLE;
return 1;
}
else if (strcmp (p, "-MP") == 0)
{
jcf_dependency_print_dummies ();
return 1;
}
else if (strcmp (p, "-MT") == 0)
{
jcf_dependency_set_target (argv[1]);
dependency_tracking |= DEPEND_TARGET_SET;
return 2;
}
else if (strcmp (p, "-MF") == 0)
{
jcf_dependency_set_dep_file (argv[1]);
dependency_tracking |= DEPEND_FILE_ALREADY_SET;
return 2;
}
return 0;
}
FILE *finput;
static const char *
java_init (filename)
const char *filename;
{
#if 0
extern int flag_minimal_debug;
flag_minimal_debug = 0;
#endif
if (flag_inline_functions)
flag_inline_trees = 1;
if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn
&& force_align_functions_log < 1)
force_align_functions_log = 1;
if (filename == 0 || !strcmp (filename, "-"))
{
finput = stdin;
filename = "stdin";
if (dependency_tracking)
error ("can't do dependency tracking with input from stdin");
}
else
{
if (dependency_tracking)
{
char *dot;
if (! ((dependency_tracking & DEPEND_TARGET_SET)
&& (dependency_tracking & DEPEND_FILE_ALREADY_SET)))
{
dot = strrchr (filename, '.');
if (dot == NULL)
error ("couldn't determine target name for dependency tracking");
else
{
char *buf = xmalloc (dot - filename +
3 + sizeof (TARGET_OBJECT_SUFFIX));
strncpy (buf, filename, dot - filename);
if ((dependency_tracking & DEPEND_TARGET_SET))
;
else if (flag_emit_class_files)
jcf_dependency_set_target (NULL);
else
{
strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX);
jcf_dependency_set_target (buf);
}
if ((dependency_tracking & DEPEND_FILE_ALREADY_SET))
;
else if ((dependency_tracking & DEPEND_SET_FILE))
{
strcpy (buf + (dot - filename), ".d");
jcf_dependency_set_dep_file (buf);
}
else
jcf_dependency_set_dep_file ("-");
free (buf);
}
}
}
}
jcf_path_init ();
jcf_path_seal (version_flag);
java_init_decl_processing ();
using_eh_for_cleanups ();
return filename;
}
static void
java_finish ()
{
jcf_dependency_write ();
}
static char *decl_buf = NULL;
static int decl_buflen = 0;
static int decl_bufpos = 0;
static void
put_decl_string (str, len)
const char *str;
int len;
{
if (len < 0)
len = strlen (str);
if (decl_bufpos + len >= decl_buflen)
{
if (decl_buf == NULL)
{
decl_buflen = len + 100;
decl_buf = xmalloc (decl_buflen);
}
else
{
decl_buflen *= 2;
decl_buf = xrealloc (decl_buf, decl_buflen);
}
}
strcpy (decl_buf + decl_bufpos, str);
decl_bufpos += len;
}
static void
put_decl_node (node)
tree node;
{
int was_pointer = 0;
if (TREE_CODE (node) == POINTER_TYPE)
{
node = TREE_TYPE (node);
was_pointer = 1;
}
if (TREE_CODE_CLASS (TREE_CODE (node)) == 'd'
&& DECL_NAME (node) != NULL_TREE)
{
if (TREE_CODE (node) == FUNCTION_DECL)
{
if (! DECL_CONSTRUCTOR_P (node)
&& ! DECL_ARTIFICIAL (node) && DECL_CONTEXT (node))
{
put_decl_node (TYPE_NAME (DECL_CONTEXT (node)));
put_decl_string (".", 1);
}
if (! DECL_CONSTRUCTOR_P (node))
put_decl_node (DECL_NAME (node));
if (TREE_TYPE (node) != NULL_TREE)
{
int i = 0;
tree args = TYPE_ARG_TYPES (TREE_TYPE (node));
if (TREE_CODE (TREE_TYPE (node)) == METHOD_TYPE)
args = TREE_CHAIN (args);
put_decl_string ("(", 1);
for ( ; args != end_params_node; args = TREE_CHAIN (args), i++)
{
if (i > 0)
put_decl_string (",", 1);
put_decl_node (TREE_VALUE (args));
}
put_decl_string (")", 1);
}
}
else
put_decl_node (DECL_NAME (node));
}
else if (TREE_CODE_CLASS (TREE_CODE (node)) == 't'
&& TYPE_NAME (node) != NULL_TREE)
{
if (TREE_CODE (node) == RECORD_TYPE && TYPE_ARRAY_P (node))
{
put_decl_node (TYPE_ARRAY_ELEMENT (node));
put_decl_string("[]", 2);
}
else if (node == promoted_byte_type_node)
put_decl_string ("byte", 4);
else if (node == promoted_short_type_node)
put_decl_string ("short", 5);
else if (node == promoted_char_type_node)
put_decl_string ("char", 4);
else if (node == promoted_boolean_type_node)
put_decl_string ("boolean", 7);
else if (node == void_type_node && was_pointer)
put_decl_string ("null", 4);
else
put_decl_node (TYPE_NAME (node));
}
else if (TREE_CODE (node) == IDENTIFIER_NODE)
put_decl_string (IDENTIFIER_POINTER (node), IDENTIFIER_LENGTH (node));
else
put_decl_string ("<unknown>", -1);
}
const char *
lang_printable_name (decl, v)
tree decl;
int v __attribute__ ((__unused__));
{
decl_bufpos = 0;
put_decl_node (decl);
put_decl_string ("", 1);
return decl_buf;
}
const char *
lang_printable_name_wls (decl, v)
tree decl;
int v __attribute__ ((__unused__));
{
decl_bufpos = 1;
put_decl_node (decl);
put_decl_string ("", 1);
decl_buf [0] = ' ';
return decl_buf;
}
static GTY(()) tree last_error_function_context;
static GTY(()) tree last_error_function;
static void
java_print_error_function (context, file)
diagnostic_context *context __attribute__((__unused__));
const char *file;
{
if (inhibit_error_function_printing)
return;
if (current_function_decl != NULL
&& DECL_CONTEXT (current_function_decl) != last_error_function_context)
{
if (file)
fprintf (stderr, "%s: ", file);
last_error_function_context = DECL_CONTEXT (current_function_decl);
fprintf (stderr, "In class `%s':\n",
lang_printable_name (last_error_function_context, 0));
}
if (last_error_function != current_function_decl)
{
if (file)
fprintf (stderr, "%s: ", file);
if (current_function_decl == NULL)
fprintf (stderr, "At top level:\n");
else
{
const char *name = lang_printable_name (current_function_decl, 2);
fprintf (stderr, "In %s `%s':\n",
(DECL_CONSTRUCTOR_P (current_function_decl) ? "constructor"
: "method"),
name);
}
last_error_function = current_function_decl;
}
}
void lang_init_source (level)
int level;
{
inhibit_error_function_printing = (level == 1);
}
static void
java_init_options ()
{
flag_bounds_check = 1;
flag_exceptions = 1;
flag_non_call_exceptions = 1;
flag_trapping_math = 0;
}
static bool
java_can_use_bit_fields_p ()
{
return flag_emit_class_files ? false : true;
}
static bool
java_post_options ()
{
if (! flag_instrument_function_entry_exit)
{
if (!flag_no_inline)
flag_no_inline = 1;
if (flag_inline_functions)
{
flag_inline_trees = 2;
flag_inline_functions = 0;
}
}
return false;
}
tree
decl_constant_value (decl)
tree decl;
{
if (
current_function_decl != 0
&& ! TREE_THIS_VOLATILE (decl)
&& TREE_READONLY (decl)
&& DECL_INITIAL (decl) != 0
&& TREE_CODE (DECL_INITIAL (decl)) != ERROR_MARK
&& TREE_CONSTANT (DECL_INITIAL (decl))
&& TREE_CODE (DECL_INITIAL (decl)) != CONSTRUCTOR)
return DECL_INITIAL (decl);
return decl;
}
static tree
java_tree_inlining_walk_subtrees (tp,subtrees,func,data,htab)
tree *tp ATTRIBUTE_UNUSED;
int *subtrees ATTRIBUTE_UNUSED;
walk_tree_fn func ATTRIBUTE_UNUSED;
void *data ATTRIBUTE_UNUSED;
void *htab ATTRIBUTE_UNUSED;
{
enum tree_code code;
tree result;
#define WALK_SUBTREE(NODE) \
do \
{ \
result = walk_tree (&(NODE), func, data, htab); \
if (result) \
return result; \
} \
while (0)
tree t = *tp;
if (!t)
return NULL_TREE;
code = TREE_CODE (t);
switch (code)
{
case BLOCK:
if (BLOCK_EXPR_BODY (t))
{
tree *prev = &BLOCK_EXPR_BODY (*tp);
while (*prev)
{
WALK_SUBTREE (*prev);
prev = &TREE_CHAIN (*prev);
}
}
return NULL_TREE;
break;
default:
return NULL_TREE;
}
}
static int
java_unsafe_for_reeval (t)
tree t;
{
switch (TREE_CODE (t))
{
case BLOCK:
if (BLOCK_EXPR_DECLS (t) != NULL)
return 2;
return unsafe_for_reeval (BLOCK_EXPR_BODY (t));
default:
break;
}
return -1;
}
int
comptypes (type1, type2)
tree type1, type2;
{
register tree t1 = type1;
register tree t2 = type2;
if (t1 == t2 || !t1 || !t2
|| TREE_CODE (t1) == ERROR_MARK || TREE_CODE (t2) == ERROR_MARK)
return 1;
return 0;
}
tree
default_conversion (exp)
tree exp;
{
return exp;
}
tree
lang_build_type_variant (type, constp, volatilep)
tree type;
int constp, volatilep;
{
return type;
}
static int
merge_init_test_initialization (entry, x)
void * * entry;
void * x;
{
struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
splay_tree decl_map = (splay_tree)x;
splay_tree_node n;
tree *init_test_decl;
n = splay_tree_lookup (decl_map, (splay_tree_key) ite->value);
if (! n)
abort ();
init_test_decl = java_treetreehash_new
(DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ite->key);
if (!*init_test_decl)
*init_test_decl = (tree)n->value;
return true;
}
void
java_inlining_merge_static_initializers (fn, decl_map)
tree fn;
void *decl_map;
{
htab_traverse
(DECL_FUNCTION_INIT_TEST_TABLE (fn),
merge_init_test_initialization, decl_map);
}
static int
inline_init_test_initialization (entry, x)
void * * entry;
void * x;
{
struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
splay_tree decl_map = (splay_tree)x;
tree h = java_treetreehash_find
(DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ite->key);
if (! h)
return true;
splay_tree_insert (decl_map,
(splay_tree_key) ite->value,
(splay_tree_value) h);
return true;
}
void
java_inlining_map_static_initializers (fn, decl_map)
tree fn;
void *decl_map;
{
htab_traverse
(DECL_FUNCTION_INIT_TEST_TABLE (fn),
inline_init_test_initialization, decl_map);
}
static void
dump_compound_expr (di, t)
dump_info_p di;
tree t;
{
int i;
for (i=0; i<2; i++)
{
switch (TREE_CODE (TREE_OPERAND (t, i)))
{
case COMPOUND_EXPR:
dump_compound_expr (di, TREE_OPERAND (t, i));
break;
case EXPR_WITH_FILE_LOCATION:
{
tree wfl_node = EXPR_WFL_NODE (TREE_OPERAND (t, i));
dump_child ("expr", wfl_node);
break;
}
default:
dump_child ("expr", TREE_OPERAND (t, i));
}
}
}
static int
java_dump_tree (dump_info, t)
void *dump_info;
tree t;
{
enum tree_code code;
dump_info_p di = (dump_info_p) dump_info;
code = TREE_CODE (t);
switch (code)
{
case FUNCTION_DECL:
dump_child ("args", DECL_ARGUMENTS (t));
if (DECL_EXTERNAL (t))
dump_string (di, "undefined");
if (TREE_PUBLIC (t))
dump_string (di, "extern");
else
dump_string (di, "static");
if (DECL_LANG_SPECIFIC (t))
dump_child ("body", DECL_FUNCTION_BODY (t));
if (DECL_LANG_SPECIFIC (t) && !dump_flag (di, TDF_SLIM, t))
dump_child ("inline body", DECL_SAVED_TREE (t));
return 1;
case RETURN_EXPR:
dump_child ("expr", TREE_OPERAND (t, 0));
return 1;
case GOTO_EXPR:
dump_child ("goto", TREE_OPERAND (t, 0));
return 1;
case LABEL_EXPR:
dump_child ("label", TREE_OPERAND (t, 0));
return 1;
case LABELED_BLOCK_EXPR:
dump_child ("label", TREE_OPERAND (t, 0));
dump_child ("block", TREE_OPERAND (t, 1));
return 1;
case EXIT_BLOCK_EXPR:
dump_child ("block", TREE_OPERAND (t, 0));
dump_child ("val", TREE_OPERAND (t, 1));
return 1;
case BLOCK:
if (BLOCK_EXPR_BODY (t))
{
tree local = BLOCK_VARS (t);
while (local)
{
tree next = TREE_CHAIN (local);
dump_child ("var", local);
local = next;
}
{
tree block = BLOCK_EXPR_BODY (t);
dump_child ("body", block);
block = TREE_CHAIN (block);
}
}
return 1;
case COMPOUND_EXPR:
if (!dump_flag (di, TDF_SLIM, t))
return 0;
dump_compound_expr (di, t);
return 1;
default:
break;
}
return 0;
}
#include "gt-java-lang.h"