Skip to content

Commit

Permalink
Merge pull request #88 from talex5/remove-inline
Browse files Browse the repository at this point in the history
Remove all `inlined` attributes
  • Loading branch information
talex5 authored May 12, 2023
2 parents 027c312 + 134ce54 commit 74633cf
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/benchmark/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
(name main)
(enabled_if (= %{architecture} amd64))
(libraries capnp capnp_unix fast_rand base)
(flags :standard -w -55)
(ocamlopt_flags :standard -O3 -inline 2000))

(rule
Expand Down
1 change: 0 additions & 1 deletion src/compiler/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(executable
(name main)
(public_name capnpc-ocaml)
(flags :standard -w -55)
(libraries capnp capnp_unix))
2 changes: 1 addition & 1 deletion src/compiler/generate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ let mod_functor_footer = [
" module MessageWrapper = MessageWrapper";
"end";
"";
"module Make(M:Capnp.MessageSig.S) = MakeRPC[@inlined](Capnp.RPC.None(M)) [@@inline]";
"module Make(M:Capnp.MessageSig.S) = MakeRPC(Capnp.RPC.None(M))";
]


Expand Down
5 changes: 1 addition & 4 deletions src/examples/1/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
(executable
(name example1)
(libraries capnp)
; We disable warning 55 as this relates to inlining certain functions. For inlining please see the README.md
; and the benchmarks for examples.
(flags :standard -w -55))
(libraries capnp))

; This rule tells dune how to generate foo.ml and foo.mli by compiling foo.capnp against the CAP'N PROTO compiler
; PLEASE NOTE that capnpc must exist on your computer for this to work (https://capnproto.org/install.html)
Expand Down
3 changes: 1 addition & 2 deletions src/examples/2/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(executable
(name example2)
(libraries capnp)
(flags :standard -w -55))
(libraries capnp))

(rule
(targets shape.ml shape.mli)
Expand Down
3 changes: 1 addition & 2 deletions src/runtime/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
(name capnp)
(public_name capnp)
(synopsis "Runtime support library for capnp-ocaml")
(libraries result stdint ocplib-endian res)
(flags :standard -w -55))
(libraries result stdint ocplib-endian res))
2 changes: 1 addition & 1 deletion src/runtime/message.ml
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ module Make (Storage : MessageStorage.S) = struct

end [@@inline]

module BytesMessage = Make[@inlined](BytesStorage)
module BytesMessage = Make(BytesStorage)


exception Invalid_message of string
Expand Down
3 changes: 1 addition & 2 deletions src/tests/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(test
(name run_tests)
(libraries capnp ounit2 base_quickcheck)
(flags :standard -w -55))
(libraries capnp ounit2 base_quickcheck))

(rule
(targets
Expand Down
3 changes: 1 addition & 2 deletions src/unix/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
(name capnp_unix)
(public_name capnp.unix)
(synopsis "Runtime support library for capnp-ocaml (Unix)")
(libraries capnp unix base stdio)
(flags :standard -w -55))
(libraries capnp unix base stdio))

0 comments on commit 74633cf

Please sign in to comment.