-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flambda-backend: Fix some Debuginfo.t scopes in the frontend (#248)
* Add Debuginfo scopes for partial/eta expansion wrappers and "lazy"; use in the frontend. * Fix test As bytecode and native differs in how they handle partial application the check for partial applications has been split in a new separate testcase. Co-authored-by: Pierre Oechsel <pierre.oechsel@gmail.com>
- Loading branch information
Showing
10 changed files
with
122 additions
and
49 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
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
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
4 changes: 4 additions & 0 deletions
4
testsuite/tests/backtrace/names_partial_application.byte.reference
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Raised at Names_partial_application.bang in file "names_partial_application.ml", line 9, characters 29-39 | ||
Called from Names_partial_application.labelled_arguments_partial.f in file "names_partial_application.ml", line 12, characters 38-42 | ||
Called from Names_partial_application.labelled_arguments_partial in file "names_partial_application.ml", line 14, characters 2-15 | ||
Called from Names_partial_application in file "names_partial_application.ml", line 20, characters 4-54 |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(* TEST | ||
flags = "-g" | ||
* bytecode | ||
reference = "${test_source_directory}/names_partial_application.byte.reference" | ||
* native | ||
reference = "${test_source_directory}/names_partial_application.opt.reference" | ||
*) | ||
|
||
let[@inline never] bang () = raise Exit | ||
|
||
let[@inline never] labelled_arguments_partial k = | ||
let[@inline never] f ~a = ignore a; k (); fun ~b -> ignore b; () in | ||
let partial = Sys.opaque_identity (f ~b:1) in | ||
partial ~a:(); | ||
42 | ||
|
||
let () = | ||
Printexc.record_backtrace true; | ||
match | ||
labelled_arguments_partial @@ fun _ -> | ||
bang () | ||
with | ||
| _ -> assert false | ||
| exception Exit -> | ||
Printexc.print_backtrace stdout |
5 changes: 5 additions & 0 deletions
5
testsuite/tests/backtrace/names_partial_application.opt.reference
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Raised at Names_partial_application.bang in file "names_partial_application.ml", line 9, characters 29-39 | ||
Called from Names_partial_application.labelled_arguments_partial.f in file "names_partial_application.ml", line 12, characters 38-42 | ||
Called from Names_partial_application.labelled_arguments_partial.(partial) in file "names_partial_application.ml", line 13, characters 37-45 | ||
Called from Names_partial_application.labelled_arguments_partial in file "names_partial_application.ml", line 14, characters 2-15 | ||
Called from Names_partial_application in file "names_partial_application.ml", line 20, characters 4-54 |
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