Fix spacing

This commit is contained in:
Justin Ethier 2016-10-04 00:23:07 -04:00
parent 5cb20182da
commit 2151fe3663
11 changed files with 296 additions and 0 deletions

View file

@ -21,12 +21,22 @@ The `(scheme cyclone ast)` library defines abstract syntax tree types used durin
(ast:lambda? obj) (ast:lambda? obj)
# ast:lambda-id # ast:lambda-id
(ast:lambda-id lambda-obj) (ast:lambda-id lambda-obj)
# ast:lambda-args # ast:lambda-args
(ast:lambda-args lambda-obj) (ast:lambda-args lambda-obj)
# ast:set-lambda-args! # ast:set-lambda-args!
(ast:set-lambda-args! lambda-obj args) (ast:set-lambda-args! lambda-obj args)
# ast:lambda-body # ast:lambda-body
(ast:lambda-body lambda-obj) (ast:lambda-body lambda-obj)
# ast:set-lambda-body! # ast:set-lambda-body!
(ast:set-lambda-body! lambda-obj body) (ast:set-lambda-body! lambda-obj body)

View file

@ -11,23 +11,44 @@ The `(scheme cyclone cgen)` library compiles scheme code to a Cheney-on-the-MTA
- [`string-join`](#string-join) - [`string-join`](#string-join)
# mta:code-gen # mta:code-gen
(mta:code-gen input-program program? lib-name lib-exports imported-globals globals c-headers required-libs src-file) (mta:code-gen input-program program? lib-name lib-exports imported-globals globals c-headers required-libs src-file)
Convert the given input program - as pre-processed Scheme AST - into C code. This function cannot be called directly on a Scheme program, but must be called on Scheme code that has already been processed by all of the compiler's Scheme transformations, including CPS and closure conversions. Convert the given input program - as pre-processed Scheme AST - into C code. This function cannot be called directly on a Scheme program, but must be called on Scheme code that has already been processed by all of the compiler's Scheme transformations, including CPS and closure conversions.
# emit # emit
(emit string) (emit string)
`display` the string to the output port with a trailing newline. `display` the string to the output port with a trailing newline.
# emit\* # emit\*
(emit* string ...) (emit* string ...)
Emit all of the given strings and add a trailing newline. Emit all of the given strings and add a trailing newline.
# emits # emits
(emits string) (emits string)
`display` the string to the output port. `display` the string to the output port.
# emits\* # emits\*
(emits* string ...) (emits* string ...)
Call `emits` for each of the given strings. Call `emits` for each of the given strings.
# emit-newline # emit-newline
(emit-newline) (emit-newline)
`display` a newline to the current output port. `display` a newline to the current output port.
# string-join # string-join
(string-join list deliminator) (string-join list deliminator)
Create a single string from a list of strings, adding `deliminator` between each of the strings. Create a single string from a list of strings, adding `deliminator` between each of the strings.

View file

@ -10,14 +10,26 @@ The `(scheme cyclone common)` library contains definitions used by the compiler
- [`*c-file-header-comment*`](#c-file-header-comment) - [`*c-file-header-comment*`](#c-file-header-comment)
# \*Cyc-version-banner\* # \*Cyc-version-banner\*
The version banner printed when `icyc` starts. The version banner printed when `icyc` starts.
# \*version\* # \*version\*
The version number and name. The version number and name.
# \*version-number\* # \*version-number\*
The current version number. The current version number.
# \*version-name\* # \*version-name\*
The current version name. The current version name.
# \*version-banner\* # \*version-banner\*
The version banner printed when `icyc` starts. The version banner printed when `icyc` starts.
# \*c-file-header-comment\* # \*c-file-header-comment\*
The header comment added to C files. The header comment added to C files.

View file

@ -39,37 +39,72 @@ The `(scheme cyclone optimizations)` library performs CPS analysis and optimizat
- [`adbf:set-unused-params!`](#adbfset-unused-params) - [`adbf:set-unused-params!`](#adbfset-unused-params)
# optimize-cps # optimize-cps
# analyze-cps # analyze-cps
# opt:contract # opt:contract
# opt:inline-prims # opt:inline-prims
# adb:clear! # adb:clear!
# adb:get # adb:get
# adb:get/default # adb:get/default
# adb:set! # adb:set!
# adb:get-db # adb:get-db
# simple-lambda? # simple-lambda?
# one-instance-of-new-mutable-obj? # one-instance-of-new-mutable-obj?
# adb:make-var # adb:make-var
# %adb:make-var # %adb:make-var
# adb:variable? # adb:variable?
# adbv:global? # adbv:global?
# adbv:set-global! # adbv:set-global!
# adbv:defined-by # adbv:defined-by
# adbv:set-defined-by! # adbv:set-defined-by!
# adbv:reassigned? # adbv:reassigned?
# adbv:set-reassigned! # adbv:set-reassigned!
# adbv:assigned-value # adbv:assigned-value
# adbv:set-assigned-value! # adbv:set-assigned-value!
# adbv:const? # adbv:const?
# adbv:set-const! # adbv:set-const!
# adbv:const-value # adbv:const-value
# adbv:set-const-value! # adbv:set-const-value!
# adbv:ref-by # adbv:ref-by
# adbv:set-ref-by! # adbv:set-ref-by!
# adb:make-fnc # adb:make-fnc
# %adb:make-fnc # %adb:make-fnc
# adb:function? # adb:function?
# adbf:simple # adbf:simple
# adbf:set-simple! # adbf:set-simple!
# adbf:unused-params # adbf:unused-params
# adbf:set-unused-params! # adbf:set-unused-params!

View file

@ -29,28 +29,54 @@ The `(scheme cyclone libraries)` library implements r7rs libraries.
- [`lib:idb:id->import`](#libidb:id-import) - [`lib:idb:id->import`](#libidb:id-import)
# library? # library?
(library? obj) (library? obj)
# lib:list->import-set # lib:list->import-set
# lib:name # lib:name
# lib:name->string # lib:name->string
# lib:name->symbol # lib:name->symbol
# lib:result # lib:result
# lib:exports # lib:exports
# lib:rename-exports # lib:rename-exports
# lib:imports # lib:imports
# lib:body # lib:body
# lib:includes # lib:includes
# lib:include-c-headers # lib:include-c-headers
# lib:import->filename # lib:import->filename
# lib:import->metalist # lib:import->metalist
# lib:import->path # lib:import->path
# lib:read-imports # lib:read-imports
# lib:import->export-list # lib:import->export-list
# lib:resolve-imports # lib:resolve-imports
# lib:resolve-meta # lib:resolve-meta
# lib:get-all # lib:get-all
# lib:get-all-import-deps # lib:get-all-import-deps
# lib:get-dep-list # lib:get-dep-list
# lib:imports->idb # lib:imports->idb
# lib:idb:ids # lib:idb:ids
# lib:idb:id->import # lib:idb:id->import

View file

@ -12,10 +12,18 @@ The `(scheme cyclone macro)` library contains code to deal with macros.
- [`macro:get-defined-macros`](#macroget-defined-macros) - [`macro:get-defined-macros`](#macroget-defined-macros)
# define-syntax? # define-syntax?
# macro:macro? # macro:macro?
# macro:expand # macro:expand
# macro:add! # macro:add!
# macro:cleanup # macro:cleanup
# macro:load-env! # macro:load-env!
# macro:get-env # macro:get-env
# macro:get-defined-macros # macro:get-defined-macros

View file

@ -5,6 +5,9 @@ The `(scheme cyclone pretty-print)` library provides a pretty-printer for code f
- [`pretty-print`](#pretty-print) - [`pretty-print`](#pretty-print)
# pretty-print # pretty-print
(pretty-print obj) (pretty-print obj)
(pretty-print obj port) (pretty-print obj port)
Outputs object to the given output port, or the current output port if none is given. The output is automatically indented just like it would be in a source code file, to make it easier to read. Outputs object to the given output port, or the current output port if none is given. The output is automatically indented just like it would be in a source code file, to make it easier to read.

View file

@ -18,16 +18,30 @@ The `(scheme cyclone primitives)` library contains information about Cyclone's s
- [`prim:allocates-object?)`](#primallocates-object) - [`prim:allocates-object?)`](#primallocates-object)
# prim? # prim?
# \*primitives\* # \*primitives\*
# \*primitives-num-args\* # \*primitives-num-args\*
# prim-call? # prim-call?
# prim->c-func # prim->c-func
# prim/data-arg? # prim/data-arg?
# prim/c-var-assign # prim/c-var-assign
# prim/cvar? # prim/cvar?
# prim:check-arg-count # prim:check-arg-count
# prim:mutates? # prim:mutates?
# prim:cont? # prim:cont?
# prim:cont/no-args? # prim:cont/no-args?
# prim:arg-count? # prim:arg-count?
# prim:allocates-object?) # prim:allocates-object?)

View file

@ -30,28 +30,54 @@ The `(scheme cyclone test)` library contains a testing framework ported from `(c
- [`current-test-comparator`](#current-test-comparator) - [`current-test-comparator`](#current-test-comparator)
# warning # warning
# test-group-inc! # test-group-inc!
# print-exception # print-exception
# test # test
# test-equal # test-equal
# test-error # test-error
# test-assert # test-assert
# test-not # test-not
# test-values # test-values
# test-group # test-group
# current-test-group # current-test-group
# test-begin # test-begin
# test-end # test-end
# test-syntax-error # test-syntax-error
# test-propagate-info # test-propagate-info
# test-vars # test-vars
# test-run # test-run
# test-exit # test-exit
# current-test-verbosity # current-test-verbosity
# current-test-applier # current-test-applier
# current-test-handler # current-test-handler
# current-test-skipper # current-test-skipper
# current-test-group-reporter # current-test-group-reporter
# test-failure-count # test-failure-count
# current-test-epsilon # current-test-epsilon
# current-test-comparator # current-test-comparator

View file

@ -84,82 +84,162 @@ The `(scheme cyclone transforms)` library performs Scheme-to-Scheme transformati
- [`wrap-mutables `](#wrap-mutables) - [`wrap-mutables `](#wrap-mutables)
# \*defined-macros\* # \*defined-macros\*
# \*do-code-gen\* # \*do-code-gen\*
# \*primitives\* # \*primitives\*
# \*trace-level\* # \*trace-level\*
# alpha-convert # alpha-convert
# analyze-mutable-variables # analyze-mutable-variables
# app->args # app->args
# app->fun # app->fun
# assq-remove-key # assq-remove-key
# assq-remove-keys # assq-remove-keys
# ast:lambda-formals->list # ast:lambda-formals->list
# ast:lambda-formals-type # ast:lambda-formals-type
# azip # azip
# basename # basename
# begin->exps # begin->exps
# built-in-syms # built-in-syms
# cell->value # cell->value
# cell-get->cell # cell-get->cell
# cell-get? # cell-get?
# cell? # cell?
# clear-mutables # clear-mutables
# closure->env # closure->env
# closure->fv # closure->fv
# closure->lam # closure->lam
# closure-convert # closure-convert
# closure? # closure?
# cps-convert # cps-convert
# cyc:error # cyc:error
# define->lambda # define->lambda
# define-lambda? # define-lambda?
# difference # difference
# env-get->env # env-get->env
# env-get->field # env-get->field
# env-get->id # env-get->id
# env-get? # env-get?
# env-make->fields # env-make->fields
# env-make->id # env-make->id
# env-make->values # env-make->values
# env-make? # env-make?
# expand # expand
# expand-lambda-body # expand-lambda-body
# filter-unused-variables # filter-unused-variables
# free-vars # free-vars
# get-macros # get-macros
# global-vars # global-vars
# has-global? # has-global?
# insert # insert
# is-mutable? # is-mutable?
# isolate-globals # isolate-globals
# lambda-num-args # lambda-num-args
# let->args # let->args
# let->bindings # let->bindings
# let->bound-vars # let->bound-vars
# let->exp # let->exp
# let=>lambda # let=>lambda
# let? # let?
# letrec->args # letrec->args
# letrec->bindings # letrec->bindings
# letrec->bound-vars # letrec->bound-vars
# letrec->exp # letrec->exp
# letrec? # letrec?
# list->lambda-formals # list->lambda-formals
# list->pair # list->pair
# list-index # list-index
# mark-mutable # mark-mutable
# pos-in-list # pos-in-list
# precompute-prim-app? # precompute-prim-app?
# reduce # reduce
# remove # remove
# set-cell!->cell # set-cell!->cell
# set-cell!->value # set-cell!->value
# set-cell!? # set-cell!?
# symbol<? # symbol<?
# trace # trace
# trace:debug # trace:debug
# trace:error # trace:error
# trace:info # trace:info
# trace:warn # trace:warn
# union # union
# wrap-mutables # wrap-mutables

View file

@ -65,63 +65,124 @@ The `(scheme cyclone util`) library contains various utility functions.
- [`take `](#take) - [`take `](#take)
# Cyc-er-compare? # Cyc-er-compare?
# Cyc-er-rename # Cyc-er-rename
# app? # app?
# begin? # begin?
# const? # const?
# define->exp # define->exp
# define->var # define->var
# define-c? # define-c?
# define? # define?
# delete # delete
# delete-duplicates # delete-duplicates
# env:\_lookup-variable-value # env:\_lookup-variable-value
# env:add-binding-to-frame! # env:add-binding-to-frame!
# env:all-values # env:all-values
# env:all-variables # env:all-variables
# env:define-variable! # env:define-variable!
# env:enclosing-environment # env:enclosing-environment
# env:extend-environment # env:extend-environment
# env:first-frame # env:first-frame
# env:frame-values # env:frame-values
# env:frame-variables # env:frame-variables
# env:lookup # env:lookup
# env:lookup-variable-value # env:lookup-variable-value
# env:make-frame # env:make-frame
# env:set-variable-value! # env:set-variable-value!
# env:the-empty-environment # env:the-empty-environment
# filter # filter
# flatten # flatten
# formals->list # formals->list
# gensym # gensym
# identifier->symbol # identifier->symbol
# identifier=? # identifier=?
# identifier? # identifier?
# if->condition # if->condition
# if->else # if->else
# if->then # if->then
# if-else? # if-else?
# if? # if?
# lambda->exp # lambda->exp
# lambda->formals # lambda->formals
# lambda-formals->list # lambda-formals->list
# lambda-formals-type # lambda-formals-type
# lambda-varargs-var # lambda-varargs-var
# lambda-varargs? # lambda-varargs?
# lambda? # lambda?
# length/obj # length/obj
# list-index2 # list-index2
# list-insert-at! # list-insert-at!
# list-prefix? # list-prefix?
# mangle # mangle
# mangle-global # mangle-global
# pack-lambda-arguments # pack-lambda-arguments
# pair->list # pair->list
# quote? # quote?
# ref? # ref?
# set!->exp # set!->exp
# set!->var # set!->var
# set!? # set!?
# string-replace-all # string-replace-all
# tagged-list? # tagged-list?
# take # take