diff options
author | Guillaume Boisseau | 2024-04-18 14:14:53 +0200 |
---|---|---|
committer | GitHub | 2024-04-18 14:14:53 +0200 |
commit | 8cd6090128397dd9dccf5bb7c27dd85f318aa3c5 (patch) | |
tree | d2f2bd4b415f55ff4830e35c4883727b89136577 /compiler/ExtractBase.ml | |
parent | b4c3829305cac70827f6cbca2e90b0ef8be00d47 (diff) | |
parent | 6ef342ea6ceb0a49929859ef96c5e0afcea7451f (diff) |
Merge pull request #116 from AeneasVerif/item_meta
Diffstat (limited to '')
-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 = |