Skip to content

Commit

Permalink
flambda-backend: Zero alloc remove annotation from stdlib (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
gretay-js authored Jun 8, 2023
1 parent f416497 commit 6ec73ed
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 15 deletions.
7 changes: 1 addition & 6 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@

(main
(flags
(:standard -warn-error +A))
(ocamlopt_flags
;; CR gyorsh: it is not clear what the ":standard" flags are, and they
;; may change depending on the version of dune.
;; Consider hard-coded flags, such as -O3.
(:standard -zero-alloc-check)))
(:standard -warn-error +A)))
(boot
(flags
(:standard -warn-error +A))))
Expand Down
1 change: 0 additions & 1 deletion stdlib/camlinternalAtomic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
(**************************************************************************)

[@@@ocaml.flambda_o3]
[@@@ocaml.zero_alloc check]

(* CamlinternalAtomic is a dependency of Stdlib, so it is compiled with
-nopervasives. *)
Expand Down
1 change: 0 additions & 1 deletion stdlib/camlinternalFormatBasics.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
[@@@ocaml.zero_alloc check]

(* Padding position. *)
type padty =
Expand Down
1 change: 0 additions & 1 deletion stdlib/std_exit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
open! Stdlib

[@@@ocaml.flambda_o3]
[@@@ocaml.zero_alloc check]

(* Ensure that [at_exit] functions are called at the end of every program *)

Expand Down
1 change: 0 additions & 1 deletion stdlib/stdlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

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

(* Exceptions *)

Expand Down
2 changes: 1 addition & 1 deletion 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 at Stdlib.open_in_gen in file "stdlib.ml", line 409, characters 28-54
Raised at Stdlib.open_in_gen in file "stdlib.ml", line 408, 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 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 at Stdlib.open_in_gen in file "stdlib.ml", line 409, characters 28-54
Called from Stdlib.open_in in file "stdlib.ml", line 414, characters 2-45
Raised at Stdlib.open_in_gen in file "stdlib.ml", line 408, characters 28-54
Called from Stdlib.open_in in file "stdlib.ml", line 413, 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 33, 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 33, 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" (inlined), line 2, characters 15-38
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

0 comments on commit 6ec73ed

Please sign in to comment.