aboutsummaryrefslogtreecommitdiff
path: root/checker/analyze.ml
diff options
context:
space:
mode:
authorMaxime Dénès2019-12-19 18:22:46 +0100
committerMaxime Dénès2019-12-19 18:22:46 +0100
commit5c667d56cd0a441f787019aef44bf18bec9c7b20 (patch)
tree5522a81b074ae70ff81a482f27a63040c57c4f8c /checker/analyze.ml
parent6621e7cf79d7d824461de14007b2a06cabe59aef (diff)
parentda4e9e30330f32e57f85aec63f354812dbb6b829 (diff)
Merge PR #11247: Use standard float and integer datatypes in Votour representation.
Reviewed-by: maximedenes
Diffstat (limited to 'checker/analyze.ml')
-rw-r--r--checker/analyze.ml22
1 files changed, 11 insertions, 11 deletions
diff --git a/checker/analyze.ml b/checker/analyze.ml
index 4c06f1e250..91137a0ce2 100644
--- a/checker/analyze.ml
+++ b/checker/analyze.ml
@@ -106,8 +106,8 @@ end
type repr =
| RInt of int
-| RInt63 of Uint63.t
-| RFloat64 of Float64.t
+| Rint64 of Int64.t
+| RFloat64 of float
| RBlock of (int * int) (* tag × len *)
| RString of string
| RPointer of int
@@ -121,8 +121,8 @@ type data =
type obj =
| Struct of int * data array (* tag × data *)
-| Int63 of Uint63.t (* Primitive integer *)
-| Float64 of Float64.t (* Primitive float *)
+| Int64 of Int64.t (* Primitive integer *)
+| Float64 of float (* Primitive float *)
| String of string
module type Input =
@@ -344,13 +344,13 @@ let parse_object chan =
RCode addr
| CODE_CUSTOM ->
begin match input_cstring chan with
- | "_j" -> RInt63 (Uint63.of_int64 (input_intL chan))
+ | "_j" -> Rint64 (input_intL chan)
| s -> Printf.eprintf "Unhandled custom code: %s" s; assert false
end
| CODE_DOUBLE_BIG ->
- RFloat64 (Float64.of_float (input_double_big chan))
+ RFloat64 (input_double_big chan)
| CODE_DOUBLE_LITTLE ->
- RFloat64 (Float64.of_float (input_double_little chan))
+ RFloat64 (input_double_little chan)
| CODE_DOUBLE_ARRAY32_LITTLE
| CODE_DOUBLE_ARRAY8_BIG
| CODE_DOUBLE_ARRAY8_LITTLE
@@ -388,9 +388,9 @@ let parse chan =
| RCode addr ->
let data = Fun addr in
data, None
- | RInt63 i ->
+ | Rint64 i ->
let data = Ptr !current_object in
- let () = LargeArray.set memory !current_object (Int63 i) in
+ let () = LargeArray.set memory !current_object (Int64 i) in
let () = incr current_object in
data, None
| RFloat64 f ->
@@ -461,7 +461,7 @@ let instantiate (p, mem) =
for i = 0 to len - 1 do
let obj = match LargeArray.get mem i with
| Struct (tag, blk) -> Obj.new_block tag (Array.length blk)
- | Int63 i -> Obj.repr i
+ | Int64 i -> Obj.repr i
| Float64 f -> Obj.repr f
| String str -> Obj.repr str
in
@@ -481,7 +481,7 @@ let instantiate (p, mem) =
for k = 0 to Array.length blk - 1 do
Obj.set_field obj k (get_data blk.(k))
done
- | Int63 _
+ | Int64 _
| Float64 _
| String _ -> ()
done;