Some more general fixes for recent refactors.

db4
John Benediktsson 2015-06-08 19:15:29 -07:00
parent 259d5f8744
commit d68175f48f
10 changed files with 17 additions and 15 deletions

View File

@ -2,7 +2,7 @@ USING: tools.test classes.mixin compiler.units arrays kernel.private
strings sequences vocabs definitions kernel ; strings sequences vocabs definitions kernel ;
IN: compiler.tests.redefine17 IN: compiler.tests.redefine17
<< "compiler.tests.redefine17" words forget-all >> << "compiler.tests.redefine17" vocab-words forget-all >>
GENERIC: bong ( a -- b ) GENERIC: bong ( a -- b )

View File

@ -53,7 +53,7 @@ SYNTAX: hello "Hi" print ;
] unit-test ] unit-test
] with-file-vocabs ] with-file-vocabs
[ "call" "scratchpad" create drop ] with-compilation-unit [ "call" "scratchpad" create-word drop ] with-compilation-unit
[ [
[ t ] [ t ]

View File

@ -1,4 +1,6 @@
IN: tools.disassembler.tests IN: tools.disassembler.tests
USING: kernel fry vocabs tools.disassembler tools.test sequences ; USING: kernel fry vocabs tools.disassembler tools.test sequences ;
"math" words [ [ [ ] ] dip '[ _ disassemble ] unit-test ] each "math" vocab-words [
[ { } ] dip '[ _ disassemble ] unit-test
] each

View File

@ -176,7 +176,7 @@ CONSTANT: standard-formats {
} }
: define-graphviz-by-layout ( layout -- ) : define-graphviz-by-layout ( layout -- )
[ "graphviz.render" create ] [ "graphviz.render" create-word ]
[ [ graphviz ] curry ] bi [ [ graphviz ] curry ] bi
( graph path format -- ) ( graph path format -- )
define-declared ; define-declared ;
@ -184,7 +184,7 @@ CONSTANT: standard-formats {
: define-graphviz-by-format ( format -- ) : define-graphviz-by-format ( format -- )
[ [
dup standard-layouts member? [ "-file" append ] when dup standard-layouts member? [ "-file" append ] when
"graphviz.render" create "graphviz.render" create-word
] ]
[ [ graphviz* ] curry ] bi [ [ graphviz* ] curry ] bi
( graph path -- ) ( graph path -- )

View File

@ -21,7 +21,7 @@ CONSTANT: elements-vocab "html.elements"
: html-word ( name def effect -- ) : html-word ( name def effect -- )
#! Define 'word creating' word to allow #! Define 'word creating' word to allow
#! dynamically creating words. #! dynamically creating words.
[ elements-vocab create ] 2dip define-declared ; [ elements-vocab create-word ] 2dip define-declared ;
: <foo> ( str -- <str> ) "<" ">" surround ; : <foo> ( str -- <str> ) "<" ">" surround ;

View File

@ -37,7 +37,7 @@ TUPLE: function name alien return params ;
: install-function ( function -- ) : install-function ( function -- )
dup name>> "alien.llvm" create-vocab drop dup name>> "alien.llvm" create-vocab drop
"alien.llvm" create swap "alien.llvm" create-word swap
[ [
dup name>> function-pointer , dup name>> function-pointer ,
dup return>> c:lookup-c-type , dup return>> c:lookup-c-type ,

View File

@ -72,7 +72,7 @@ MACRO: dual-op ( word -- )
'[ _ @ @ <dual> ] ; '[ _ @ @ <dual> ] ;
: define-dual ( word -- ) : define-dual ( word -- )
dup name>> "d" prepend "math.dual" create dup name>> "d" prepend "math.dual" create-word
[ [ stack-effect ] dip set-stack-effect ] [ [ stack-effect ] dip set-stack-effect ]
[ set-dual-help ] [ set-dual-help ]
[ swap '[ _ dual-op ] define ] [ swap '[ _ dual-op ] define ]

View File

@ -8,7 +8,7 @@ SYMBOL: classes
classes [ H{ } clone ] initialize classes [ H{ } clone ] initialize
: create-class ( class -- class ) : create-class ( class -- class )
"smalltalk.classes" create ; "smalltalk.classes" create-word ;
ERROR: no-class name ; ERROR: no-class name ;

View File

@ -21,7 +21,7 @@ SYMBOLS: unary binary keyword ;
} case "receiver" suffix { "result" } <effect> ; } case "receiver" suffix { "result" } <effect> ;
: selector>generic ( selector -- generic ) : selector>generic ( selector -- generic )
[ "selector-" prepend "smalltalk.selectors" create dup ] [ "selector-" prepend "smalltalk.selectors" create-word dup ]
[ selector>effect ] [ selector>effect ]
bi define-simple-generic ; bi define-simple-generic ;

View File

@ -1,6 +1,6 @@
USING: kernel sequences namespaces make math assocs words arrays USING: accessors arrays assocs fry io kernel make math
tools.annotations vocabs sorting prettyprint io system math.statistics namespaces prettyprint sequences sorting
math.statistics accessors tools.time fry ; tools.annotations tools.time vocabs ;
FROM: namespaces => change-global ; FROM: namespaces => change-global ;
IN: wordtimer IN: wordtimer
@ -44,10 +44,10 @@ SYMBOL: *calling*
dup '[ [ _ ] dip (add-timer) ] annotate ; dup '[ [ _ ] dip (add-timer) ] annotate ;
: add-timers ( vocab -- ) : add-timers ( vocab -- )
words [ add-timer ] each ; vocab-words [ add-timer ] each ;
: reset-vocab ( vocab -- ) : reset-vocab ( vocab -- )
words [ reset ] each ; vocab-words [ reset ] each ;
: dummy-word ( -- ) ; : dummy-word ( -- ) ;