mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-08 22:01:47 -04:00
Allow the compiler with slightly older forms of the compiler which only have default_hasher and not default_hasher_fixed
This commit is contained in:
1 parent
0eee2664d8
commit
e774d7954c
3 files changed
+6
-2
No files matched your search
+1
-1
@@ -4197,7 +4197,7 @@ gb_internal void add_map_key_type_dependencies(CheckerContext *ctx, Type *key) {
|
||||
}
|
||||
|
||||
if (is_type_simple_compare(key)) {
|
||||
add_package_dependency(ctx, "runtime", "default_hasher_fixed");
|
||||
add_package_dependency(ctx, "runtime", runtime_default_hasher_fixed_name(&ctx->checker->info));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1035,6 +1035,10 @@ gb_internal void try_to_add_package_dependency(CheckerContext *c, char const *pa
|
||||
add_dependency(c->info, c->decl, e);
|
||||
}
|
||||
|
||||
gb_internal char const *runtime_default_hasher_fixed_name(CheckerInfo *info) {
|
||||
Entity *e = scope_lookup_current(info->runtime_package->scope, string_interner_insert(str_lit("default_hasher_fixed")));
|
||||
return e != nullptr ? "default_hasher_fixed" : "default_hasher";
|
||||
}
|
||||
|
||||
gb_internal void add_declaration_dependency(CheckerContext *c, Entity *e) {
|
||||
if (e == nullptr) {
|
||||
|
||||
@@ -434,7 +434,7 @@ gb_internal lbValue lb_simple_compare_hash(lbProcedure *p, Type *type, lbValue d
|
||||
args[0] = data;
|
||||
args[1] = seed;
|
||||
args[2] = lb_const_int(p->module, t_int, type_size_of(type));
|
||||
return lb_emit_runtime_call(p, "default_hasher_fixed", args);
|
||||
return lb_emit_runtime_call(p, runtime_default_hasher_fixed_name(p->module->info), args);
|
||||
}
|
||||
|
||||
gb_internal void lb_add_callsite_force_inline(lbProcedure *p, lbValue ret_value) {
|
||||
|
||||
Reference in new issue
Block a user