aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2021-04-26 20:50:43 +0100
committerGitHub <noreply@github.com>2021-04-26 20:50:43 +0100
commit53c7e65c57ff0042a0851781712d8fc1e5cae8be (patch)
tree1640bdc8740d0fa6fbdd8231b5cd0235727cdba5 /src/checker.cpp
parentaa846d0ea5f40361cc4ada2213c4659fe1b59580 (diff)
parenta38586420cd2d8534a7be83851d8ca174cce1bcb (diff)
Merge pull request #914 from odin-lang/old-backend-removal
Removal of the Old Backend
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 3f77210c8..878435d67 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -732,15 +732,11 @@ void init_universal(void) {
add_global_type_entity(str_lit("byte"), &basic_types[Basic_u8]);
{
- void set_procedure_abi_types(Type *type);
-
Type *equal_args[2] = {t_rawptr, t_rawptr};
t_equal_proc = alloc_type_proc_from_types(equal_args, 2, t_bool, false, ProcCC_Contextless);
- set_procedure_abi_types(t_equal_proc);
Type *hasher_args[2] = {t_rawptr, t_uintptr};
t_hasher_proc = alloc_type_proc_from_types(hasher_args, 2, t_uintptr, false, ProcCC_Contextless);
- set_procedure_abi_types(t_hasher_proc);
}
// Constants
@@ -759,7 +755,6 @@ void init_universal(void) {
add_global_constant(str_lit("ODIN_DEBUG"), t_untyped_bool, exact_value_bool(bc->ODIN_DEBUG));
add_global_constant(str_lit("ODIN_DISABLE_ASSERT"), t_untyped_bool, exact_value_bool(bc->ODIN_DISABLE_ASSERT));
add_global_constant(str_lit("ODIN_DEFAULT_TO_NIL_ALLOCATOR"), t_untyped_bool, exact_value_bool(bc->ODIN_DEFAULT_TO_NIL_ALLOCATOR));
- add_global_constant(str_lit("ODIN_USE_LLVM_API"), t_untyped_bool, exact_value_bool(bc->use_llvm_api));
add_global_constant(str_lit("ODIN_NO_DYNAMIC_LITERALS"), t_untyped_bool, exact_value_bool(bc->no_dynamic_literals));
add_global_constant(str_lit("ODIN_TEST"), t_untyped_bool, exact_value_bool(bc->command_kind == Command_test));
@@ -1778,23 +1773,6 @@ void generate_minimum_dependency_set(Checker *c, Entity *start) {
force_add_dependency_entity(c, c->info.runtime_package->scope, required_runtime_entities[i]);
}
- if (!build_context.use_llvm_api) {
- String other_required_runtime_entities[] = {
- str_lit("bswap_16"),
- str_lit("bswap_32"),
- str_lit("bswap_64"),
- str_lit("bswap_128"),
-
- str_lit("bswap_f16"),
- str_lit("bswap_f32"),
- str_lit("bswap_f64"),
- };
-
- for (isize i = 0; i < gb_count_of(other_required_runtime_entities); i++) {
- force_add_dependency_entity(c, c->info.runtime_package->scope, other_required_runtime_entities[i]);
- }
- }
-
if (build_context.no_crt) {
String required_no_crt_entities[] = {
// NOTE(bill): Only if these exist
@@ -2745,7 +2723,7 @@ DECL_ATTRIBUTE_PROC(type_decl_attribute) {
}
}
- if (valid && build_context.use_llvm_api) {
+ if (valid) {
if (ac->atom_op_table == nullptr) {
ac->atom_op_table = gb_alloc_item(permanent_allocator(), TypeAtomOpTable);
}
@@ -2804,7 +2782,7 @@ DECL_ATTRIBUTE_PROC(type_decl_attribute) {
}
}
- if (valid && build_context.use_llvm_api) {
+ if (valid) {
if (ac->atom_op_table == nullptr) {
ac->atom_op_table = gb_alloc_item(permanent_allocator(), TypeAtomOpTable);
}
@@ -2886,7 +2864,7 @@ DECL_ATTRIBUTE_PROC(type_decl_attribute) {
}
}
- if (valid && build_context.use_llvm_api) {
+ if (valid) {
if (ac->atom_op_table == nullptr) {
ac->atom_op_table = gb_alloc_item(permanent_allocator(), TypeAtomOpTable);
}
@@ -3282,6 +3260,7 @@ void check_collect_value_decl(CheckerContext *c, Ast *decl) {
d->type_expr = vd->type;
d->init_expr = init;
+
if (is_ast_type(init)) {
e = alloc_entity_type_name(d->scope, token, nullptr);
// if (vd->type != nullptr) {