File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ let string_of_mapping mapping =
104104 let l =
105105 (c.gen_col - ! gen_col)
106106 ::
107- (if c.ori_source = - 1
107+ (if c.ori_source < 0
108108 then []
109109 else
110110 (c.ori_source - ! ori_source)
@@ -119,7 +119,7 @@ let string_of_mapping mapping =
119119 [ n - n' ]))
120120 in
121121 gen_col := c.gen_col;
122- if c.ori_source <> - 1
122+ if c.ori_source > = 0
123123 then (
124124 ori_source := c.ori_source;
125125 ori_line := c.ori_line;
@@ -199,7 +199,9 @@ let mapping_of_string str =
199199
200200let maps ~sources_offset ~names_offset x =
201201 let gen_line = x.gen_line in
202- let ori_source = x.ori_source + sources_offset in
202+ let ori_source =
203+ if x.ori_source < 0 then x.ori_source else x.ori_source + sources_offset
204+ in
203205 let ori_name =
204206 match x.ori_name with
205207 | None -> None
Original file line number Diff line number Diff line change @@ -5,6 +5,3 @@ b.ml:1:10 -> 17: function f(x){<>return x - 1 | 0;}
55b.ml:1:6 -> 24: function f(x){return <>x - 1 | 0;}
66b.ml:1:15 -> 34: function f(x){return x - 1 | 0;<>}
77b.ml:1:4 -> 23: var Testlib_B = [0, <>f];
8- d.ml:-1:-1 -> 2: <>}
9- a.ml:-1:-1 -> 3: <>function caml_call1(f, a0){
10- a.ml:-1:-1 -> 2: <>}
You can’t perform that action at this time.
0 commit comments