void upc_sign_in_builtins(const decl_context_t* decl_context) { // THREADS scope_entry_t* upc_THREADS; upc_THREADS = new_symbol(decl_context, decl_context->global_scope, UNIQUESTR_LITERAL("THREADS")); upc_THREADS->kind = SK_VARIABLE; upc_THREADS->type_information = get_const_qualified_type(get_signed_int_type()); upc_THREADS->defined = 1; upc_THREADS->do_not_print = 1; upc_THREADS->locus = make_locus("(global scope)", 0, 0); symbol_entity_specs_set_is_builtin(upc_THREADS, 1); if (CURRENT_CONFIGURATION->upc_threads != NULL) { upc_THREADS->value = internal_expression_parse(CURRENT_CONFIGURATION->upc_threads, decl_context); } // MYTHREAD scope_entry_t* upc_MYTHREAD; upc_MYTHREAD = new_symbol(decl_context, decl_context->global_scope, UNIQUESTR_LITERAL("MYTHREAD")); upc_MYTHREAD->kind = SK_VARIABLE; upc_MYTHREAD->type_information = get_const_qualified_type(get_signed_int_type()); upc_MYTHREAD->defined = 1; upc_MYTHREAD->do_not_print = 1; upc_MYTHREAD->locus = make_locus("(global scope)", 0, 0); symbol_entity_specs_set_is_builtin(upc_MYTHREAD, 1); // UPC_MAX_BLOCK_SIZE scope_entry_t* upc_UPC_MAX_BLOCK_SIZE; upc_UPC_MAX_BLOCK_SIZE = new_symbol(decl_context, decl_context->global_scope, UNIQUESTR_LITERAL("UPC_MAX_BLOCK_SIZE")); upc_UPC_MAX_BLOCK_SIZE->kind = SK_VARIABLE; upc_UPC_MAX_BLOCK_SIZE->type_information = get_const_qualified_type(get_signed_int_type()); upc_UPC_MAX_BLOCK_SIZE->defined = 1; upc_UPC_MAX_BLOCK_SIZE->do_not_print = 1; upc_UPC_MAX_BLOCK_SIZE->locus = make_locus("(global scope)", 0, 0); symbol_entity_specs_set_is_builtin(upc_UPC_MAX_BLOCK_SIZE, 1); // upc_lock_t scope_entry_t* upc_lock_t; upc_lock_t = new_symbol(decl_context, decl_context->global_scope, UNIQUESTR_LITERAL("upc_lock_t")); upc_lock_t->kind = SK_TYPEDEF; upc_lock_t->defined = 1; upc_lock_t->type_information = get_void_type(); upc_lock_t->do_not_print = 1; upc_lock_t->locus = make_locus("(global scope)", 0, 0); symbol_entity_specs_set_is_builtin(upc_lock_t, 1); }
//! Returns all the builtins of the type system ObjectList<Type> Type::get_integer_types() { Type all_integer_types[] = { Type(get_char_type()), Type(get_signed_int_type()), Type(get_signed_short_int_type()), Type(get_signed_long_int_type()), Type(get_signed_long_long_int_type()), Type(get_signed_char_type()), Type(get_unsigned_int_type()), Type(get_unsigned_short_int_type()), Type(get_unsigned_long_int_type()), Type(get_unsigned_long_long_int_type()), Type(get_unsigned_char_type()), }; return ObjectList<Type>(all_integer_types); }
static implicit_info_t* get_default_fortran_implicit(void) { static implicit_info_t* result; if (result == NULL) { result = allocate_implicit_info(); char c; for (c = 'a'; c <= 'z'; c++) { (*(result->data->implicit_letter_set))[c - 'a'] = get_float_type(); } for (c = 'i'; c <= 'n'; c++) { (*(result->data->implicit_letter_set))[c - 'a'] = get_signed_int_type(); } result->data->letter_set_is_shared = 1; } return result; }
static void init_spu_types(void) { V16QI_type_node = build_vector_type (intQI_type_node, 16); V8HI_type_node = build_vector_type (intHI_type_node, 16); V4SI_type_node = build_vector_type (intSI_type_node, 16); V2DI_type_node = build_vector_type (intDI_type_node, 16); V4SF_type_node = build_vector_type (float_type_node, 16); V2DF_type_node = build_vector_type (double_type_node, 16); unsigned_V16QI_type_node = build_vector_type (unsigned_intQI_type_node, 16); unsigned_V8HI_type_node = build_vector_type (unsigned_intHI_type_node, 16); unsigned_V4SI_type_node = build_vector_type (unsigned_intSI_type_node, 16); unsigned_V2DI_type_node = build_vector_type (unsigned_intDI_type_node, 16); spu_builtin_types[SPU_BTI_QUADWORD] = V16QI_type_node; spu_builtin_types[SPU_BTI_7] = get_signed_int_type(); spu_builtin_types[SPU_BTI_S7] = get_signed_int_type(); spu_builtin_types[SPU_BTI_U7] = get_signed_int_type(); spu_builtin_types[SPU_BTI_S10] = get_signed_int_type(); spu_builtin_types[SPU_BTI_S10_4] = get_signed_int_type(); spu_builtin_types[SPU_BTI_U14] = get_signed_int_type(); spu_builtin_types[SPU_BTI_16] = get_signed_int_type(); spu_builtin_types[SPU_BTI_S16] = get_signed_int_type(); spu_builtin_types[SPU_BTI_S16_2] = get_signed_int_type(); spu_builtin_types[SPU_BTI_U16] = get_signed_int_type(); spu_builtin_types[SPU_BTI_U16_2] = get_signed_int_type(); spu_builtin_types[SPU_BTI_U18] = get_signed_int_type(); spu_builtin_types[SPU_BTI_INTQI] = get_signed_char_type(); spu_builtin_types[SPU_BTI_INTHI] = get_signed_short_int_type(); spu_builtin_types[SPU_BTI_INTSI] = get_signed_int_type(); spu_builtin_types[SPU_BTI_INTDI] = get_signed_long_long_int_type(); spu_builtin_types[SPU_BTI_UINTQI] = get_unsigned_char_type(); spu_builtin_types[SPU_BTI_UINTHI] = get_unsigned_short_int_type(); spu_builtin_types[SPU_BTI_UINTSI] = get_unsigned_int_type(); spu_builtin_types[SPU_BTI_UINTDI] = get_unsigned_long_long_int_type(); spu_builtin_types[SPU_BTI_FLOAT] = get_float_type(); spu_builtin_types[SPU_BTI_DOUBLE] = get_double_type(); spu_builtin_types[SPU_BTI_VOID] = get_void_type(); spu_builtin_types[SPU_BTI_PTR] = get_cv_qualified_type(get_pointer_type(get_void_type()), CV_CONST | CV_VOLATILE); }