| const+ r \ float |
const+ r \ float |
| const+ func \ C function pointer |
const+ func \ C function pointer |
| const+ void |
const+ void |
| |
const+ file \ C file pointer |
| drop |
drop |
| |
|
| set-current |
set-current |
| parse-libcc-type dup 0< -32 and throw swap c! ; |
parse-libcc-type dup 0< -32 and throw swap c! ; |
| |
|
| : type-letter ( n -- c ) |
: type-letter ( n -- c ) |
| chars s" nadrfv" drop + c@ ; |
chars s" nadrfvF" drop + c@ ; |
| |
|
| \ count-stacks |
\ count-stacks |
| |
|
| ' count-stacks-r , |
' count-stacks-r , |
| ' count-stacks-func , |
' count-stacks-func , |
| ' count-stacks-void , |
' count-stacks-void , |
| |
' count-stacks-a , |
| |
|
| : count-stacks ( pars -- fp-change sp-change ) |
: count-stacks ( pars -- fp-change sp-change ) |
| \ pars is an addr u pair |
\ pars is an addr u pair |
| : gen-par-void ( fp-depth1 sp-depth1 -- fp-depth2 sp-depth2 ) |
: gen-par-void ( fp-depth1 sp-depth1 -- fp-depth2 sp-depth2 ) |
| -32 throw ; |
-32 throw ; |
| |
|
| |
: gen-par-file ( fp-depth1 sp-depth1 -- fp-depth2 sp-depth2 ) |
| |
." (FILE *)(" gen-par-n ." )" ; |
| |
|
| create gen-par-types |
create gen-par-types |
| ' gen-par-n , |
' gen-par-n , |
| ' gen-par-a , |
' gen-par-a , |
| ' gen-par-r , |
' gen-par-r , |
| ' gen-par-func , |
' gen-par-func , |
| ' gen-par-void , |
' gen-par-void , |
| |
' gen-par-file , |
| |
|
| : gen-par ( fp-depth1 sp-depth1 partype -- fp-depth2 sp-depth2 ) |
: gen-par ( fp-depth1 sp-depth1 partype -- fp-depth2 sp-depth2 ) |
| cells gen-par-types + @ execute ; |
cells gen-par-types + @ execute ; |
| ' gen-wrapped-r , |
' gen-wrapped-r , |
| ' gen-wrapped-func , |
' gen-wrapped-func , |
| ' gen-wrapped-void , |
' gen-wrapped-void , |
| |
' gen-wrapped-a , |
| |
|
| : gen-wrapped-stmt ( pars c-name fp-change1 sp-change1 ret -- fp-change sp-change ) |
: gen-wrapped-stmt ( pars c-name fp-change1 sp-change1 ret -- fp-change sp-change ) |
| cells gen-wrapped-types + @ execute ; |
cells gen-wrapped-types + @ execute ; |