diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-29 14:22:42 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-29 14:22:42 +0000 |
| commit | 39bed567b34a4bd74f7dfa99dd1ddb4621f67190 (patch) | |
| tree | fae939ebcf343170a3d57f0ee147f7f91c224311 /src/checker.cpp | |
| parent | 2e0fd34e59218ea942e4a378b689dc7cd3f844fa (diff) | |
Add intrinsics.type_equal_proc; Make `map` use an internal equal procedure to compare keys
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index efa7d76f7..ee3496fbf 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -726,6 +726,14 @@ void init_universal(void) { } add_global_type_entity(str_lit("byte"), &basic_types[Basic_u8]); + { + void set_procedure_abi_types(Type *type); + + Type *args[2] = {t_rawptr, t_rawptr}; + t_equal_proc = alloc_type_proc_from_types(args, 2, t_bool, false, ProcCC_Contextless); + set_procedure_abi_types(t_equal_proc); + } + // Constants add_global_constant(str_lit("true"), t_untyped_bool, exact_value_bool(true)); add_global_constant(str_lit("false"), t_untyped_bool, exact_value_bool(false)); |