-
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.
Merge pull request #3 from s-expressionists/vm-reorg
Vm reorg
- Loading branch information
Showing
6 changed files
with
389 additions
and
308 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 |
---|---|---|
|
@@ -70,20 +70,28 @@ | |
:depends-on (:maclina/base :ieee-floats) | ||
:components ((:file "loadltv"))) | ||
|
||
(asdf:defsystem #:maclina/vm-shared | ||
:description "Code shared by VM implementations." | ||
:author ("Charles Zhang" "Bike <[email protected]>") | ||
:maintainer "Bike <[email protected]" | ||
:depends-on (:maclina/base) | ||
:components ((:file "vm-shared"))) | ||
|
||
(asdf:defsystem #:maclina/vm-native | ||
:description "Maclina VM implementation using host environment." | ||
:author ("Charles Zhang" | ||
"Bike <[email protected]>") | ||
:maintainer "Bike <[email protected]>" | ||
:depends-on (:maclina/base :trucler) ; trucler only needed for client class - remove? | ||
;; trucler only needed for client class - remove? | ||
:depends-on (:maclina/vm-shared :trucler) | ||
:components ((:file "vm-native"))) | ||
|
||
(asdf:defsystem #:maclina/vm-cross | ||
:description "Maclina VM implementation using Clostrum environment." | ||
:author ("Charles Zhang" | ||
"Bike <[email protected]>") | ||
:maintainer "Bike <[email protected]>" | ||
:depends-on (:maclina/base :clostrum :clostrum-trucler) | ||
:depends-on (:maclina/vm-shared :clostrum :clostrum-trucler) | ||
:components ((:file "vm-cross"))) | ||
|
||
(asdf:defsystem #:maclina/test | ||
|
@@ -108,6 +116,7 @@ | |
(:file "externalize"))) | ||
(:file "cleanliness" :depends-on ("suites" "rt" "packages")) | ||
(:file "cooperation" :depends-on ("suites" "rt" "packages")) | ||
(:file "timeout" :depends-on ("suites" "rt" "packages")) | ||
(:file "long" :depends-on ("suites" "rt" "packages")) | ||
(:module "compiler-conditions" | ||
:depends-on ("suites" "rt" "packages") | ||
|
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 @@ | ||
(in-package #:maclina.test) | ||
|
||
;;;; Tests of the timeout mechanism. | ||
|
||
(5am:def-suite timeout :in maclina-cross) | ||
(5am:in-suite timeout) | ||
|
||
(5am:test timeout | ||
(let ((spinner | ||
(ceval '#'(lambda (i) | ||
(block nil | ||
(tagbody | ||
loop | ||
(if (= 0 i) (return)) | ||
(setq i (- i 1)) | ||
(go loop))))))) | ||
(5am:finishes (maclina.vm-cross:with-timeout (1000000) | ||
;; It is unlikely that any future revisions will be | ||
;; dumb enough that a loop iteration takes 100k instructions. | ||
(funcall spinner 10))) | ||
(5am:signals maclina.vm-cross:timeout | ||
(maclina.vm-cross:with-timeout (10) | ||
(funcall spinner 1000))) | ||
;; make sure that without a timeout, we can run as long as we want. | ||
(5am:finishes (funcall spinner 1000)))) |
Oops, something went wrong.