Add intrinsics.type_hasher_proc; Make map work with generic hasher procedure

This commit is contained in:
gingerBill
2020-11-29 15:27:53 +00:00
parent 085972bb2c
commit 97c66c9c73
11 changed files with 338 additions and 99 deletions
+3 -1
View File
@@ -106,7 +106,8 @@ struct lbModule {
Map<lbProcedure *> anonymous_proc_lits; // Key: Ast *
Map<struct lbFunctionType *> function_type_map; // Key: Type *
Map<lbProcedure *> compare_procs; // Key: Type *
Map<lbProcedure *> equal_procs; // Key: Type *
Map<lbProcedure *> hasher_procs; // Key: Type *
u32 global_array_index;
u32 global_generated_index;
@@ -380,6 +381,7 @@ lbValue lb_emit_source_code_location(lbProcedure *p, String const &procedure, To
lbValue lb_handle_param_value(lbProcedure *p, Type *parameter_type, ParameterValue const &param_value, TokenPos const &pos);
lbValue lb_get_equal_proc_for_type(lbModule *m, Type *type);
lbValue lb_get_hasher_proc_for_type(lbModule *m, Type *type);
lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t);
#define LB_STARTUP_RUNTIME_PROC_NAME "__$startup_runtime"