-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flambda-backend: Add a test for frametable setup in natdynlinked libr…
…aries (#983)
- Loading branch information
1 parent
b73ab12
commit 396d5b8
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
(*external ex: int -> int = "caml_ex"*) | ||
|
||
let foo a1 a2 a3 a4 a5 a6 a7 a8 a9 = | ||
Printexc.print_raw_backtrace stdout (Printexc.get_callstack 4); | ||
fun a10 a11 a12 a13 a14 a15 a16 a17 a18 -> () | ||
|
||
(* Ensure that the frametable is set up correctly so that a [caml_curry_18] | ||
frame can be traversed *) | ||
let[@inline never] test_frametable () = | ||
(Sys.opaque_identity foo) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; | ||
(* force non-tail call *) | ||
Sys.opaque_identity () | ||
|
||
let () = | ||
Api.reg_mod "Plugin2"; | ||
Api.add_cb (fun () -> print_endline "Callback from plugin2"); | ||
(* let i = ex 3 in*) | ||
List.iter (fun i -> Printf.printf "%i\n" i) Plugin.facts; | ||
test_frametable (); | ||
Printf.printf "XXX\n" |