cvs
Slava Pestov 2005-02-07 18:14:55 +00:00
parent 695c351c48
commit 422205e4f9
3 changed files with 18 additions and 16 deletions

View File

@ -4,6 +4,7 @@
- keyboard focus
- keyboard gestures
- text fields
- finish check boxes
+ compiler:
@ -15,7 +16,7 @@
- goal: to compile hash* optimally
- type check/not-check entry points for compiled words
- getenv/setenv: if literal arg, compile as a load/store
- empty ifte: wrong input type.
- compile tuple dispatch
+ oop:

View File

@ -119,7 +119,7 @@ hashtables ;
[ exit* [ [ integer ] [ ] ] ]
[ client-socket [ [ string integer ] [ port port ] ] ]
[ server-socket [ [ integer ] [ port ] ] ]
[ close-port [ [ port ] ] ]
[ close-port [ [ port ] [ ] ] ]
[ add-accept-io-task [ [ port general-list ] [ ] ] ]
[ accept-fd [ [ port ] [ string integer port port ] ] ]
[ can-read-line? [ [ port ] [ boolean ] ] ]

View File

@ -44,34 +44,35 @@ presentation unparser words ;
\ parsing prettyprint-prop
\ inline prettyprint-prop ;
: prettyprint-comment ( comment -- )
"comments" style write-attr ;
: comment. ( comment -- ) "comments" style write-attr ;
: infer-effect. ( effect -- )
0 swap
" ( " prettyprint-comment
2unlist >r [ prettyprint-element ] each r>
"-- " write
[ prettyprint-element ] each
")" prettyprint-comment
drop ;
: infer-effect. ( indent effect -- indent )
" " write
[
"(" ,
2unlist >r [ " " , unparse , ] each r>
" --" ,
[ " " , unparse , ] each
" )" ,
] make-string comment. ;
: stack-effect. ( word -- )
: stack-effect. ( indent word -- indent )
dup "stack-effect" word-property [
" " write
[ CHAR: ( , , CHAR: ) , ] make-string prettyprint-comment
[ CHAR: ( , , CHAR: ) , ] make-string
comment.
] [
"infer-effect" word-property dup [
infer-effect.
] [
2drop
drop
] ifte
] ?ifte ;
: documentation. ( indent word -- indent )
"documentation" word-property [
"\n" split [
"#!" swap cat2 prettyprint-comment
"#!" swap cat2 comment.
dup prettyprint-newline
] each
] when* ;