diff options
author | Drup <drupyog@zoho.com> | 2019-07-22 18:21:26 +0200 |
---|---|---|
committer | Drup <drupyog@zoho.com> | 2019-11-13 16:08:40 +0100 |
commit | 9c8b63f4ceba9314df35a37fe2d15e0f6dc1aa88 (patch) | |
tree | ad7774d0f1da03f751bb2d191f8e74365249b4fc /middle_end | |
parent | abc53d1a6eab81beeb00afb2f980f89a84f6fa81 (diff) | |
download | ocaml-9c8b63f4ceba9314df35a37fe2d15e0f6dc1aa88.tar.gz |
Annotated Asttypes.constant's string with content location.
Diffstat (limited to 'middle_end')
-rw-r--r-- | middle_end/closure/closure.ml | 2 | ||||
-rw-r--r-- | middle_end/flambda/closure_conversion.ml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/middle_end/closure/closure.ml b/middle_end/closure/closure.ml index 2f4703efbc..89767d47be 100644 --- a/middle_end/closure/closure.ml +++ b/middle_end/closure/closure.ml @@ -882,7 +882,7 @@ let rec close ({ backend; fenv; cenv ; mutable_vars } as env) lam = str (Uconst_float_array (List.map float_of_string sl)) | Const_immstring s -> str (Uconst_string s) - | Const_base (Const_string (s, _)) -> + | Const_base (Const_string (s, _, _)) -> (* Strings (even literal ones) must be assumed to be mutable... except when OCaml has been configured with -safe-string. Passing -safe-string at compilation diff --git a/middle_end/flambda/closure_conversion.ml b/middle_end/flambda/closure_conversion.ml index a89d755e0e..31da98ac48 100644 --- a/middle_end/flambda/closure_conversion.ml +++ b/middle_end/flambda/closure_conversion.ml @@ -115,7 +115,7 @@ let rec declare_const t (const : Lambda.structured_constant) match const with | Const_base (Const_int c) -> (Const (Int c), Names.const_int) | Const_base (Const_char c) -> (Const (Char c), Names.const_char) - | Const_base (Const_string (s, _)) -> + | Const_base (Const_string (s, _, _)) -> let const, name = if Config.safe_string then (Flambda.Allocated_const (Immutable_string s), |