#include "cgraph.h"
#include "vecprim.h"
#include "bitmap.h"
+#include "target.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
/* The METHOD_DECL for the current method. */
#define current_method parse_roots[1]
-/* A list of TRANSLATION_UNIT_DECLs for the files to be compiled. */
-static GTY(()) VEC(tree,gc) *current_file_list;
-
/* Line 0 in current file, if compiling from bytecode. */
static location_t file_start_location;
case CONSTANT_Long:
index = handle_long_constant (jcf, cpool, CONSTANT_Long, index,
- WORDS_BIG_ENDIAN);
+ targetm.words_big_endian ());
break;
case CONSTANT_Double:
index = handle_long_constant (jcf, cpool, CONSTANT_Double, index,
- FLOAT_WORDS_BIG_ENDIAN);
+ targetm.float_words_big_endian ());
break;
case CONSTANT_Float:
hi = JPOOL_UINT (jcf, index);
lo = JPOOL_UINT (jcf, index+1);
- if (FLOAT_WORDS_BIG_ENDIAN)
+ if (targetm.float_words_big_endian ())
buf[0] = hi, buf[1] = lo;
else
buf[0] = lo, buf[1] = hi;
tree decl
= build_decl (input_location, FUNCTION_DECL, name,
- build_function_type (void_type_node, void_list_node));
+ build_function_type_list (void_type_node, NULL_TREE));
tree resdecl = build_decl (input_location,
RESULT_DECL, NULL_TREE, void_type_node);
duplicate_class_warning (IDENTIFIER_POINTER (node));
else
{
- tree file_decl = build_decl (input_location,
- TRANSLATION_UNIT_DECL, node, NULL);
- VEC_safe_push (tree, gc, current_file_list, file_decl);
+ build_translation_unit_decl (node);
IS_A_COMMAND_LINE_FILENAME_P (node) = 1;
}
}
const char *resource_filename;
/* Only one resource file may be compiled at a time. */
- assert (VEC_length (tree, current_file_list) == 1);
+ assert (VEC_length (tree, all_translation_units) == 1);
- resource_filename = IDENTIFIER_POINTER (DECL_NAME (VEC_index (tree, current_file_list, 0)));
+ resource_filename
+ = IDENTIFIER_POINTER
+ (DECL_NAME (VEC_index (tree, all_translation_units, 0)));
compile_resource_file (resource_name, resource_filename);
goto finish;
}
current_jcf = main_jcf;
- FOR_EACH_VEC_ELT (tree, current_file_list, ix, node)
+ FOR_EACH_VEC_ELT (tree, all_translation_units, ix, node)
{
unsigned char magic_string[4];
char *real_path;
}
}
- FOR_EACH_VEC_ELT (tree, current_file_list, ix, node)
+ FOR_EACH_VEC_ELT (tree, all_translation_units, ix, node)
{
input_location = DECL_SOURCE_LOCATION (node);
if (CLASS_FILE_P (node))