-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
148 additions
and
35 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
11 changes: 9 additions & 2 deletions
11
ocaml/testsuite/tests/asmcomp/poll_attr_both.compilers.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 |
---|---|---|
@@ -1,6 +1,13 @@ | ||
File "poll_attr_both.ml", line 1: | ||
File "poll_attr_both.ml", lines 16-22, characters 19-13: | ||
16 | ...................x = | ||
17 | let y = Sys.opaque_identity(ref 42) in | ||
18 | let x2 = v x in | ||
19 | for c = 0 to x2 do | ||
20 | ignore(Sys.opaque_identity(42)) | ||
21 | done; | ||
22 | x2 + !y | ||
Error: Function with poll-error attribute contains polling points: | ||
inserted poll | ||
allocation at File "poll_attr_both.ml", line 17, characters 29-37 | ||
function call at File "poll_attr_both.ml", line 18, characters 13-16 | ||
(plus compiler-inserted polling point(s) in prologue and/or loop back edges) | ||
|
7 changes: 6 additions & 1 deletion
7
ocaml/testsuite/tests/asmcomp/poll_attr_inserted.compilers.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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
File "poll_attr_inserted.ml", line 1: | ||
File "poll_attr_inserted.ml", lines 16-19, characters 19-6: | ||
16 | ...................x = | ||
17 | for c = 0 to 2 do | ||
18 | ignore(Sys.opaque_identity(42)) | ||
19 | done | ||
Error: Function with poll-error attribute contains polling points (inserted by the compiler) | ||
inserted poll | ||
|
8 changes: 6 additions & 2 deletions
8
ocaml/testsuite/tests/asmcomp/poll_attr_prologue.compilers.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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
File "poll_attr_prologue.ml", line 1: | ||
File "poll_attr_prologue.ml", lines 14-17, characters 23-38: | ||
14 | .......................x l = | ||
15 | match l with | ||
16 | | [] -> 0 | ||
17 | | _ :: tl -> (d[@tailcall]) (x+1) tl | ||
Error: Function with poll-error attribute contains polling points: | ||
inserted poll at File "poll_attr_prologue.ml", lines 14-17, characters 23-38 | ||
function call at File "poll_attr_prologue.ml", line 17, characters 15-38 | ||
(plus compiler-inserted polling point(s) in prologue and/or loop back edges) | ||
|
9 changes: 8 additions & 1 deletion
9
ocaml/testsuite/tests/asmcomp/poll_attr_user.compilers.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
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,30 @@ | ||
Lines 8-11, characters 28-6: | ||
8 | ............................x = | ||
9 | for _ = 0 to x do | ||
10 | ignore(Sys.opaque_identity(ref 42)) | ||
11 | done | ||
Error: Function with poll-error attribute contains polling points: | ||
allocation at Line 10, characters 30-38 | ||
|
||
Lines 2-5, characters 31-6: | ||
2 | ...............................x = | ||
3 | for _ = 0 to x do | ||
4 | ignore(Sys.opaque_identity 42) | ||
5 | done | ||
Error: Function with poll-error attribute contains polling points (inserted by the compiler) | ||
inserted poll | ||
|
||
Lines 2-4, characters 29-11: | ||
2 | .............................x = | ||
3 | ignore(Sys.opaque_identity(ref 42)); | ||
4 | tailrec x | ||
Error: Function with poll-error attribute contains polling points: | ||
allocation at Line 3, characters 28-36 | ||
|
||
Lines 2-3, characters 38-20: | ||
2 | ......................................x = | ||
3 | tailrec_no_alloc x | ||
Error: Function with poll-error attribute contains polling points (inserted by the compiler) | ||
inserted poll | ||
|
||
|
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,27 @@ | ||
(* TEST | ||
{ | ||
poll-insertion; | ||
toplevel.opt; | ||
} | ||
*) | ||
|
||
let[@poll error] loop_alloc x = | ||
for _ = 0 to x do | ||
ignore(Sys.opaque_identity(ref 42)) | ||
done | ||
;; | ||
|
||
let[@poll error] loop_no_alloc x = | ||
for _ = 0 to x do | ||
ignore(Sys.opaque_identity 42) | ||
done | ||
;; | ||
|
||
let[@poll error] rec tailrec x = | ||
ignore(Sys.opaque_identity(ref 42)); | ||
tailrec x | ||
;; | ||
|
||
let[@poll error] rec tailrec_no_alloc x = | ||
tailrec_no_alloc x | ||
;; |
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,6 +1,13 @@ | ||
File "poll_attr_both.ml", line 1: | ||
File "poll_attr_both.ml", lines 16-22, characters 19-13: | ||
16 | ...................x = | ||
17 | let y = Sys.opaque_identity(ref 42) in | ||
18 | let x2 = v x in | ||
19 | for c = 0 to x2 do | ||
20 | ignore(Sys.opaque_identity(42)) | ||
21 | done; | ||
22 | x2 + !y | ||
Error: Function with poll-error attribute contains polling points: | ||
inserted poll | ||
allocation at File "poll_attr_both.ml", line 17, characters 29-37 | ||
function call at File "poll_attr_both.ml", line 18, characters 13-16 | ||
(plus compiler-inserted polling point(s) in prologue and/or loop back edges) | ||
|
7 changes: 6 additions & 1 deletion
7
testsuite/tests/asmcomp/poll_attr_inserted.compilers.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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
File "poll_attr_inserted.ml", line 1: | ||
File "poll_attr_inserted.ml", lines 16-19, characters 19-6: | ||
16 | ...................x = | ||
17 | for c = 0 to 2 do | ||
18 | ignore(Sys.opaque_identity(42)) | ||
19 | done | ||
Error: Function with poll-error attribute contains polling points (inserted by the compiler) | ||
inserted poll | ||
|
8 changes: 6 additions & 2 deletions
8
testsuite/tests/asmcomp/poll_attr_prologue.compilers.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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
File "poll_attr_prologue.ml", line 1: | ||
File "poll_attr_prologue.ml", lines 14-17, characters 23-38: | ||
14 | .......................x l = | ||
15 | match l with | ||
16 | | [] -> 0 | ||
17 | | _ :: tl -> (d[@tailcall]) (x+1) tl | ||
Error: Function with poll-error attribute contains polling points: | ||
inserted poll at File "poll_attr_prologue.ml", lines 14-17, characters 23-38 | ||
function call at File "poll_attr_prologue.ml", line 17, characters 15-38 | ||
(plus compiler-inserted polling point(s) in prologue and/or loop back edges) | ||
|
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