summaryrefslogtreecommitdiff
path: root/compiler/InterpreterStatements.ml
diff options
context:
space:
mode:
authorSon Ho2022-10-27 23:57:38 +0200
committerSon HO2022-10-28 17:41:04 +0200
commit9c7fe7eb0cd3fdda6b64ff4dc9f6b68f631bdb44 (patch)
tree5706e7a2f8486a1e063cfc0e368418c9c514c8be /compiler/InterpreterStatements.ml
parentcdaa37670587dadda92ddab076170eb6d8e237cd (diff)
Make minor updates to account for Charon's changes
Diffstat (limited to '')
-rw-r--r--compiler/InterpreterStatements.ml9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/InterpreterStatements.ml b/compiler/InterpreterStatements.ml
index 56ab05f3..fc3b0975 100644
--- a/compiler/InterpreterStatements.ml
+++ b/compiler/InterpreterStatements.ml
@@ -922,15 +922,14 @@ let rec eval_statement (config : C.config) (st : A.statement) : st_cm_fun =
(* Compose and apply *)
comp cc cf_eval_st cf ctx
-and eval_global (config : C.config) (dest : E.VarId.id)
- (gid : LA.GlobalDeclId.id) : st_cm_fun =
+and eval_global (config : C.config) (dest : E.place) (gid : LA.GlobalDeclId.id)
+ : st_cm_fun =
fun cf ctx ->
let global = C.ctx_lookup_global_decl ctx gid in
- let place = { E.var_id = dest; projection = [] } in
match config.mode with
| ConcreteMode ->
(* Treat the evaluation of the global as a call to the global body (without arguments) *)
- (eval_local_function_call_concrete config global.body_id [] [] [] place)
+ (eval_local_function_call_concrete config global.body_id [] [] [] dest)
cf ctx
| SymbolicMode ->
(* Generate a fresh symbolic value. In the translation, this fresh symbolic value will be
@@ -939,7 +938,7 @@ and eval_global (config : C.config) (dest : E.VarId.id)
mk_fresh_symbolic_value V.Global (ety_no_regions_to_rty global.ty)
in
let cc =
- assign_to_place config (mk_typed_value_from_symbolic_value sval) place
+ assign_to_place config (mk_typed_value_from_symbolic_value sval) dest
in
let e = cc (cf Unit) ctx in
S.synthesize_global_eval gid sval e