summaryrefslogtreecommitdiff
path: root/src/Values.ml
diff options
context:
space:
mode:
authorSon Ho2021-12-01 10:43:24 +0100
committerSon Ho2021-12-01 10:43:24 +0100
commit08b797f03c82c4f21855f114b1786238bbc35c0b (patch)
treeedfd75bc6c5a657277a08c9fc444a0122ddd1670 /src/Values.ml
parentd6f65c3ee0833ce26753b0cac469b52783d04336 (diff)
Add various comments
Diffstat (limited to '')
-rw-r--r--src/Values.ml12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Values.ml b/src/Values.ml
index 3e6bc838..57a0aeb0 100644
--- a/src/Values.ml
+++ b/src/Values.ml
@@ -82,9 +82,12 @@ type value =
| Concrete of constant_value (** Concrete (non-symbolic) value *)
| Adt of adt_value (** Enumerations and structures *)
| Tuple of typed_value list
- (** Tuple - note that units are encoded as 0-tuples *)
+ (** Tuple - note that units are encoded as 0-tuples
+ TODO: merge with Adt?
+ *)
| Bottom (** No value (uninitialized or moved value) *)
- | Assumed of assumed_value (** Assumed types (Box, Vec, Cell...) *)
+ | Assumed of assumed_value
+ (** Value of an abstract type (Box, Vec, Cell...) *)
| Borrow of borrow_content (** A borrowed value *)
| Loan of loan_content (** A loaned value *)
| Symbolic of symbolic_proj_comp (** Unknown value *)
@@ -92,9 +95,12 @@ type value =
and adt_value = {
def_id : TypeDefId.id;
+ (* TODO: remove *)
variant_id : VariantId.id option;
regions : erased_region list;
+ (* TODO: remove *)
types : ety list;
+ (* TODO: remove *)
field_values : typed_value list;
}
[@@deriving show]
@@ -147,6 +153,7 @@ type avalue =
| AAssumed of aassumed_value
| AProj of aproj
[@@deriving show]
+(* TODO: merge with value *)
and aadt_value = {
adef_id : TypeDefId.id;
@@ -156,6 +163,7 @@ and aadt_value = {
afield_values : typed_avalue list;
}
[@@deriving show]
+(* TODO: merge with adt_value *)
and aloan_content =
| AMutLoan of BorrowId.id * typed_avalue