Skip to content

Commit

Permalink
Compile more stdlib files with -O3 (ocaml-flambda#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshinwell authored and poechsel committed Nov 29, 2021
1 parent 2c14c0a commit a207250
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ocaml/stdlib/camlinternalAtomic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
(* *)
(**************************************************************************)

[@@@ocaml.flambda_o3]

(* CamlinternalAtomic is a dependency of Stdlib, so it is compiled with
-nopervasives. *)
external ( == ) : 'a -> 'a -> bool = "%eq"
Expand Down
2 changes: 2 additions & 0 deletions ocaml/stdlib/either.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
(* *)
(**************************************************************************)

[@@@ocaml.flambda_o3]

type ('a, 'b) t = Left of 'a | Right of 'b

let left v = Left v
Expand Down
1 change: 1 addition & 0 deletions ocaml/stdlib/stdlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
(**************************************************************************)

[@@@ocaml.warning "-49"]
[@@@ocaml.flambda_o3]

(* Exceptions *)

Expand Down
2 changes: 1 addition & 1 deletion ocaml/testsuite/tests/backtrace/pr2195-locs.byte.reference
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Fatal error: exception Stdlib.Exit
Raised by primitive operation at Stdlib.open_in_gen in file "stdlib.ml", line 401, characters 28-54
Raised by primitive operation at Stdlib.open_in_gen in file "stdlib.ml", line 402, characters 28-54
Called from Pr2195 in file "pr2195.ml", line 24, characters 6-19
Re-raised at Pr2195 in file "pr2195.ml", line 29, characters 4-41
4 changes: 2 additions & 2 deletions ocaml/testsuite/tests/backtrace/pr2195.opt.reference
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Fatal error: exception Stdlib.Exit
Raised by primitive operation at Stdlib.open_in_gen in file "stdlib.ml", line 401, characters 28-54
Called from Stdlib.open_in in file "stdlib.ml" (inlined), line 406, characters 2-45
Raised by primitive operation at Stdlib.open_in_gen in file "stdlib.ml", line 402, characters 28-54
Called from Stdlib.open_in in file "stdlib.ml" (inlined), line 407, characters 2-45
Called from Pr2195 in file "pr2195.ml", line 24, characters 6-19
Re-raised at Pr2195 in file "pr2195.ml", line 29, characters 4-41
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Error: Failure("Plugin error")
Raised at Stdlib.failwith in file "stdlib.ml", line 31, characters 17-33
Raised at Stdlib.failwith in file "stdlib.ml", line 32, characters 17-33
Called from Test10_plugin.g in file "test10_plugin.ml", line 3, characters 2-21
Called from Test10_plugin.f in file "test10_plugin.ml", line 6, characters 2-6
Called from Test10_plugin in file "test10_plugin.ml", line 10, characters 2-6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Error: Failure("Plugin error")
Raised at Stdlib.failwith in file "stdlib.ml", line 31, characters 17-33
Raised at Stdlib.failwith in file "stdlib.ml", line 32, characters 17-33
Called from Test10_plugin.g in file "test10_plugin.ml", line 2, characters 15-38
Called from Test10_plugin in file "test10_plugin.ml", line 10, characters 2-6
Called from Dynlink.Native.run.(fun) in file "otherlibs/dynlink/dynlink.ml", line 250, characters 12-29
Expand Down

0 comments on commit a207250

Please sign in to comment.