diff options
author | Nadrieril | 2024-04-08 15:18:58 +0200 |
---|---|---|
committer | Nadrieril | 2024-04-18 11:53:39 +0200 |
commit | fa57d8d9d51c93ccefefb0951c67475970e97879 (patch) | |
tree | 2df2988c91df6766259ac66e158bf3136907cb76 /compiler/ExtractBase.ml | |
parent | b4c3829305cac70827f6cbca2e90b0ef8be00d47 (diff) |
item_meta
Diffstat (limited to 'compiler/ExtractBase.ml')
-rw-r--r-- | compiler/ExtractBase.ml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/ExtractBase.ml b/compiler/ExtractBase.ml index 656d2f27..8080e08c 100644 --- a/compiler/ExtractBase.ml +++ b/compiler/ExtractBase.ml @@ -1932,10 +1932,11 @@ let ctx_add_global_decl_and_body (def : A.global_decl) (ctx : extraction_ctx) : match match_name_find_opt ctx.trans_ctx def.name builtin_globals_map with | Some name -> (* Yes: register the custom binding *) - ctx_add def.meta decl name ctx + ctx_add def.item_meta.meta decl name ctx | None -> (* Not the case: "standard" registration *) - let name = ctx_compute_global_name def.meta ctx def.name in + let name = ctx_compute_global_name def.item_meta.meta ctx def.name in + let body = FunId (FromLlbc (FunId (FRegular def.body), None)) in (* If this is a provided constant (i.e., the default value for a constant in a trait declaration) we add a suffix. Otherwise there is a clash @@ -1944,8 +1945,8 @@ let ctx_add_global_decl_and_body (def : A.global_decl) (ctx : extraction_ctx) : let suffix = match def.kind with TraitItemProvided _ -> "_default" | _ -> "" in - let ctx = ctx_add def.meta decl (name ^ suffix) ctx in - let ctx = ctx_add def.meta body (name ^ suffix ^ "_body") ctx in + let ctx = ctx_add def.item_meta.meta decl (name ^ suffix) ctx in + let ctx = ctx_add def.item_meta.meta body (name ^ suffix ^ "_body") ctx in ctx let ctx_compute_fun_name (def : fun_decl) (ctx : extraction_ctx) : string = |