mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 08:17:35 +02:00
Build-out docs
This commit is contained in:
parent
c5a802b51e
commit
7b69c022b0
1 changed files with 48 additions and 4 deletions
|
@ -5,8 +5,6 @@ The `(scheme cyclone primitives)` library contains information about Cyclone's s
|
||||||
*This library is used internally by the compiler and its API may change at any time.*
|
*This library is used internally by the compiler and its API may change at any time.*
|
||||||
|
|
||||||
- [`prim?`](#prim)
|
- [`prim?`](#prim)
|
||||||
- [`*primitives*`](#primitives)
|
|
||||||
- [`*primitives-num-args*`](#primitives-num-args)
|
|
||||||
- [`prim-call?`](#prim-call)
|
- [`prim-call?`](#prim-call)
|
||||||
- [`prim->c-func`](#prim-c-func)
|
- [`prim->c-func`](#prim-c-func)
|
||||||
- [`prim/data-arg?`](#primdata-arg)
|
- [`prim/data-arg?`](#primdata-arg)
|
||||||
|
@ -21,29 +19,75 @@ The `(scheme cyclone primitives)` library contains information about Cyclone's s
|
||||||
|
|
||||||
# prim?
|
# prim?
|
||||||
|
|
||||||
# \*primitives\*
|
(prim? obj)
|
||||||
|
|
||||||
# \*primitives-num-args\*
|
Determine if the given object is a symbol referring to a primitive.
|
||||||
|
|
||||||
# prim-call?
|
# prim-call?
|
||||||
|
|
||||||
|
(prim-call? exp)
|
||||||
|
|
||||||
|
Determine if the given expression `exp` is a call to a primitive.
|
||||||
|
|
||||||
# prim->c-func
|
# prim->c-func
|
||||||
|
|
||||||
|
(prim->c-func sym use-alloca? emit-unsafe)
|
||||||
|
|
||||||
|
Returns text containing the C function that is used to implement primitive `sym`.
|
||||||
|
|
||||||
|
If `emit-unsafe` is true then an unsafe version of the primtive, if available, will be returned.
|
||||||
|
|
||||||
# prim/data-arg?
|
# prim/data-arg?
|
||||||
|
|
||||||
|
(prim/data-arg? sym)
|
||||||
|
|
||||||
|
Primitive indicating if the primitive requires passing thread data as its first argument.
|
||||||
|
|
||||||
# prim/c-var-assign
|
# prim/c-var-assign
|
||||||
|
|
||||||
|
(prim/c-var-assign sym)
|
||||||
|
|
||||||
|
Return the C data type of variable used to assign the result of primitive `sym`, if applicable. `#f` is returned otherwise.
|
||||||
|
|
||||||
# prim/cvar?
|
# prim/cvar?
|
||||||
|
|
||||||
|
(prim/cvar? sym)
|
||||||
|
|
||||||
|
Determine if primitive `sym` creates a C variable.
|
||||||
|
|
||||||
# prim:check-arg-count
|
# prim:check-arg-count
|
||||||
|
|
||||||
|
(prim:check-arg-count sym num-args expected)
|
||||||
|
|
||||||
|
Return `#f` the primitive `sym` cannot accept the given number of arguments `num-args` given the expected number of arguments `expected`, and `#t` otherwise.
|
||||||
|
|
||||||
# prim:mutates?
|
# prim:mutates?
|
||||||
|
|
||||||
|
(prim:mutates? sym)
|
||||||
|
|
||||||
|
Does primitive `sym` mutate any of its arguments?
|
||||||
|
|
||||||
# prim:cont?
|
# prim:cont?
|
||||||
|
|
||||||
|
(prim:cont? sym)
|
||||||
|
|
||||||
|
Should the compiler pass a continuation as the function's first parameter?
|
||||||
|
|
||||||
# prim:cont/no-args?
|
# prim:cont/no-args?
|
||||||
|
|
||||||
|
(prim:cont/no-args? sym)
|
||||||
|
|
||||||
|
Is `sym` a primitive function that passes a continuation or thread data but has no other arguments?
|
||||||
|
|
||||||
# prim:arg-count?
|
# prim:arg-count?
|
||||||
|
|
||||||
|
(prim:arg-count? sym)
|
||||||
|
|
||||||
|
Should the compiler pass an integer arg count as the function's first parameter?
|
||||||
|
|
||||||
# prim:allocates-object?)
|
# prim:allocates-object?)
|
||||||
|
|
||||||
|
(prim:allocates-object? sym use-alloca?)
|
||||||
|
|
||||||
|
Does primitive `sym` allocate an object?
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue