summaryrefslogtreecommitdiff
path: root/bytecomp
diff options
context:
space:
mode:
authorDrup <drupyog@zoho.com>2019-07-22 18:21:26 +0200
committerDrup <drupyog@zoho.com>2019-11-13 16:08:40 +0100
commit9c8b63f4ceba9314df35a37fe2d15e0f6dc1aa88 (patch)
treead7774d0f1da03f751bb2d191f8e74365249b4fc /bytecomp
parentabc53d1a6eab81beeb00afb2f980f89a84f6fa81 (diff)
downloadocaml-9c8b63f4ceba9314df35a37fe2d15e0f6dc1aa88.tar.gz
Annotated Asttypes.constant's string with content location.
Diffstat (limited to 'bytecomp')
-rw-r--r--bytecomp/symtable.ml11
1 files changed, 6 insertions, 5 deletions
diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml
index 8886ab4731..dad4cafe5e 100644
--- a/bytecomp/symtable.ml
+++ b/bytecomp/symtable.ml
@@ -154,10 +154,11 @@ let init () =
try List.assoc name Predef.builtin_values
with Not_found -> fatal_error "Symtable.init" in
let c = slot_for_setglobal id in
- let cst = Const_block(Obj.object_tag,
- [Const_base(Const_string (name, None));
- Const_base(Const_int (-i-1))
- ])
+ let cst = Const_block
+ (Obj.object_tag,
+ [Const_base(Const_string (name, Location.none,None));
+ Const_base(Const_int (-i-1))
+ ])
in
literal_table := (c, cst) :: !literal_table)
Runtimedef.builtin_exceptions;
@@ -216,7 +217,7 @@ let patch_object buff patchlist =
let rec transl_const = function
Const_base(Const_int i) -> Obj.repr i
| Const_base(Const_char c) -> Obj.repr c
- | Const_base(Const_string (s, _)) -> Obj.repr s
+ | Const_base(Const_string (s, _, _)) -> Obj.repr s
| Const_base(Const_float f) -> Obj.repr (float_of_string f)
| Const_base(Const_int32 i) -> Obj.repr i
| Const_base(Const_int64 i) -> Obj.repr i