+2004-03-14 Roger Sayle <roger@eyesopen.com>
+
+ * alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) ()
+ with lang_hooks.foo ().
+ * builtins.c (expand_builtin_va_arg): Likewise.
+ * c-common.c (fname_as_string, c_common_truthvalue_conversion,
+ c_common_type_for_mode, c_common_nodes_and_builtins,
+ handle_mode_attribute, handle_vector_size_attribute): Likewise.
+ * c-convert.c (convert): Likewise.
+ * c-format.c (check_format_types): Likewise.
+ * c-objc-common.c (c_tree_printer): Likewise.
+ * c-typeck.c (build_unary_op, build_conditional_expr,
+ build_binary_op): Likewise.
+ * calls.c (try_to_integrate, expand_call,
+ emit_library_call_value_1): Likewise.
+ * cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p):
+ Likewise.
+ * cgraphunit.c (record_call_1, cgraph_analyze_function,
+ cgraph_expand_function): Likewise.
+ * convert.c (convert_to_pointer, convert_to_integer): Likewise.
+ * coverage.c (build_fn_info_type, build_ctr_info_type,
+ build_gcov_info, create_coverage): Likewise.
+ * dbxout.c (dbxout_init): Likewise.
+ * diagnostic.c (diagnostic_report_current_function): Likewise.
+ * dojump.c (do_jump): Likewise.
+ * dwarf2out.c (dwarf2_name): Likewise.
+ * except.c (init_eh): Likewise.
+ * explow.c (expr_size, int_expr_size): Likewise.
+ * expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add):
+ Likewise.
+ * expr.c (store_expr, store_constructor, safe_from_p,
+ expand_expr_real, do_store_flag, try_casesi): Likewise.
+ * function.c (push_function_context_to, pop_function_context_from,
+ free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type,
+ put_var_into_stack, allocate_struct_function, current_function_name):
+ Likewise.
+ * integrate.c (copy_decl_for_inlining, expand_inline_function):
+ Likewise.
+ * langhooks.c (lhd_clear_binding_stack, write_global_declarations,
+ lhd_print_error_function): Likewise.
+ * opts.c (handle_option, decode_options): Likewise.
+ * passes.c (open_dump_file): Likewise.
+ * print-tree.c (print_node): Likewise.
+ * stmt.c (expand_fixup, fixup_gotos, expand_asm_operands,
+ expand_decl_cleanup, emit_case_nodes): Likewise.
+ * stor-layout.c (variable_size): Likewise.
+ * toplev.c (announce_function, wrapup_global_declarations,
+ check_global_declarations, compile_file, default_tree_printer,
+ process_options, lang_dependent_init, finalize): Likewise.
+ * tree-dump.c (dequeue_and_dump): Likewise.
+ * tree-inline.c (remap_decl, remap_block, copy_body_r,
+ initialize_inlined_parameters, declare_return_variable,
+ inlinable_function_p, expand_call_inline, optimize_inline_calls,
+ walk_tree, copy_tree_r): Likewise.
+ * tree-optimize.c (tree_rest_of_compilation): Likewise.
+ * tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp,
+ unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl,
+ variably_modified_type_p, dump_tree_statistics): Likewise.
+ * varasm.c (assemble_variable, compare_constant, copy_constant,
+ force_const_mem, compute_reloc_for_constant, output_constant,
+ output_addressed_constants, initializer_constant_valid_p): Likewise.
+
2004-03-14 Kelley Cook <kcook@gcc.gnu.org>
* doc/install.texi: Make autoconf 2.13 the exception, not the rule.
/* Remove any nops, then give the language a chance to do
something with this tree before we look at it. */
STRIP_NOPS (t);
- set = (*lang_hooks.get_alias_set) (t);
+ set = lang_hooks.get_alias_set (t);
if (set != -1)
return set;
return TYPE_ALIAS_SET (t);
/* See if the language has special handling for this type. */
- set = (*lang_hooks.get_alias_set) (t);
+ set = lang_hooks.get_alias_set (t);
if (set != -1)
return set;
/* Generate a diagnostic for requesting data of a type that cannot
be passed through `...' due to type promotion at the call site. */
- else if ((promoted_type = (*lang_hooks.types.type_promotes_to) (type))
+ else if ((promoted_type = lang_hooks.types.type_promotes_to (type))
!= type)
{
const char *name = "<anonymous type>", *pname = 0;
}
if (current_function_decl)
- name = (*lang_hooks.decl_printable_name) (current_function_decl, vrb);
+ name = lang_hooks.decl_printable_name (current_function_decl, vrb);
return name;
}
case COMPLEX_EXPR:
return build_binary_op ((TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1))
? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR),
- (*lang_hooks.truthvalue_conversion) (TREE_OPERAND (expr, 0)),
- (*lang_hooks.truthvalue_conversion) (TREE_OPERAND (expr, 1)),
+ lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0)),
+ lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 1)),
0);
case NEGATE_EXPR:
case ABS_EXPR:
case FLOAT_EXPR:
/* These don't change whether an object is nonzero or zero. */
- return (*lang_hooks.truthvalue_conversion) (TREE_OPERAND (expr, 0));
+ return lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0));
case LROTATE_EXPR:
case RROTATE_EXPR:
we can't ignore them if their second arg has side-effects. */
if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1)))
return build (COMPOUND_EXPR, truthvalue_type_node, TREE_OPERAND (expr, 1),
- (*lang_hooks.truthvalue_conversion) (TREE_OPERAND (expr, 0)));
+ lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0)));
else
- return (*lang_hooks.truthvalue_conversion) (TREE_OPERAND (expr, 0));
+ return lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0));
case COND_EXPR:
/* Distribute the conversion into the arms of a COND_EXPR. */
return fold (build (COND_EXPR, truthvalue_type_node, TREE_OPERAND (expr, 0),
- (*lang_hooks.truthvalue_conversion) (TREE_OPERAND (expr, 1)),
- (*lang_hooks.truthvalue_conversion) (TREE_OPERAND (expr, 2))));
+ lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 1)),
+ lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 2))));
case CONVERT_EXPR:
/* Don't cancel the effect of a CONVERT_EXPR from a REFERENCE_TYPE,
/* If this is widening the argument, we can ignore it. */
if (TYPE_PRECISION (TREE_TYPE (expr))
>= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (expr, 0))))
- return (*lang_hooks.truthvalue_conversion) (TREE_OPERAND (expr, 0));
+ return lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0));
break;
case MINUS_EXPR:
return (build_binary_op
((TREE_SIDE_EFFECTS (expr)
? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR),
- (*lang_hooks.truthvalue_conversion) (build_unary_op (REALPART_EXPR, t, 0)),
- (*lang_hooks.truthvalue_conversion) (build_unary_op (IMAGPART_EXPR, t, 0)),
+ lang_hooks.truthvalue_conversion (build_unary_op (REALPART_EXPR, t, 0)),
+ lang_hooks.truthvalue_conversion (build_unary_op (IMAGPART_EXPR, t, 0)),
0));
}
/* These are types that c_common_type_for_size and
c_common_type_for_mode use. */
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- intQI_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- intHI_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- intSI_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- intDI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ intQI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ intHI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ intSI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ intDI_type_node));
#if HOST_BITS_PER_WIDE_INT >= 64
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("__int128_t"),
- intTI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__int128_t"),
+ intTI_type_node));
#endif
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- unsigned_intQI_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- unsigned_intHI_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- unsigned_intSI_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- unsigned_intDI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ unsigned_intQI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ unsigned_intHI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ unsigned_intSI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ unsigned_intDI_type_node));
#if HOST_BITS_PER_WIDE_INT >= 64
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("__uint128_t"),
- unsigned_intTI_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__uint128_t"),
+ unsigned_intTI_type_node));
#endif
/* Create the widest literal types. */
widest_integer_literal_type_node
= make_signed_type (HOST_BITS_PER_WIDE_INT * 2);
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- widest_integer_literal_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ widest_integer_literal_type_node));
widest_unsigned_literal_type_node
= make_unsigned_type (HOST_BITS_PER_WIDE_INT * 2);
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL, NULL_TREE,
- widest_unsigned_literal_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, NULL_TREE,
+ widest_unsigned_literal_type_node));
/* `unsigned long' is the standard type for sizeof.
Note that stddef.h uses `unsigned long',
record_builtin_type (RID_DOUBLE, NULL, double_type_node);
record_builtin_type (RID_MAX, "long double", long_double_type_node);
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("complex int"),
- complex_integer_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("complex float"),
- complex_float_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("complex double"),
- complex_double_type_node));
- (*lang_hooks.decls.pushdecl)
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("complex int"),
+ complex_integer_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("complex float"),
+ complex_float_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("complex double"),
+ complex_double_type_node));
+ lang_hooks.decls.pushdecl
(build_decl (TYPE_DECL, get_identifier ("complex long double"),
complex_long_double_type_node));
if (g77_integer_type_node != NULL_TREE)
{
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("__g77_integer"),
- g77_integer_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("__g77_uinteger"),
- g77_uinteger_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__g77_integer"),
+ g77_integer_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__g77_uinteger"),
+ g77_uinteger_type_node));
}
if (TYPE_PRECISION (float_type_node) * 2
if (g77_longint_type_node != NULL_TREE)
{
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("__g77_longint"),
- g77_longint_type_node));
- (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
- get_identifier ("__g77_ulongint"),
- g77_ulongint_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__g77_longint"),
+ g77_longint_type_node));
+ lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__g77_ulongint"),
+ g77_ulongint_type_node));
}
record_builtin_type (RID_VOID, NULL, void_type_node);
= TREE_TYPE (identifier_global_value (get_identifier (PTRDIFF_TYPE)));
unsigned_ptrdiff_type_node = c_common_unsigned_type (ptrdiff_type_node);
- (*lang_hooks.decls.pushdecl)
+ lang_hooks.decls.pushdecl
(build_decl (TYPE_DECL, get_identifier ("__builtin_va_list"),
va_list_type_node));
- (*lang_hooks.decls.pushdecl)
+ lang_hooks.decls.pushdecl
(build_decl (TYPE_DECL, get_identifier ("__builtin_ptrdiff_t"),
ptrdiff_type_node));
- (*lang_hooks.decls.pushdecl)
+ lang_hooks.decls.pushdecl
(build_decl (TYPE_DECL, get_identifier ("__builtin_size_t"),
sizetype));
if (mode == VOIDmode)
error ("unknown machine mode `%s'", p);
- else if (0 == (typefm = (*lang_hooks.types.type_for_mode)
+ else if (0 == (typefm = lang_hooks.types.type_for_mode
(mode, TREE_UNSIGNED (type))))
error ("no data type for mode `%s'", p);
else if ((TREE_CODE (type) == POINTER_TYPE
{
tree index, array, rt, list_node;
- new_type = (*lang_hooks.types.type_for_mode) (new_mode,
- TREE_UNSIGNED (type));
+ new_type = lang_hooks.types.type_for_mode (new_mode,
+ TREE_UNSIGNED (type));
if (!new_type)
{
return fold (convert_to_integer (type, e));
if (code == BOOLEAN_TYPE)
{
- tree t = (*lang_hooks.truthvalue_conversion) (expr);
+ tree t = lang_hooks.truthvalue_conversion (expr);
if (TREE_CODE (t) == ERROR_MARK)
return t;
/* Check calls to formatted I/O functions (-Wformat).
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC.
abort ();
if (types->pointer_count == 0)
- wanted_type = (*lang_hooks.types.type_promotes_to) (wanted_type);
+ wanted_type = lang_hooks.types.type_promotes_to (wanted_type);
STRIP_NOPS (cur_param);
case 'D':
case 'F':
if (DECL_NAME (t))
- n = (*lang_hooks.decl_printable_name) (t, 2);
+ n = lang_hooks.decl_printable_name (t, 2);
break;
case 'T':
if (TREE_CODE (t) == TYPE_DECL)
{
if (DECL_NAME (t))
- n = (*lang_hooks.decl_printable_name) (t, 2);
+ n = lang_hooks.decl_printable_name (t, 2);
}
else
{
error ("wrong type argument to unary exclamation mark");
return error_mark_node;
}
- arg = (*lang_hooks.truthvalue_conversion) (arg);
+ arg = lang_hooks.truthvalue_conversion (arg);
return invert_truthvalue (arg);
case NOP_EXPR:
tree result_type = NULL;
tree orig_op1 = op1, orig_op2 = op2;
- ifexp = (*lang_hooks.truthvalue_conversion) (default_conversion (ifexp));
+ ifexp = lang_hooks.truthvalue_conversion (default_conversion (ifexp));
/* Promote both alternatives. */
but that does not mean the operands should be
converted to ints! */
result_type = integer_type_node;
- op0 = (*lang_hooks.truthvalue_conversion) (op0);
- op1 = (*lang_hooks.truthvalue_conversion) (op1);
+ op0 = lang_hooks.truthvalue_conversion (op0);
+ op1 = lang_hooks.truthvalue_conversion (op1);
converted = 1;
}
break;
warning ("%Jinlining failed in call to '%F'", fndecl, fndecl);
warning ("called from here");
}
- (*lang_hooks.mark_addressable) (fndecl);
+ lang_hooks.mark_addressable (fndecl);
return (rtx) (size_t) - 1;
}
warning ("%Jcan't inline call to '%F'", fndecl, fndecl);
warning ("called from here");
}
- (*lang_hooks.mark_addressable) (fndecl);
+ lang_hooks.mark_addressable (fndecl);
}
if (ignore
/* In case this is a static function, note that it has been
used. */
if (! TREE_ADDRESSABLE (fndecl))
- (*lang_hooks.mark_addressable) (fndecl);
+ lang_hooks.mark_addressable (fndecl);
is_integrable = 0;
}
}
!= RETURN_POPS_ARGS (current_function_decl,
TREE_TYPE (current_function_decl),
current_function_args_size))
- || !(*lang_hooks.decls.ok_for_sibcall) (fndecl))
+ || !lang_hooks.decls.ok_for_sibcall (fndecl))
try_tail_call = 0;
if (try_tail_call || try_tail_recursion)
decide where in memory it should come back. */
if (outmode != VOIDmode)
{
- tfom = (*lang_hooks.types.type_for_mode) (outmode, 0);
+ tfom = lang_hooks.types.type_for_mode (outmode, 0);
if (aggregate_value_p (tfom, 0))
{
#ifdef PCC_STATIC_STRUCT_RETURN
slot = val;
else if (must_copy)
{
- slot = assign_temp ((*lang_hooks.types.type_for_mode) (mode, 0),
+ slot = assign_temp (lang_hooks.types.type_for_mode (mode, 0),
0, 1, 1);
emit_move_insn (slot, val);
}
else
{
- tree type = (*lang_hooks.types.type_for_mode) (mode, 0);
+ tree type = lang_hooks.types.type_for_mode (mode, 0);
slot
= gen_rtx_MEM (mode,
const char *
cgraph_node_name (struct cgraph_node *node)
{
- return (*lang_hooks.decl_printable_name) (node->decl, 2);
+ return lang_hooks.decl_printable_name (node->decl, 2);
}
/* Dump the callgraph. */
if (!cgraph_global_info_ready)
return (DECL_INLINE (decl)
&& (!flag_really_no_inline
- || (*lang_hooks.tree_inlining.disregard_inline_limits) (decl)));
+ || lang_hooks.tree_inlining.disregard_inline_limits (decl)));
return cgraph_node (decl)->global.inlined;
}
}
if ((unsigned int) TREE_CODE (t) >= LAST_AND_UNUSED_TREE_CODE)
- return (*lang_hooks.callgraph.analyze_expr) (tp, walk_subtrees, data);
+ return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees, data);
break;
}
node->local.inlinable = tree_inlinable_function_p (decl);
if (!node->local.self_insns)
node->local.self_insns
- = (*lang_hooks.tree_inlining.estimate_num_insns) (decl);
+ = lang_hooks.tree_inlining.estimate_num_insns (decl);
if (node->local.inlinable)
node->local.disregard_inline_limits
- = (*lang_hooks.tree_inlining.disregard_inline_limits) (decl);
+ = lang_hooks.tree_inlining.disregard_inline_limits (decl);
for (e = node->callers; e; e = e->next_caller)
if (e->inline_failed)
{
/* Generate RTL for the body of DECL. Nested functions are expanded
via lang_expand_decl_stmt. */
- (*lang_hooks.callgraph.expand_function) (decl);
+ lang_hooks.callgraph.expand_function (decl);
if (DECL_DEFER_OUTPUT (decl))
abort ();
return
convert_to_pointer (type,
- convert ((*lang_hooks.types.type_for_size)
+ convert (lang_hooks.types.type_for_size
(POINTER_SIZE, 0), expr));
default:
if (integer_zerop (expr))
expr = integer_zero_node;
else
- expr = fold (build1 (CONVERT_EXPR, (*lang_hooks.types.type_for_size)
- (POINTER_SIZE, 0), expr));
+ expr = fold (build1 (CONVERT_EXPR,
+ lang_hooks.types.type_for_size (POINTER_SIZE, 0),
+ expr));
return convert_to_integer (type, expr);
else if (TREE_CODE (type) == ENUMERAL_TYPE
|| outprec != GET_MODE_BITSIZE (TYPE_MODE (type)))
return build1 (NOP_EXPR, type,
- convert ((*lang_hooks.types.type_for_mode)
+ convert (lang_hooks.types.type_for_mode
(TYPE_MODE (type), TREE_UNSIGNED (type)),
expr));
/* Can't do arithmetic in enumeral types
so use an integer type that will hold the values. */
if (TREE_CODE (typex) == ENUMERAL_TYPE)
- typex = (*lang_hooks.types.type_for_size)
+ typex = lang_hooks.types.type_for_size
(TYPE_PRECISION (typex), TREE_UNSIGNED (typex));
/* But now perhaps TYPEX is as wide as INPREC.
|| ex_form == LROTATE_EXPR
|| ex_form == RROTATE_EXPR))
|| ex_form == LSHIFT_EXPR)
- typex = (*lang_hooks.types.unsigned_type) (typex);
+ typex = lang_hooks.types.unsigned_type (typex);
else
- typex = (*lang_hooks.types.signed_type) (typex);
+ typex = lang_hooks.types.signed_type (typex);
return convert (type,
fold (build (ex_form, typex,
convert (typex, arg0),
/* Can't do arithmetic in enumeral types
so use an integer type that will hold the values. */
if (TREE_CODE (typex) == ENUMERAL_TYPE)
- typex = (*lang_hooks.types.type_for_size)
+ typex = lang_hooks.types.type_for_size
(TYPE_PRECISION (typex), TREE_UNSIGNED (typex));
/* But now perhaps TYPEX is as wide as INPREC.
/* Don't do unsigned arithmetic where signed was wanted,
or vice versa. */
if (TREE_UNSIGNED (TREE_TYPE (expr)))
- typex = (*lang_hooks.types.unsigned_type) (typex);
+ typex = lang_hooks.types.unsigned_type (typex);
else
- typex = (*lang_hooks.types.signed_type) (typex);
+ typex = lang_hooks.types.signed_type (typex);
return convert (type,
fold (build1 (ex_form, typex,
convert (typex,
static tree
build_fn_info_type (unsigned int counters)
{
- tree type = (*lang_hooks.types.make_type) (RECORD_TYPE);
+ tree type = lang_hooks.types.make_type (RECORD_TYPE);
tree field, fields;
tree array_type;
static tree
build_ctr_info_type (void)
{
- tree type = (*lang_hooks.types.make_type) (RECORD_TYPE);
+ tree type = lang_hooks.types.make_type (RECORD_TYPE);
tree field, fields = NULL_TREE;
tree gcov_ptr_type = build_pointer_type (GCOV_TYPE_NODE);
tree gcov_merge_fn_type;
if (prg_ctr_mask & (1 << ix))
n_ctr_types++;
- type = (*lang_hooks.types.make_type) (RECORD_TYPE);
+ type = lang_hooks.types.make_type (RECORD_TYPE);
const_type = build_qualified_type (type, TYPE_QUAL_CONST);
/* Version ident */
DECL_RESULT (ctor) = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
DECL_UNINLINABLE (ctor) = 1;
- ctor = (*lang_hooks.decls.pushdecl) (ctor);
+ ctor = lang_hooks.decls.pushdecl (ctor);
rest_of_decl_compilation (ctor, 0, 1, 0);
announce_function (ctor);
current_function_decl = ctor;
dbxout_init (const char *input_file_name)
{
char ltext_label_name[100];
- tree syms = (*lang_hooks.decls.getdecls) ();
+ tree syms = lang_hooks.decls.getdecls ();
asmfile = asm_out_file;
diagnostic_report_current_function (diagnostic_context *context)
{
diagnostic_report_current_module (context);
- (*lang_hooks.print_error_function) (context, input_filename);
+ lang_hooks.print_error_function (context, input_filename);
}
void
/* Convert tree expression to rtl instructions, for GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC.
case UNSAVE_EXPR:
do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label);
TREE_OPERAND (exp, 0)
- = (*lang_hooks.unsave_expr_now) (TREE_OPERAND (exp, 0));
+ = lang_hooks.unsave_expr_now (TREE_OPERAND (exp, 0));
break;
case NOP_EXPR:
&& TYPE_PRECISION (TREE_TYPE (exp)) <= HOST_BITS_PER_WIDE_INT
&& (i = tree_floor_log2 (TREE_OPERAND (exp, 1))) >= 0
&& (mode = mode_for_size (i + 1, MODE_INT, 0)) != BLKmode
- && (type = (*lang_hooks.types.type_for_mode) (mode, 1)) != 0
+ && (type = lang_hooks.types.type_for_mode (mode, 1)) != 0
&& TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (exp))
&& (cmp_optab->handlers[(int) TYPE_MODE (type)].insn_code
!= CODE_FOR_nothing))
get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode,
&unsignedp, &volatilep);
- type = (*lang_hooks.types.type_for_size) (bitsize, unsignedp);
+ type = lang_hooks.types.type_for_size (bitsize, unsignedp);
if (! SLOW_BYTE_ACCESS
&& type != 0 && bitsize >= 0
&& TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (exp))
static const char *
dwarf2_name (tree decl, int scope)
{
- return (*lang_hooks.decl_printable_name) (decl, scope ? 1 : 0);
+ return lang_hooks.decl_printable_name (decl, scope ? 1 : 0);
}
/* Add a new entry to .debug_pubnames if appropriate. */
{
tree f_jbuf, f_per, f_lsda, f_prev, f_cs, f_data, tmp;
- sjlj_fc_type_node = (*lang_hooks.types.make_type) (RECORD_TYPE);
+ sjlj_fc_type_node = lang_hooks.types.make_type (RECORD_TYPE);
f_prev = build_decl (FIELD_DECL, get_identifier ("__prev"),
build_pointer_type (sjlj_fc_type_node));
DECL_FIELD_CONTEXT (f_cs) = sjlj_fc_type_node;
tmp = build_index_type (build_int_2 (4 - 1, 0));
- tmp = build_array_type ((*lang_hooks.types.type_for_mode) (word_mode, 1),
+ tmp = build_array_type (lang_hooks.types.type_for_mode (word_mode, 1),
tmp);
f_data = build_decl (FIELD_DECL, get_identifier ("__data"), tmp);
DECL_FIELD_CONTEXT (f_data) = sjlj_fc_type_node;
rtx
expr_size (tree exp)
{
- tree size = (*lang_hooks.expr_size) (exp);
+ tree size = lang_hooks.expr_size (exp);
if (CONTAINS_PLACEHOLDER_P (size))
size = build (WITH_RECORD_EXPR, sizetype, size, exp);
HOST_WIDE_INT
int_expr_size (tree exp)
{
- tree t = (*lang_hooks.expr_size) (exp);
+ tree t = lang_hooks.expr_size (exp);
if (t == 0
|| TREE_CODE (t) != INTEGER_CST
make_tree (type, XEXP (x, 1))));
case LSHIFTRT:
- t = (*lang_hooks.types.unsigned_type) (type);
+ t = lang_hooks.types.unsigned_type (type);
return fold (convert (type,
build (RSHIFT_EXPR, t,
make_tree (t, XEXP (x, 0)),
make_tree (type, XEXP (x, 1)))));
case ASHIFTRT:
- t = (*lang_hooks.types.signed_type) (type);
+ t = lang_hooks.types.signed_type (type);
return fold (convert (type,
build (RSHIFT_EXPR, t,
make_tree (t, XEXP (x, 0)),
case DIV:
if (TREE_CODE (type) != REAL_TYPE)
- t = (*lang_hooks.types.signed_type) (type);
+ t = lang_hooks.types.signed_type (type);
else
t = type;
make_tree (t, XEXP (x, 0)),
make_tree (t, XEXP (x, 1)))));
case UDIV:
- t = (*lang_hooks.types.unsigned_type) (type);
+ t = lang_hooks.types.unsigned_type (type);
return fold (convert (type,
build (TRUNC_DIV_EXPR, t,
make_tree (t, XEXP (x, 0)),
case SIGN_EXTEND:
case ZERO_EXTEND:
- t = (*lang_hooks.types.type_for_mode) (GET_MODE (XEXP (x, 0)),
- GET_CODE (x) == ZERO_EXTEND);
+ t = lang_hooks.types.type_for_mode (GET_MODE (XEXP (x, 0)),
+ GET_CODE (x) == ZERO_EXTEND);
return fold (convert (type, make_tree (t, XEXP (x, 0))));
default:
{
tree type, mult_type, add_type, result;
- type = (*lang_hooks.types.type_for_mode) (mode, unsignedp);
+ type = lang_hooks.types.type_for_mode (mode, unsignedp);
/* In order to get a proper overflow indication from an unsigned
type, we have to pretend that it's a sizetype. */
}
add_type = (GET_MODE (add) == VOIDmode ? mult_type
- : (*lang_hooks.types.type_for_mode) (GET_MODE (add), unsignedp));
+ : lang_hooks.types.type_for_mode (GET_MODE (add), unsignedp));
result = fold (build (PLUS_EXPR, mult_type,
fold (build (MULT_EXPR, mult_type,
expand_mult_add (rtx x, rtx target, rtx mult, rtx add, enum machine_mode mode,
int unsignedp)
{
- tree type = (*lang_hooks.types.type_for_mode) (mode, unsignedp);
+ tree type = lang_hooks.types.type_for_mode (mode, unsignedp);
tree add_type = (GET_MODE (add) == VOIDmode
- ? type: (*lang_hooks.types.type_for_mode) (GET_MODE (add),
- unsignedp));
+ ? type: lang_hooks.types.type_for_mode (GET_MODE (add),
+ unsignedp));
tree result = fold (build (PLUS_EXPR, type,
fold (build (MULT_EXPR, type,
make_tree (type, x),
if (TREE_UNSIGNED (TREE_TYPE (exp))
!= SUBREG_PROMOTED_UNSIGNED_P (target))
exp = convert
- ((*lang_hooks.types.signed_or_unsigned_type)
+ (lang_hooks.types.signed_or_unsigned_type
(SUBREG_PROMOTED_UNSIGNED_P (target), TREE_TYPE (exp)), exp);
- exp = convert ((*lang_hooks.types.type_for_mode)
+ exp = convert (lang_hooks.types.type_for_mode
(GET_MODE (SUBREG_REG (target)),
SUBREG_PROMOTED_UNSIGNED_P (target)),
exp);
if (TYPE_PRECISION (type) < BITS_PER_WORD)
{
- type = (*lang_hooks.types.type_for_size)
+ type = lang_hooks.types.type_for_size
(BITS_PER_WORD, TREE_UNSIGNED (type));
value = convert (type, value);
}
{
targetx
= assign_temp
- ((build_qualified_type ((*lang_hooks.types.type_for_mode)
+ ((build_qualified_type (lang_hooks.types.type_for_mode
(GET_MODE (target), 0),
TYPE_QUAL_CONST)),
0, 1, 1);
special handling. */
if ((unsigned int) TREE_CODE (exp)
>= (unsigned int) LAST_AND_UNUSED_TREE_CODE
- && !(*lang_hooks.safe_from_p) (x, exp))
+ && !lang_hooks.safe_from_p (x, exp))
return 0;
}
DECL_NONLOCAL (exp) = 1;
if (DECL_NO_STATIC_CHAIN (current_function_decl))
abort ();
- (*lang_hooks.mark_addressable) (exp);
+ lang_hooks.mark_addressable (exp);
if (GET_CODE (DECL_RTL (exp)) != MEM)
abort ();
addr = XEXP (DECL_RTL (exp), 0);
rtx temp;
temp = expand_expr (TREE_OPERAND (exp, 0), target, tmode, modifier);
TREE_OPERAND (exp, 0)
- = (*lang_hooks.unsave_expr_now) (TREE_OPERAND (exp, 0));
+ = lang_hooks.unsave_expr_now (TREE_OPERAND (exp, 0));
return temp;
}
/* Mark the corresponding BLOCK for output in its proper place. */
if (TREE_OPERAND (exp, 2) != 0
&& ! TREE_USED (TREE_OPERAND (exp, 2)))
- (*lang_hooks.decls.insert_block) (TREE_OPERAND (exp, 2));
+ lang_hooks.decls.insert_block (TREE_OPERAND (exp, 2));
/* If VARS have not yet been expanded, expand them now. */
while (vars)
{
if (DECL_BUILT_IN_CLASS (TREE_OPERAND (TREE_OPERAND (exp, 0), 0))
== BUILT_IN_FRONTEND)
+ /* ??? Use (*fun) form because expand_expr is a macro. */
return (*lang_hooks.expand_expr) (exp, original_target,
tmode, modifier,
alt_rtl);
if (TREE_OPERAND (exp, 2) == 0)
TREE_OPERAND (exp, 2)
- = (*lang_hooks.maybe_build_cleanup) (slot);
+ = lang_hooks.maybe_build_cleanup (slot);
cleanups = TREE_OPERAND (exp, 2);
}
}
abort ();
default:
- return (*lang_hooks.expand_expr) (exp, original_target, tmode, modifier,
- alt_rtl);
+ /* ??? Use (*fun) form because expand_expr is a macro. */
+ return (*lang_hooks.expand_expr) (exp, original_target, tmode,
+ modifier, alt_rtl);
}
/* Here to do an ordinary binary operator, generating an instruction
&& TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1)
&& integer_pow2p (TREE_OPERAND (arg0, 1)))
{
- tree type = (*lang_hooks.types.type_for_mode) (mode, unsignedp);
+ tree type = lang_hooks.types.type_for_mode (mode, unsignedp);
return expand_expr (fold_single_bit_test (code == NE ? NE_EXPR : EQ_EXPR,
arg0, arg1, type),
target, VOIDmode, EXPAND_NORMAL);
{
if (TYPE_MODE (index_type) != index_mode)
{
- index_expr = convert ((*lang_hooks.types.type_for_size)
+ index_expr = convert (lang_hooks.types.type_for_size
(index_bits, 0), index_expr);
index_type = TREE_TYPE (index_expr);
}
outer_function_chain = p;
p->fixup_var_refs_queue = 0;
- (*lang_hooks.function.enter_nested) (p);
+ lang_hooks.function.enter_nested (p);
cfun = 0;
}
restore_emit_status (p);
- (*lang_hooks.function.leave_nested) (p);
+ lang_hooks.function.leave_nested (p);
/* Finish doing put_var_into_stack for any of our variables which became
addressable during the nested function. If only one entry has to be
/* f->varasm is used by code generation. */
/* f->eh->eh_return_stub_label is used by code generation. */
- (*lang_hooks.function.final) (f);
+ lang_hooks.function.final (f);
f->stmt = NULL;
}
/* Allow the target to (possibly) increase the alignment of this
stack slot. */
- type = (*lang_hooks.types.type_for_mode) (mode, 0);
+ type = lang_hooks.types.type_for_mode (mode, 0);
if (type)
alignment = LOCAL_ALIGNMENT (type, alignment);
align = GET_MODE_ALIGNMENT (mode);
if (! type)
- type = (*lang_hooks.types.type_for_mode) (mode, 0);
+ type = lang_hooks.types.type_for_mode (mode, 0);
if (type)
align = LOCAL_ALIGNMENT (type, align);
to the whole CONCAT, lest we do double fixups for the latter
references. */
enum machine_mode part_mode = GET_MODE (XEXP (reg, 0));
- tree part_type = (*lang_hooks.types.type_for_mode) (part_mode, 0);
+ tree part_type = lang_hooks.types.type_for_mode (part_mode, 0);
rtx lopart = XEXP (reg, 0);
rtx hipart = XEXP (reg, 1);
#ifdef FRAME_GROWS_DOWNWARD
init_stmt_for_function ();
init_eh_for_function ();
- (*lang_hooks.function.init) (cfun);
+ lang_hooks.function.init (cfun);
if (init_machine_status)
cfun->machine = (*init_machine_status) ();
const char *
current_function_name (void)
{
- return (*lang_hooks.decl_printable_name) (cfun->decl, 2);
+ return lang_hooks.decl_printable_name (cfun->decl, 2);
}
#include "gt-function.h"
copy = copy_node (decl);
/* The COPY is not abstract; it will be generated in TO_FN. */
DECL_ABSTRACT (copy) = 0;
- (*lang_hooks.dup_lang_specific_decl) (copy);
+ lang_hooks.dup_lang_specific_decl (copy);
/* TREE_ADDRESSABLE isn't used to indicate that a label's
address has been taken; it's for internal bookkeeping in
this block to the list of blocks at this binding level. We
can't do it the way it's done for function-at-a-time mode the
superblocks have not been created yet. */
- (*lang_hooks.decls.insert_block) (block);
+ lang_hooks.decls.insert_block (block);
else
{
BLOCK_CHAIN (block)
void
lhd_clear_binding_stack (void)
{
- while (! (*lang_hooks.decls.global_bindings_p) ())
+ while (! lang_hooks.decls.global_bindings_p ())
poplevel (0, 0, 0);
}
Really output inline functions that must actually be callable
and have not been output so far. */
- tree globals = (*lang_hooks.decls.getdecls) ();
+ tree globals = lang_hooks.decls.getdecls ();
int len = list_length (globals);
tree *vec = xmalloc (sizeof (tree) * len);
int i;
if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
pp_printf
(context->printer, "In member function `%s':",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2));
+ lang_hooks.decl_printable_name (current_function_decl, 2));
else
pp_printf
(context->printer, "In function `%s':",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2));
+ lang_hooks.decl_printable_name (current_function_decl, 2));
}
diagnostic_set_last_function (context);
if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE)))
{
- if (!(*lang_hooks.missing_argument) (opt, opt_index))
+ if (!lang_hooks.missing_argument (opt, opt_index))
error ("missing argument to \"%s\"", opt);
goto done;
}
}
if (option->flags & lang_mask)
- if ((*lang_hooks.handle_option) (opt_index, arg, value) == 0)
+ if (lang_hooks.handle_option (opt_index, arg, value) == 0)
result = 0;
if (result && (option->flags & CL_COMMON))
unsigned int i, lang_mask;
/* Perform language-specific options initialization. */
- lang_mask = (*lang_hooks.init_options) (argc, argv);
+ lang_mask = lang_hooks.init_options (argc, argv);
lang_hooks.initialize_diagnostics (global_dc);
if (decl)
fprintf (dump_file, "\n;; Function %s%s\n\n",
- (*lang_hooks.decl_printable_name) (decl, 2),
+ lang_hooks.decl_printable_name (decl, 2),
cfun->function_frequency == FUNCTION_FREQUENCY_HOT
? " (hot)"
: cfun->function_frequency == FUNCTION_FREQUENCY_UNLIKELY_EXECUTED
print_node (file, "result", DECL_RESULT_FLD (node), indent + 4);
print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4);
- (*lang_hooks.print_decl) (file, node, indent);
+ lang_hooks.print_decl (file, node, indent);
if (DECL_RTL_SET_P (node))
{
if (TYPE_CONTEXT (node))
print_node_brief (file, "context", TYPE_CONTEXT (node), indent + 4);
- (*lang_hooks.print_type) (file, node, indent);
+ lang_hooks.print_type (file, node, indent);
if (TYPE_POINTER_TO (node) || TREE_CHAIN (node))
indent_to (file, indent + 3);
break;
case IDENTIFIER_NODE:
- (*lang_hooks.print_identifier) (file, node, indent);
+ lang_hooks.print_identifier (file, node, indent);
break;
case TREE_LIST:
default:
if (TREE_CODE_CLASS (TREE_CODE (node)) == 'x')
- (*lang_hooks.print_xnode) (file, node, indent);
+ lang_hooks.print_xnode (file, node, indent);
break;
}
TREE_USED (block) = 1;
if (!cfun->x_whole_function_mode_p)
- (*lang_hooks.decls.insert_block) (block);
+ lang_hooks.decls.insert_block (block);
else
{
BLOCK_CHAIN (block)
logically be inserting the fixup code. We do this for the
sake of getting the debugging information right. */
- (*lang_hooks.decls.pushlevel) (0);
- (*lang_hooks.decls.set_block) (f->context);
+ lang_hooks.decls.pushlevel (0);
+ lang_hooks.decls.set_block (f->context);
/* Expand the cleanups for blocks this jump exits. */
if (f->cleanup_list_list)
destructed are still "in scope". */
cleanup_insns = get_insns ();
- (*lang_hooks.decls.poplevel) (1, 0, 0);
+ lang_hooks.decls.poplevel (1, 0, 0);
end_sequence ();
emit_insn_after (cleanup_insns, f->before_jump);
if (TREE_CHAIN (lists) == thisblock->data.block.outer_cleanups)
{
start_sequence ();
- (*lang_hooks.decls.pushlevel) (0);
- (*lang_hooks.decls.set_block) (f->context);
+ lang_hooks.decls.pushlevel (0);
+ lang_hooks.decls.set_block (f->context);
expand_cleanups (TREE_VALUE (lists), 1, 1);
do_pending_stack_adjust ();
cleanup_insns = get_insns ();
- (*lang_hooks.decls.poplevel) (1, 0, 0);
+ lang_hooks.decls.poplevel (1, 0, 0);
end_sequence ();
if (cleanup_insns != 0)
f->before_jump
|| (DECL_P (val)
&& GET_CODE (DECL_RTL (val)) == REG
&& GET_MODE (DECL_RTL (val)) != TYPE_MODE (type))))
- (*lang_hooks.mark_addressable) (val);
+ lang_hooks.mark_addressable (val);
if (is_inout)
ninout++;
return;
if (! allows_reg && allows_mem)
- (*lang_hooks.mark_addressable) (TREE_VALUE (tail));
+ lang_hooks.mark_addressable (TREE_VALUE (tail));
}
/* Second pass evaluates arguments. */
emit_move_insn (flag, const1_rtx);
cond = build_decl (VAR_DECL, NULL_TREE,
- (*lang_hooks.types.type_for_mode) (word_mode, 1));
+ lang_hooks.types.type_for_mode (word_mode, 1));
SET_DECL_RTL (cond, flag);
/* Conditionalize the cleanup. */
cleanup = build (COND_EXPR, void_type_node,
- (*lang_hooks.truthvalue_conversion) (cond),
+ lang_hooks.truthvalue_conversion (cond),
cleanup, integer_zero_node);
cleanup = fold (cleanup);
else if (!low_bound && !high_bound)
{
/* Widen LOW and HIGH to the same width as INDEX. */
- tree type = (*lang_hooks.types.type_for_mode) (mode, unsignedp);
+ tree type = lang_hooks.types.type_for_mode (mode, unsignedp);
tree low = build1 (CONVERT_EXPR, type, node->low);
tree high = build1 (CONVERT_EXPR, type, node->high);
rtx low_rtx, new_index, new_bound;
just return SIZE unchanged. Likewise for self-referential sizes and
constant sizes. */
if (TREE_CONSTANT (size)
- || (*lang_hooks.decls.global_bindings_p) () < 0
+ || lang_hooks.decls.global_bindings_p () < 0
|| CONTAINS_PLACEHOLDER_P (size))
return size;
if (TREE_CODE (save) == SAVE_EXPR)
SAVE_EXPR_PERSISTENT_P (save) = 1;
- if ((*lang_hooks.decls.global_bindings_p) ())
+ if (lang_hooks.decls.global_bindings_p ())
{
if (TREE_CONSTANT (size))
error ("type size can't be explicitly evaluated");
if (rtl_dump_and_exit)
verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
else
- verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2));
+ verbatim (" %s", lang_hooks.decl_printable_name (decl, 2));
fflush (stderr);
pp_needs_newline (global_dc->printer) = true;
diagnostic_set_last_function (global_dc);
DECL_DEFER_OUTPUT (decl) = 0;
if (TREE_CODE (decl) == VAR_DECL && DECL_SIZE (decl) == 0)
- (*lang_hooks.finish_incomplete_decl) (decl);
+ lang_hooks.finish_incomplete_decl (decl);
}
/* Now emit any global variables or functions that we have been
/* Global register variables must be declared to reserve them. */
&& ! (TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
/* Otherwise, ask the language. */
- && (*lang_hooks.decls.warn_unused_global) (decl))
+ && lang_hooks.decls.warn_unused_global (decl))
warning ("%J'%D' defined but not used", decl, decl);
/* Avoid confusing the debug information machinery when there are
/* Call the parser, which parses the entire file (calling
rest_of_compilation for each function). */
- (*lang_hooks.parse_file) (set_yydebug);
+ lang_hooks.parse_file (set_yydebug);
/* In case there were missing block closers,
get us back to the global binding level. */
- (*lang_hooks.clear_binding_stack) ();
+ lang_hooks.clear_binding_stack ();
/* Compilation is now finished except for writing
what's left of the symbol table output. */
if (flag_syntax_only)
return;
- (*lang_hooks.decls.final_write_globals)();
+ lang_hooks.decls.final_write_globals ();
cgraph_varpool_assemble_pending_decls ();
{
tree t = va_arg (*text->args_ptr, tree);
const char *n = DECL_NAME (t)
- ? (*lang_hooks.decl_printable_name) (t, 2)
+ ? lang_hooks.decl_printable_name (t, 2)
: "<anonymous>";
pp_string (pp, n);
}
initialization based on the command line options. This hook also
sets the original filename if appropriate (e.g. foo.i -> foo.c)
so we can correctly initialize debug output. */
- no_backend = (*lang_hooks.post_options) (&main_input_filename);
+ no_backend = lang_hooks.post_options (&main_input_filename);
input_filename = main_input_filename;
#ifdef OVERRIDE_OPTIONS
dump_base_name = name ? name : "gccdump";
/* Other front-end initialization. */
- if ((*lang_hooks.init) () == 0)
+ if (lang_hooks.init () == 0)
return 0;
init_asm_output (name);
free_reg_info ();
/* Language-specific end of compilation actions. */
- (*lang_hooks.finish) ();
+ lang_hooks.finish ();
}
/* Initialize the compiler, and compile the input file. */
/* Tree-dumping functionality for intermediate representation.
- Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com>
This file is part of GCC.
else if (code_class == 't')
{
/* All types have qualifiers. */
- int quals = (*lang_hooks.tree_dump.type_quals) (t);
+ int quals = lang_hooks.tree_dump.type_quals (t);
if (quals != TYPE_UNQUALIFIED)
{
/* Give the language-specific code a chance to print something. If
it's completely taken care of things, don't bother printing
anything more ourselves. */
- if ((*lang_hooks.tree_dump.dump_tree) (di, t))
+ if (lang_hooks.tree_dump.dump_tree (di, t))
goto done;
/* Now handle the various kinds of nodes. */
/* We only remap local variables in the current function. */
fn = VARRAY_TOP_TREE (id->fns);
- if (! (*lang_hooks.tree_inlining.auto_var_in_fn_p) (decl, fn))
+ if (! lang_hooks.tree_inlining.auto_var_in_fn_p (decl, fn))
return NULL_TREE;
/* See if we have remapped this declaration. */
#ifndef INLINER_FOR_JAVA
if (! DECL_NAME (t) && TREE_TYPE (t)
- && (*lang_hooks.tree_inlining.anon_aggr_type_p) (TREE_TYPE (t)))
+ && lang_hooks.tree_inlining.anon_aggr_type_p (TREE_TYPE (t)))
{
/* For a VAR_DECL of anonymous type, we must also copy the
member VAR_DECLS here and rechain the DECL_ANON_UNION_ELEMS. */
/* We're building a clone; DECL_INITIAL is still
error_mark_node, and current_binding_level is the parm
binding level. */
- (*lang_hooks.decls.insert_block) (new_block);
+ lang_hooks.decls.insert_block (new_block);
else
{
/* Attach this new block after the DECL_INITIAL block for the
variables. We don't want to copy static variables; there's only
one of those, no matter how many times we inline the containing
function. */
- else if ((*lang_hooks.tree_inlining.auto_var_in_fn_p) (*tp, fn))
+ else if (lang_hooks.tree_inlining.auto_var_in_fn_p (*tp, fn))
{
tree new_decl;
{
if (TREE_CODE (*tp) == MODIFY_EXPR
&& TREE_OPERAND (*tp, 0) == TREE_OPERAND (*tp, 1)
- && ((*lang_hooks.tree_inlining.auto_var_in_fn_p)
+ && (lang_hooks.tree_inlining.auto_var_in_fn_p
(TREE_OPERAND (*tp, 0), fn)))
{
/* Some assignments VAR = VAR; don't generate any rtl code
}
}
else if (TREE_CODE (*tp) == ADDR_EXPR
- && ((*lang_hooks.tree_inlining.auto_var_in_fn_p)
+ && (lang_hooks.tree_inlining.auto_var_in_fn_p
(TREE_OPERAND (*tp, 0), fn)))
{
/* Get rid of &* from inline substitutions. It can occur when
++argnum;
/* Find the initializer. */
- value = (*lang_hooks.tree_inlining.convert_parm_for_inlining)
+ value = lang_hooks.tree_inlining.convert_parm_for_inlining
(p, a ? TREE_VALUE (a) : NULL_TREE, fn, argnum);
/* If the parameter is never assigned to, we may not need to
}
/* See if we need to clean up the declaration. */
- cleanup = (*lang_hooks.maybe_build_cleanup) (var);
+ cleanup = lang_hooks.maybe_build_cleanup (var);
if (cleanup)
{
tree cleanup_stmt;
}
#ifndef INLINER_FOR_JAVA
- var = ((*lang_hooks.tree_inlining.copy_res_decl_for_inlining)
+ var = (lang_hooks.tree_inlining.copy_res_decl_for_inlining
(result, fn, VARRAY_TREE (id->fns, 0), id->decl_map,
&need_return_decl, return_slot_addr));
if (need_return_decl)
return build_stmt (DECL_STMT, var);
#else /* INLINER_FOR_JAVA */
- *var = ((*lang_hooks.tree_inlining.copy_res_decl_for_inlining)
+ *var = (lang_hooks.tree_inlining.copy_res_decl_for_inlining
(result, fn, VARRAY_TREE (id->fns, 0), id->decl_map,
&need_return_decl, return_slot_addr));
in C++ it may result in template instantiation.)
If the function is not inlinable for language-specific reasons,
it is left up to the langhook to explain why. */
- inlinable = !(*lang_hooks.tree_inlining.cannot_inline_tree_fn) (&fn);
+ inlinable = !lang_hooks.tree_inlining.cannot_inline_tree_fn (&fn);
/* If we don't have the function body available, we can't inline it.
However, this should not be recorded since we also get here for
return NULL_TREE;
}
- if (! (*lang_hooks.tree_inlining.start_inlining) (fn))
+ if (! lang_hooks.tree_inlining.start_inlining (fn))
return NULL_TREE;
/* Set the current filename and line number to the function we are
/* Don't walk into subtrees. We've already handled them above. */
*walk_subtrees = 0;
- (*lang_hooks.tree_inlining.end_inlining) (fn);
+ lang_hooks.tree_inlining.end_inlining (fn);
/* Keep iterating. */
return NULL_TREE;
prev_fn = current_function_decl;
}
- prev_fn = ((*lang_hooks.tree_inlining.add_pending_fn_decls)
+ prev_fn = (lang_hooks.tree_inlining.add_pending_fn_decls
(&id.fns, prev_fn));
/* Create the list of functions this call will inline. */
if (!walk_subtrees)
{
if (STATEMENT_CODE_P (code) || code == TREE_LIST
- || (*lang_hooks.tree_inlining.tree_chain_matters_p) (*tp))
+ || lang_hooks.tree_inlining.tree_chain_matters_p (*tp))
/* But we still need to check our siblings. */
WALK_SUBTREE_TAIL (TREE_CHAIN (*tp));
else
/* Also examine various special fields, below. */
}
- result = (*lang_hooks.tree_inlining.walk_subtrees) (tp, &walk_subtrees, func,
- data, htab);
+ result = lang_hooks.tree_inlining.walk_subtrees (tp, &walk_subtrees, func,
+ data, htab);
if (result || ! walk_subtrees)
return result;
|| TREE_CODE_CLASS (code) == 'c'
|| code == TREE_LIST
|| code == TREE_VEC
- || (*lang_hooks.tree_inlining.tree_chain_matters_p) (*tp))
+ || lang_hooks.tree_inlining.tree_chain_matters_p (*tp))
{
/* Because the chain gets clobbered when we make a copy, we save it
here. */
walk_tree to walk into the chain as well. */
if (code == PARM_DECL || code == TREE_LIST
#ifndef INLINER_FOR_JAVA
- || (*lang_hooks.tree_inlining.tree_chain_matters_p) (*tp)
+ || lang_hooks.tree_inlining.tree_chain_matters_p (*tp)
|| STATEMENT_CODE_P (code))
TREE_CHAIN (*tp) = chain;
if (TREE_CODE (*tp) == SCOPE_STMT)
SCOPE_STMT_BLOCK (*tp) = NULL_TREE;
#else /* INLINER_FOR_JAVA */
- || (*lang_hooks.tree_inlining.tree_chain_matters_p) (*tp))
+ || lang_hooks.tree_inlining.tree_chain_matters_p (*tp))
TREE_CHAIN (*tp) = chain;
#endif /* INLINER_FOR_JAVA */
}
expand_function_start (fndecl, 0);
/* Allow language dialects to perform special processing. */
- (*lang_hooks.rtl_expand.start) ();
+ lang_hooks.rtl_expand.start ();
/* If this function is `main', emit a call to `__main'
to run global initializers, etc. */
expand_main_function ();
/* Generate the RTL for this function. */
- (*lang_hooks.rtl_expand.stmt) (DECL_SAVED_TREE (fndecl));
+ lang_hooks.rtl_expand.stmt (DECL_SAVED_TREE (fndecl));
/* We hard-wired immediate_size_expand to zero above.
expand_function_end will decrement this variable. So, we set the
immediate_size_expand = 1;
/* Allow language dialects to perform special processing. */
- (*lang_hooks.rtl_expand.end) ();
+ lang_hooks.rtl_expand.end ();
/* Generate rtl for function exit. */
expand_function_end ();
decl_assembler_name (tree decl)
{
if (!DECL_ASSEMBLER_NAME_SET_P (decl))
- (*lang_hooks.set_decl_assembler_name) (decl);
+ lang_hooks.set_decl_assembler_name (decl);
return DECL_CHECK (decl)->decl.assembler_name;
}
case VECTOR_CST: return sizeof (struct tree_vector);
case STRING_CST: return sizeof (struct tree_string);
default:
- return (*lang_hooks.tree_size) (code);
+ return lang_hooks.tree_size (code);
}
case 'x': /* something random, like an identifier. */
case PLACEHOLDER_EXPR: return sizeof (struct tree_common);
default:
- return (*lang_hooks.tree_size) (code);
+ return lang_hooks.tree_size (code);
}
default:
if (t == 0)
{
- (*lang_hooks.types.incomplete_type_error) (NULL_TREE, type);
+ lang_hooks.types.incomplete_type_error (NULL_TREE, type);
return size_zero_node;
}
default:
if ((unsigned int) TREE_CODE (arg)
>= (unsigned int) LAST_AND_UNUSED_TREE_CODE)
- return (*lang_hooks.staticp) (arg);
+ return lang_hooks.staticp (arg);
else
return 0;
}
return exp ? unsafe_for_reeval (exp) : 0;
default:
- tmp = (*lang_hooks.unsafe_for_reeval) (expr);
+ tmp = lang_hooks.unsafe_for_reeval (expr);
if (tmp >= 0)
return tmp;
break;
= tree_low_cst (DECL_SIZE (TREE_OPERAND (op, 1)), 1);
int unsignedp = (TREE_UNSIGNED (TREE_OPERAND (op, 1))
|| TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 1))));
- type = (*lang_hooks.types.type_for_size) (innerprec, unsignedp);
+ type = lang_hooks.types.type_for_size (innerprec, unsignedp);
/* We can get this structure field in the narrowest type it fits in.
If FOR_TYPE is 0, do this only for a field that matches the
= tree_low_cst (DECL_SIZE (TREE_OPERAND (op, 1)), 1);
int unsignedp = (TREE_UNSIGNED (TREE_OPERAND (op, 1))
|| TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 1))));
- tree type = (*lang_hooks.types.type_for_size) (innerprec, unsignedp);
+ tree type = lang_hooks.types.type_for_size (innerprec, unsignedp);
/* We can get this structure field in a narrower type that fits it,
but the resulting extension to its nominal type (a fullword type)
/* The current language may have other cases to check, but in general,
all other types are not variably modified. */
- return (*lang_hooks.tree_inlining.var_mod_type_p) (type);
+ return lang_hooks.tree_inlining.var_mod_type_p (type);
}
/* Given a DECL or TYPE, return the scope in which it was declared, or
/* We couldn't figure out what was being called. Maybe the front
end has some idea. */
- return (*lang_hooks.lang_get_callee_fndecl) (call);
+ return lang_hooks.lang_get_callee_fndecl (call);
}
/* Print debugging information about tree nodes generated during the compile,
fprintf (stderr, "(No per-node statistics)\n");
#endif
print_type_hash_statistics ();
- (*lang_hooks.print_statistics) ();
+ lang_hooks.print_statistics ();
}
\f
#define FILE_FUNCTION_FORMAT "_GLOBAL__%s_%s"
rtx decl_rtl;
if (lang_hooks.decls.prepare_assemble_variable)
- (*lang_hooks.decls.prepare_assemble_variable) (decl);
+ lang_hooks.decls.prepare_assemble_variable (decl);
last_assemble_variable_decl = 0;
default:
{
tree nt1, nt2;
- nt1 = (*lang_hooks.expand_constant) (t1);
- nt2 = (*lang_hooks.expand_constant) (t2);
+ nt1 = lang_hooks.expand_constant (t1);
+ nt2 = lang_hooks.expand_constant (t2);
if (nt1 != t1 || nt2 != t2)
return compare_constant (nt1, nt2);
else
default:
{
tree t;
- t = (*lang_hooks.expand_constant) (exp);
+ t = lang_hooks.expand_constant (exp);
if (t != exp)
return copy_constant (t);
else
align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode);
#ifdef CONSTANT_ALIGNMENT
{
- tree type = (*lang_hooks.types.type_for_mode) (mode, 0);
+ tree type = lang_hooks.types.type_for_mode (mode, 0);
if (type != NULL_TREE)
align = CONSTANT_ALIGNMENT (make_tree (type, x), align);
}
/* Construct the MEM. */
desc->mem = def = gen_rtx_MEM (mode, symbol);
- set_mem_attributes (def, (*lang_hooks.types.type_for_mode) (mode, 0), 1);
+ set_mem_attributes (def, lang_hooks.types.type_for_mode (mode, 0), 1);
RTX_UNCHANGING_P (def) = 1;
/* If we're dropping a label to the constant pool, make sure we
/* Give the front-end a chance to convert VALUE to something that
looks more like a constant to the back-end. */
- exp = (*lang_hooks.expand_constant) (exp);
+ exp = lang_hooks.expand_constant (exp);
switch (TREE_CODE (exp))
{
/* Give the front-end a chance to convert VALUE to something that
looks more like a constant to the back-end. */
- exp = (*lang_hooks.expand_constant) (exp);
+ exp = lang_hooks.expand_constant (exp);
switch (TREE_CODE (exp))
{
{
/* Give the front-end a chance to convert VALUE to something that
looks more like a constant to the back-end. */
- value = (*lang_hooks.expand_constant) (value);
+ value = lang_hooks.expand_constant (value);
switch (TREE_CODE (value))
{
/* Some front-ends use constants other than the standard language-independent
varieties, but which may still be output directly. Give the front-end a
chance to convert EXP to a language-independent representation. */
- exp = (*lang_hooks.expand_constant) (exp);
+ exp = lang_hooks.expand_constant (exp);
if (size == 0 || flag_syntax_only)
return;