Skip to content

Commit 50e9490

Browse files
committed
Replace %raise by %reraise (rebased version of this patch from 4.09)
1 parent ff469d3 commit 50e9490

File tree

8 files changed

+114
-12
lines changed

8 files changed

+114
-12
lines changed

stdlib/stdlib.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let () =
2323
register_named_value "Pervasives.array_bound_error"
2424
(Invalid_argument "index out of bounds")
2525

26-
external raise : exn -> 'a = "%raise"
26+
external raise : exn -> 'a = "%reraise"
2727
external raise_notrace : exn -> 'a = "%raise_notrace"
2828

2929
let failwith s = raise(Failure s)

stdlib/stdlib.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
(** {1 Exceptions} *)
2929

30-
external raise : exn -> 'a = "%raise"
30+
external raise : exn -> 'a = "%reraise"
3131
(** Raise the given exception value *)
3232

3333
external raise_notrace : exn -> 'a = "%raise_notrace"

testsuite/tests/backtrace/backtrace2.byte.reference

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,32 @@ Uncaught exception Invalid_argument("index out of bounds")
3535
Raised by primitive operation at file "backtrace2.ml", line 67, characters 14-22
3636
test_Not_found
3737
Uncaught exception Not_found
38-
Raised at file "hashtbl.ml", line 537, characters 19-28
38+
Raised at file "backtrace2.ml", line 41, characters 24-33
39+
Called from file "backtrace2.ml", line 41, characters 43-52
40+
Called from file "backtrace2.ml", line 41, characters 43-52
41+
Called from file "backtrace2.ml", line 41, characters 43-52
42+
Called from file "backtrace2.ml", line 41, characters 43-52
43+
Called from file "backtrace2.ml", line 41, characters 43-52
44+
Called from file "backtrace2.ml", line 43, characters 6-11
45+
Re-raised at file "hashtbl.ml", line 537, characters 19-28
3946
Called from file "backtrace2.ml", line 48, characters 9-42
4047
Re-raised at file "backtrace2.ml", line 48, characters 67-70
4148
Called from file "backtrace2.ml", line 67, characters 11-23
4249
Uncaught exception Not_found
43-
Raised at file "backtrace2.ml", line 52, characters 24-33
50+
Raised at file "backtrace2.ml", line 41, characters 24-33
51+
Called from file "backtrace2.ml", line 41, characters 43-52
52+
Called from file "backtrace2.ml", line 41, characters 43-52
53+
Called from file "backtrace2.ml", line 41, characters 43-52
54+
Called from file "backtrace2.ml", line 41, characters 43-52
55+
Called from file "backtrace2.ml", line 41, characters 43-52
56+
Called from file "backtrace2.ml", line 43, characters 6-11
57+
Re-raised at file "hashtbl.ml", line 537, characters 19-28
58+
Called from file "backtrace2.ml", line 48, characters 9-42
59+
Re-raised at file "backtrace2.ml", line 48, characters 67-70
60+
Called from file "backtrace2.ml", line 67, characters 11-23
61+
Re-raised at file "hashtbl.ml", line 537, characters 19-28
62+
Called from file "backtrace2.ml", line 55, characters 8-41
63+
Re-raised at file "backtrace2.ml", line 52, characters 24-33
4464
Called from file "backtrace2.ml", line 52, characters 43-52
4565
Called from file "backtrace2.ml", line 52, characters 43-52
4666
Called from file "backtrace2.ml", line 52, characters 43-52
@@ -50,7 +70,29 @@ Called from file "camlinternalLazy.ml", line 31, characters 17-27
5070
Re-raised at file "camlinternalLazy.ml", line 36, characters 10-11
5171
Called from file "backtrace2.ml", line 67, characters 11-23
5272
Uncaught exception Not_found
53-
Raised at file "hashtbl.ml", line 537, characters 19-28
73+
Raised at file "backtrace2.ml", line 41, characters 24-33
74+
Called from file "backtrace2.ml", line 41, characters 43-52
75+
Called from file "backtrace2.ml", line 41, characters 43-52
76+
Called from file "backtrace2.ml", line 41, characters 43-52
77+
Called from file "backtrace2.ml", line 41, characters 43-52
78+
Called from file "backtrace2.ml", line 41, characters 43-52
79+
Called from file "backtrace2.ml", line 43, characters 6-11
80+
Re-raised at file "hashtbl.ml", line 537, characters 19-28
81+
Called from file "backtrace2.ml", line 48, characters 9-42
82+
Re-raised at file "backtrace2.ml", line 48, characters 67-70
83+
Called from file "backtrace2.ml", line 67, characters 11-23
84+
Re-raised at file "hashtbl.ml", line 537, characters 19-28
85+
Called from file "backtrace2.ml", line 55, characters 8-41
86+
Re-raised at file "backtrace2.ml", line 52, characters 24-33
87+
Called from file "backtrace2.ml", line 52, characters 43-52
88+
Called from file "backtrace2.ml", line 52, characters 43-52
89+
Called from file "backtrace2.ml", line 52, characters 43-52
90+
Called from file "backtrace2.ml", line 52, characters 43-52
91+
Called from file "backtrace2.ml", line 52, characters 43-52
92+
Called from file "camlinternalLazy.ml", line 31, characters 17-27
93+
Re-raised at file "camlinternalLazy.ml", line 36, characters 10-11
94+
Called from file "backtrace2.ml", line 67, characters 11-23
95+
Re-raised at file "hashtbl.ml", line 537, characters 19-28
5496
Called from file "backtrace2.ml", line 55, characters 8-41
5597
Re-raised at file "camlinternalLazy.ml", line 35, characters 62-63
5698
Called from file "camlinternalLazy.ml", line 31, characters 17-27

testsuite/tests/backtrace/backtrace2.opt.reference

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,32 @@ Uncaught exception Invalid_argument("index out of bounds")
3535
Raised by primitive operation at file "backtrace2.ml", line 67, characters 14-22
3636
test_Not_found
3737
Uncaught exception Not_found
38-
Raised at file "hashtbl.ml", line 537, characters 13-28
38+
Raised at file "backtrace2.ml", line 41, characters 18-33
39+
Called from file "backtrace2.ml", line 41, characters 43-52
40+
Called from file "backtrace2.ml", line 41, characters 43-52
41+
Called from file "backtrace2.ml", line 41, characters 43-52
42+
Called from file "backtrace2.ml", line 41, characters 43-52
43+
Called from file "backtrace2.ml", line 41, characters 43-52
44+
Called from file "backtrace2.ml", line 43, characters 6-11
45+
Re-raised at file "hashtbl.ml", line 537, characters 13-28
3946
Called from file "backtrace2.ml", line 48, characters 9-42
4047
Re-raised at file "backtrace2.ml", line 48, characters 61-70
4148
Called from file "backtrace2.ml", line 67, characters 11-23
4249
Uncaught exception Not_found
43-
Raised at file "backtrace2.ml", line 52, characters 18-33
50+
Raised at file "backtrace2.ml", line 41, characters 18-33
51+
Called from file "backtrace2.ml", line 41, characters 43-52
52+
Called from file "backtrace2.ml", line 41, characters 43-52
53+
Called from file "backtrace2.ml", line 41, characters 43-52
54+
Called from file "backtrace2.ml", line 41, characters 43-52
55+
Called from file "backtrace2.ml", line 41, characters 43-52
56+
Called from file "backtrace2.ml", line 43, characters 6-11
57+
Re-raised at file "hashtbl.ml", line 537, characters 13-28
58+
Called from file "backtrace2.ml", line 48, characters 9-42
59+
Re-raised at file "backtrace2.ml", line 48, characters 61-70
60+
Called from file "backtrace2.ml", line 67, characters 11-23
61+
Re-raised at file "hashtbl.ml", line 537, characters 13-28
62+
Called from file "backtrace2.ml", line 55, characters 8-41
63+
Re-raised at file "backtrace2.ml", line 52, characters 18-33
4464
Called from file "backtrace2.ml", line 52, characters 43-52
4565
Called from file "backtrace2.ml", line 52, characters 43-52
4666
Called from file "backtrace2.ml", line 52, characters 43-52
@@ -50,7 +70,29 @@ Called from file "camlinternalLazy.ml", line 31, characters 17-27
5070
Re-raised at file "camlinternalLazy.ml", line 36, characters 4-11
5171
Called from file "backtrace2.ml", line 67, characters 11-23
5272
Uncaught exception Not_found
53-
Raised at file "hashtbl.ml", line 537, characters 13-28
73+
Raised at file "backtrace2.ml", line 41, characters 18-33
74+
Called from file "backtrace2.ml", line 41, characters 43-52
75+
Called from file "backtrace2.ml", line 41, characters 43-52
76+
Called from file "backtrace2.ml", line 41, characters 43-52
77+
Called from file "backtrace2.ml", line 41, characters 43-52
78+
Called from file "backtrace2.ml", line 41, characters 43-52
79+
Called from file "backtrace2.ml", line 43, characters 6-11
80+
Re-raised at file "hashtbl.ml", line 537, characters 13-28
81+
Called from file "backtrace2.ml", line 48, characters 9-42
82+
Re-raised at file "backtrace2.ml", line 48, characters 61-70
83+
Called from file "backtrace2.ml", line 67, characters 11-23
84+
Re-raised at file "hashtbl.ml", line 537, characters 13-28
85+
Called from file "backtrace2.ml", line 55, characters 8-41
86+
Re-raised at file "backtrace2.ml", line 52, characters 18-33
87+
Called from file "backtrace2.ml", line 52, characters 43-52
88+
Called from file "backtrace2.ml", line 52, characters 43-52
89+
Called from file "backtrace2.ml", line 52, characters 43-52
90+
Called from file "backtrace2.ml", line 52, characters 43-52
91+
Called from file "backtrace2.ml", line 52, characters 43-52
92+
Called from file "camlinternalLazy.ml", line 31, characters 17-27
93+
Re-raised at file "camlinternalLazy.ml", line 36, characters 4-11
94+
Called from file "backtrace2.ml", line 67, characters 11-23
95+
Re-raised at file "hashtbl.ml", line 537, characters 13-28
5496
Called from file "backtrace2.ml", line 55, characters 8-41
5597
Re-raised at file "camlinternalLazy.ml", line 35, characters 56-63
5698
Called from file "camlinternalLazy.ml", line 31, characters 17-27

testsuite/tests/backtrace/backtrace3.byte.reference

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ Called from file "backtrace3.ml", line 20, characters 4-11
6060
Re-raised at file "backtrace3.ml", line 47, characters 51-55
6161
Called from file "backtrace3.ml", line 54, characters 11-23
6262
Uncaught exception Backtrace3.Error("h")
63-
Raised at file "backtrace3.ml", line 50, characters 16-17
63+
Raised at file "backtrace3.ml", line 16, characters 21-32
64+
Called from file "backtrace3.ml", line 16, characters 42-53
65+
Called from file "backtrace3.ml", line 16, characters 42-53
66+
Called from file "backtrace3.ml", line 16, characters 42-53
67+
Called from file "backtrace3.ml", line 16, characters 42-53
68+
Called from file "backtrace3.ml", line 16, characters 42-53
69+
Called from file "backtrace3.ml", line 20, characters 4-11
70+
Re-raised at file "backtrace3.ml", line 50, characters 16-17
6471
Called from file "backtrace3.ml", line 54, characters 11-23
6572
Uncaught exception Invalid_argument("index out of bounds")
6673
Raised by primitive operation at file "backtrace3.ml", line 54, characters 14-22

testsuite/tests/backtrace/backtrace3.opt.reference

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ Called from file "backtrace3.ml", line 20, characters 4-11
6060
Re-raised at file "backtrace3.ml", line 47, characters 45-55
6161
Called from file "backtrace3.ml", line 54, characters 11-23
6262
Uncaught exception Backtrace3.Error("h")
63-
Raised at file "backtrace3.ml", line 50, characters 10-17
63+
Raised at file "backtrace3.ml", line 16, characters 16-32
64+
Called from file "backtrace3.ml", line 16, characters 42-53
65+
Called from file "backtrace3.ml", line 16, characters 42-53
66+
Called from file "backtrace3.ml", line 16, characters 42-53
67+
Called from file "backtrace3.ml", line 16, characters 42-53
68+
Called from file "backtrace3.ml", line 16, characters 42-53
69+
Called from file "backtrace3.ml", line 20, characters 4-11
70+
Re-raised at file "backtrace3.ml", line 50, characters 10-17
6471
Called from file "backtrace3.ml", line 54, characters 11-23
6572
Uncaught exception Invalid_argument("index out of bounds")
6673
Raised by primitive operation at file "backtrace3.ml", line 54, characters 14-22

testsuite/tests/backtrace/backtrace_or_exception.byte.reference

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Raised at file "backtrace_or_exception.ml", line 24, characters 10-13
33
Called from file "backtrace_or_exception.ml", line 44, characters 6-10
44
---------------------------
55
exception Backtrace_or_exception.Exn
6-
Raised at file "backtrace_or_exception.ml", line 15, characters 10-13
6+
Raised at file "backtrace_or_exception.ml", line 24, characters 10-13
7+
Called from file "backtrace_or_exception.ml", line 44, characters 6-10
8+
Re-raised at file "backtrace_or_exception.ml", line 15, characters 10-13
79
Called from file "backtrace_or_exception.ml", line 28, characters 8-44
810
Re-raised at file "backtrace_or_exception.ml", line 31, characters 10-13
911
Called from file "backtrace_or_exception.ml", line 44, characters 6-10

testsuite/tests/backtrace/backtrace_or_exception.opt.reference

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Raised at file "backtrace_or_exception.ml", line 24, characters 4-13
33
Called from file "backtrace_or_exception.ml", line 44, characters 6-10
44
---------------------------
55
exception Backtrace_or_exception.Exn
6-
Raised at file "backtrace_or_exception.ml", line 15, characters 4-13
6+
Raised at file "backtrace_or_exception.ml", line 24, characters 4-13
7+
Called from file "backtrace_or_exception.ml", line 44, characters 6-10
8+
Re-raised at file "backtrace_or_exception.ml", line 15, characters 4-13
79
Called from file "backtrace_or_exception.ml", line 28, characters 8-44
810
Re-raised at file "backtrace_or_exception.ml", line 31, characters 4-13
911
Called from file "backtrace_or_exception.ml", line 44, characters 6-10

0 commit comments

Comments
 (0)