forked from kanaka/mal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: move step5 non-TCO tests to per impl.
- Remove most of the step5 excludes in the Makefile except for ones which don't have TCO capability at all (or the implementation is too slow): bash, make, mal, matlab. - Make perf_EXCLUDES consistent with other excludes. - Add a print-FOO target which prints the resolved value of Makefile variable FOO. For example, `make print-IMPLS` to print the list of implementations.
- Loading branch information
Showing
48 changed files
with
418 additions
and
48 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
;; awk: skipping non-TCO recursion | ||
;; Reason: completes up to 50,000 |
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,2 @@ | ||
;; C: skipping non-TCO recursion | ||
;; Reason: segfaults (unrecoverable) |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,2 @@ | ||
;; C++: skipping non-TCO recursion | ||
;; Reason: completes at 10,000, segfaults at 20,000 |
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,2 @@ | ||
;; Crystal: skipping non-TCO recursion | ||
;; Reason: completes at 1,000,000 |
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,2 @@ | ||
;; C#: skipping non-TCO recursion | ||
;; Reason: unrecoverable stack overflow at 10,000 |
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,2 @@ | ||
;; D: skipping non-TCO recursion | ||
;; Reason: completes at 10,000, segfaults at 40,000 |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,2 @@ | ||
;; Elixir: skipping non-TCO recursion | ||
;; Reason: Elixir has TCO, test always completes. |
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,2 @@ | ||
;; Erlang: skipping non-TCO recursion | ||
;; Reason: Erlang has TCO, test always completes. |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,2 @@ | ||
;; F#: skipping non-TCO recursion | ||
;; Reason: completes at 10,000, unrecoverable segfault at 20,000 |
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,2 @@ | ||
;; Go: skipping non-TCO recursion | ||
;; Reason: completes even at 100,000 |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,2 @@ | ||
;; Haskell: skipping non-TCO recursion | ||
;; Reason: completes up to 100,000, stackoverflow at 1,000,000 |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,2 @@ | ||
;; Io: skipping non-TCO recursion | ||
;; Reason: never completes, never segfaults |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,2 @@ | ||
;; miniMAL skipping non-TCO recursion | ||
;; Reason: Unrecoverable stack overflow at 10,000 |
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,2 @@ | ||
;; Nim: skipping non-TCO recursion | ||
;; Reason: completes at 10,000, unrecoverable segfault 20,000 |
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,2 @@ | ||
;; Objective C: skipping non-TCO recursion | ||
;; Reason: completes at 10,000, unrecoverable segfault at 20,000 |
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,2 @@ | ||
;; Object Pascal: skipping non-TCO recursion | ||
;; Reason: completes at 10,000, unrecoverable segfault at 20,000 |
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,2 @@ | ||
;; Ocaml skipping non-TCO recursion | ||
;; Reason: completes at 50,000, unrecoverable segfaul at 100,000 |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,2 @@ | ||
;; PHP: skipping non-TCO recursion | ||
;; Reason: completes at 10,000, unrecoverable segfault at 20,000 |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
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,15 @@ | ||
;; Test recursive non-tail call function | ||
|
||
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1)))))) | ||
|
||
(sum-to 10) | ||
;=>55 | ||
|
||
;;; no try* yet, so test completion of side-effects | ||
(def! res1 nil) | ||
;=>nil | ||
;;; For implementations without their own TCO this should fail and | ||
;;; leave res1 unchanged | ||
(def! res1 (sum-to 10000)) | ||
res1 | ||
;=>nil |
Oops, something went wrong.