mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 20:45:06 +02:00
Added stubs
This commit is contained in:
parent
b931fb5dbc
commit
dc8b9450b8
1 changed files with 18 additions and 5 deletions
|
@ -1,12 +1,25 @@
|
||||||
(define-library (scheme time)
|
(define-library (scheme time)
|
||||||
(export
|
(export
|
||||||
current-jiffy ;; TODO: This is just temporary, of course
|
current-second
|
||||||
|
current-jiffy
|
||||||
|
jiffies-per-second
|
||||||
)
|
)
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
)
|
)
|
||||||
(begin
|
(begin
|
||||||
(define-c prim-test
|
;; Experimenting with what an FFI could look like
|
||||||
"(void *data, int argc, closure _, object k, object arg1, object arg2)"
|
;; TODO: also need a way to add #include's, and later on compiler options (may already have that, need to check)
|
||||||
" return_closcall1(data, k, arg1); ")
|
;;
|
||||||
;; End FFI
|
;; want the signature to be similar to this:
|
||||||
|
;; static void __lambda_0(void *data, int argc, closure _,object k_7322, object arg1_737, object arg2_736) {
|
||||||
|
;; lambda portion is computed, so we can't include that.
|
||||||
|
;; compiler would need to insert the "static void (lambda)" part
|
||||||
|
;; TODO: maybe break up into two args, one being the args list and the other being the function body??
|
||||||
|
(define-c current-jiffy
|
||||||
|
"(void *data, int argc, closure _, object k)"
|
||||||
|
;; TODO: actually get the current jiffy
|
||||||
|
" make_int(temp, 0);
|
||||||
|
return_closcall1(data, k, &temp); ")
|
||||||
|
(define jiffies-per-second 0) ;; TODO: just a placeholder at the moment
|
||||||
|
(define current-second 0) ;; TODO: just a placeholder at the moment
|
||||||
))
|
))
|
||||||
|
|
Loading…
Add table
Reference in a new issue