diff options
| author | Son Ho | 2021-11-23 11:05:08 +0100 | 
|---|---|---|
| committer | Son Ho | 2021-11-23 11:05:08 +0100 | 
| commit | 6eed4213f3fcc879bd5e7f3921aec974983d3538 (patch) | |
| tree | 98ffc93afeb0501683ee41f48c52bcd5e6b14d62 | |
| parent | 3bf974f843afd066d82e9b784702c56d5c0588da (diff) | |
Rename update_env_at_place to collect_borrows_at_place
Diffstat (limited to '')
| -rw-r--r-- | src/Interpreter.ml | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Interpreter.ml b/src/Interpreter.ml index 70fcf2b0..df78ea66 100644 --- a/src/Interpreter.ml +++ b/src/Interpreter.ml @@ -834,7 +834,8 @@ let rec update_env_along_write_place (config : config)  exception UpdateEnv of env  (** Small utility used to break control-flow *) -(** Update the value at a given place to be able to perform a manipulation. +(** Collect the borrows at a given place (by ending borrows when we find some +    loans).      This is used when reading, borrowing, writing to a value. We typically      first call [update_env_along_read_place] or [update_env_along_write_place] @@ -844,8 +845,8 @@ exception UpdateEnv of env      - [Read]: copy the value, perform an immutable borrow      - [Write]: update the value, move, mutably borrow   *) -let rec update_env_at_place (config : config) (access : access_kind) (p : place) -    (env : env) : env = +let rec collect_borrows_at_place (config : config) (access : access_kind) +    (p : place) (env : env) : env =    (* First, retrieve the value *)    match read_place config access p env with    | Error _ -> failwith "Unreachable" @@ -900,4 +901,4 @@ let rec update_env_at_place (config : config) (access : access_kind) (p : place)          inspect_update v;          (* No environment update required: return the current environment *)          env -      with UpdateEnv env' -> update_env_at_place config access p env') +      with UpdateEnv env' -> collect_borrows_at_place config access p env')  | 
