From 8895bee4eda3d702ac0f365b7716d1d1a871385b Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Sat, 19 Dec 2015 00:08:36 -0500 Subject: [PATCH] Adding sleep function --- docs/Developer-How-To.md | 11 +++++------ scheme/cyclone/cgen.sld | 2 ++ scheme/cyclone/transforms.sld | 2 ++ scheme/eval.sld | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/Developer-How-To.md b/docs/Developer-How-To.md index 6ea11d5c..9a7514e9 100644 --- a/docs/Developer-How-To.md +++ b/docs/Developer-How-To.md @@ -7,11 +7,10 @@ TODO: need to develop this section better to come up with a workable/optimal approach to building things: -- Install modified `.sld` files -- ??? -- Compile: `cyclone scheme/cyclone/cgen.sld` -- Copy modified files to cyclone-bootstrap, including `cgen.c` -- install cyclone-bootstrap -- run `make clean ; make && make bootstrap` from cyclone repo -- run `make clean ; ./install` from bootstrap repo +- Compile: + cyclone scheme/cyclone/cgen.sld + cyclone scheme/cyclone/transforms.sld +- Copy modified files to cyclone-bootstrap, including runtime, `.sld`, and compiled `.c` files. +- Run `make clean ; ./install` from bootstrap repo - Add primitives to the list in eval.sld. Rebuild one more time. diff --git a/scheme/cyclone/cgen.sld b/scheme/cyclone/cgen.sld index 58abed71..a2e2e58e 100644 --- a/scheme/cyclone/cgen.sld +++ b/scheme/cyclone/cgen.sld @@ -452,6 +452,7 @@ ((eq? p 'Cyc-has-cycle?) "Cyc_has_cycle") ((eq? p 'Cyc-spawn-thread!) "Cyc_spawn_thread") ((eq? p 'Cyc-end-thread!) "Cyc_end_thread") + ((eq? p 'Cyc-thread-sleep!) "Cyc_thread_sleep") ((eq? p 'Cyc-stdout) "Cyc_stdout") ((eq? p 'Cyc-stdin) "Cyc_stdin") ((eq? p 'Cyc-stderr) "Cyc_stderr") @@ -583,6 +584,7 @@ apply Cyc-default-exception-handler Cyc-end-thread! + Cyc-thread-sleep! open-input-file open-output-file close-port diff --git a/scheme/cyclone/transforms.sld b/scheme/cyclone/transforms.sld index 024f320b..9d115abb 100644 --- a/scheme/cyclone/transforms.sld +++ b/scheme/cyclone/transforms.sld @@ -453,6 +453,7 @@ Cyc-has-cycle? Cyc-spawn-thread! Cyc-end-thread! + Cyc-thread-sleep! Cyc-stdout Cyc-stdin Cyc-stderr @@ -558,6 +559,7 @@ Cyc-cvar? Cyc-spawn-thread! Cyc-end-thread! + Cyc-thread-sleep! apply %halt exit diff --git a/scheme/eval.sld b/scheme/eval.sld index 79197b0f..1cabf452 100644 --- a/scheme/eval.sld +++ b/scheme/eval.sld @@ -138,6 +138,7 @@ (list 'Cyc-has-cycle? Cyc-has-cycle?) (list 'Cyc-spawn-thread! Cyc-spawn-thread!) (list 'Cyc-end-thread! Cyc-end-thread!) + (list 'Cyc-thread-sleep! Cyc-thread-sleep!) (list 'Cyc-default-exception-handler Cyc-default-exception-handler) (list 'Cyc-current-exception-handler Cyc-current-exception-handler) (list '+ +)