diff options
author | Son Ho | 2023-09-07 16:02:43 +0200 |
---|---|---|
committer | Son Ho | 2023-09-07 16:02:43 +0200 |
commit | 1181aecddbcb3232c21b191fbde59c2e9596846a (patch) | |
tree | d246e01bb874f44ae6e10164ee357f1fbb6caf11 /compiler | |
parent | 8b18c0da053e069b5a2d9fbf06f45eae2f05a029 (diff) |
Fix some issues
Diffstat (limited to '')
-rw-r--r-- | compiler/Extract.ml | 1 | ||||
-rw-r--r-- | compiler/ExtractAssumed.ml | 40 |
2 files changed, 26 insertions, 15 deletions
diff --git a/compiler/Extract.ml b/compiler/Extract.ml index 74540787..8baa3c88 100644 --- a/compiler/Extract.ml +++ b/compiler/Extract.ml @@ -8,7 +8,6 @@ open Pure open PureUtils open TranslateCore open ExtractBase -open ExtractAssumed open StringUtils open Config module F = Format diff --git a/compiler/ExtractAssumed.ml b/compiler/ExtractAssumed.ml index bbcedb2b..7f094b24 100644 --- a/compiler/ExtractAssumed.ml +++ b/compiler/ExtractAssumed.ml @@ -1,8 +1,6 @@ (** This file declares external identifiers that we catch to map them to definitions coming from the standard libraries in our backends. *) -open Utils -open StringUtils open Names type simple_name = string list [@@deriving show, ord] @@ -30,18 +28,32 @@ module SimpleNameMap = Collections.MakeMap (SimpleNameOrd) let assumed_globals : (string * string) list = [ - ("core::num::usize::MAX", "usize_max"); - ("core::num::u8::MAX", "u8_max"); - ("core::num::u16::MAX", "u16_max"); - ("core::num::u32::MAX", "u32_max"); - ("core::num::u64::MAX", "u64_max"); - ("core::num::u128::MAX", "u128_max"); - ("core::num::isize::MAX", "isize_max"); - ("core::num::i8::MAX", "i8_max"); - ("core::num::i16::MAX", "i16_max"); - ("core::num::i32::MAX", "i32_max"); - ("core::num::i64::MAX", "i64_max"); - ("core::num::i128::MAX", "i128_max"); + (* Min *) + ("core::num::usize::MIN", "core_usize_min"); + ("core::num::u8::MIN", "core_u8_min"); + ("core::num::u16::MIN", "core_u16_min"); + ("core::num::u32::MIN", "core_u32_min"); + ("core::num::u64::MIN", "core_u64_min"); + ("core::num::u128::MIN", "core_u128_min"); + ("core::num::isize::MIN", "core_isize_min"); + ("core::num::i8::MIN", "core_i8_min"); + ("core::num::i16::MIN", "core_i16_min"); + ("core::num::i32::MIN", "core_i32_min"); + ("core::num::i64::MIN", "core_i64_min"); + ("core::num::i128::MIN", "core_i128_min"); + (* Max *) + ("core::num::usize::MAX", "core_usize_max"); + ("core::num::u8::MAX", "core_u8_max"); + ("core::num::u16::MAX", "core_u16_max"); + ("core::num::u32::MAX", "core_u32_max"); + ("core::num::u64::MAX", "core_u64_max"); + ("core::num::u128::MAX", "core_u128_max"); + ("core::num::isize::MAX", "core_isize_max"); + ("core::num::i8::MAX", "core_i8_max"); + ("core::num::i16::MAX", "core_i16_max"); + ("core::num::i32::MAX", "core_i32_max"); + ("core::num::i64::MAX", "core_i64_max"); + ("core::num::i128::MAX", "core_i128_max"); ] let assumed_globals_map : string SimpleNameMap.t = |