]> gitweb.factorcode.org Git - factor.git/commitdiff
Updating lots of things to use call( -- )
authorDaniel Ehrenberg <littledan@Macintosh-103.local>
Mon, 9 Feb 2009 04:12:11 +0000 (22:12 -0600)
committerDaniel Ehrenberg <littledan@Macintosh-103.local>
Mon, 9 Feb 2009 04:12:11 +0000 (22:12 -0600)
basis/alien/c-types/c-types.factor
basis/cocoa/messages/messages.factor
basis/compiler/tree/propagation/inlining/inlining.factor
basis/help/lint/lint.factor
basis/html/templates/chloe/chloe.factor
basis/html/templates/chloe/compiler/compiler.factor
basis/html/templates/fhtml/fhtml.factor
basis/ui/tools/interactor/interactor.factor
basis/ui/ui.factor

index cf5daa1562c0fc95b5ea39152ac9cfad55160324..89b3572daf56258fb88b3e2b9fcfa4120df48313 100644 (file)
@@ -4,7 +4,7 @@ USING: byte-arrays arrays assocs kernel kernel.private libc math
 namespaces make parser sequences strings words assocs splitting
 math.parser cpu.architecture alien alien.accessors quotations
 layouts system compiler.units io.files io.encodings.binary
-accessors combinators effects continuations fry ;
+accessors combinators effects continuations fry call ;
 IN: alien.c-types
 
 DEFER: <int>
@@ -258,7 +258,7 @@ M: long-long-type box-return ( type -- )
         unclip [
             [
                 dup word? [
-                    def>> { } swap with-datastack first
+                    def>> call( -- object )
                 ] when
             ] map
         ] dip prefix
index a0b0e89a0d97952070d2748f54d2e7da3b4cb01b..60bdde262cb93d4a464853369c56590b58db72b0 100644 (file)
@@ -5,7 +5,7 @@ continuations combinators compiler compiler.alien kernel math
 namespaces make parser quotations sequences strings words
 cocoa.runtime io macros memoize io.encodings.utf8
 effects libc libc.private parser lexer init core-foundation fry
-generalizations specialized-arrays.direct.alien ;
+generalizations specialized-arrays.direct.alien call ;
 IN: cocoa.messages
 
 : make-sender ( method function -- quot )
@@ -83,7 +83,7 @@ class-init-hooks global [ H{ } clone or ] change-at
 
 : (objc-class) ( name word -- class )
     2dup execute dup [ 2nip ] [
-        drop over class-init-hooks get at [ assert-depth ] when*
+        drop over class-init-hooks get at [ call( -- ) ] when*
         2dup execute dup [ 2nip ] [
             2drop "No such class: " prepend throw
         ] if
index f3b3238b4e72bb7080a51d48749ef0a8244d4f06..06d8d4f73314f588ef3c9c456b3031f4d81113b5 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel arrays sequences math math.order
+USING: accessors kernel arrays sequences math math.order call
 math.partial-dispatch generic generic.standard generic.math
 classes.algebra classes.union sets quotations assocs combinators
 words namespaces continuations classes fry combinators.smart
@@ -181,8 +181,9 @@ SYMBOL: history
     "custom-inlining" word-prop ;
 
 : inline-custom ( #call word -- ? )
-    [ dup 1array ] [ "custom-inlining" word-prop ] bi* with-datastack
-    first object swap eliminate-dispatch ;
+    [ dup ] [ "custom-inlining" word-prop ] bi*
+    call( #call -- word/quot/f )
+    object swap eliminate-dispatch ;
 
 : inline-instance-check ( #call word -- ? )
     over in-d>> second value-info literal>> dup class?
index b5f8b78ea325ae1d321d1a86d47ea6fe22b7d8ae..57f64459c86c3362397ef78d6c656b2729dc7378 100755 (executable)
@@ -7,7 +7,7 @@ combinators combinators.short-circuit splitting debugger
 hashtables sorting effects vocabs vocabs.loader assocs editors
 continuations classes.predicate macros math sets eval
 vocabs.parser words.symbol values grouping unicode.categories
-sequences.deep ;
+sequences.deep call ;
 IN: help.lint
 
 SYMBOL: vocabs-quot
@@ -15,9 +15,9 @@ SYMBOL: vocabs-quot
 : check-example ( element -- )
     [
         rest [
-            but-last "\n" join 1vector
-            [ (eval>string) ] with-datastack
-            peek "\n" ?tail drop
+            but-last "\n" join
+            [ (eval>string) ] call( code -- output )
+            "\n" ?tail drop
         ] keep
         peek assert=
     ] vocabs-quot get call ;
@@ -145,7 +145,7 @@ M: help-error error.
     bi ;
 
 : check-something ( obj quot -- )
-    flush '[ _ assert-depth ] swap '[ _ <help-error> , ] recover ; inline
+    flush '[ _ call( -- ) ] swap '[ _ <help-error> , ] recover ; inline
 
 : check-word ( word -- )
     [ with-file-vocabs ] vocabs-quot set
index 89d00e1f6ea1e684336f60a823becff19063325e..eafa3c3a5d5b734c2ae0d2b538cc83355198a7c3 100644 (file)
@@ -4,7 +4,7 @@ USING: accessors kernel sequences combinators kernel fry
 namespaces make classes.tuple assocs splitting words arrays io
 io.files io.files.info io.encodings.utf8 io.streams.string
 unicode.case mirrors math urls present multiline quotations xml
-logging continuations
+logging call
 xml.data xml.writer xml.syntax strings
 html.forms
 html
@@ -130,6 +130,6 @@ TUPLE: cached-template path last-modified quot ;
     template-cache get clear-assoc ;
 
 M: chloe call-template*
-    template-quot assert-depth ;
+    template-quot call( -- ) ;
 
 INSTANCE: chloe template
index 394b5ef3594d13443cf53a3e6a0f00fd0764eadd..1a1abc9f7b6e227b18466d071dedbf236c7e769c 100644 (file)
@@ -2,8 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: assocs namespaces make kernel sequences accessors
 combinators strings splitting io io.streams.string present
-xml.writer xml.data xml.entities html.forms
-html.templates html.templates.chloe.syntax continuations ;
+xml.writer xml.data xml.entities html.forms call
+html.templates html.templates.chloe.syntax ;
 IN: html.templates.chloe.compiler
 
 : chloe-attrs-only ( assoc -- assoc' )
@@ -83,7 +83,7 @@ ERROR: unknown-chloe-tag tag ;
 
 : compile-chloe-tag ( tag -- )
     dup main>> dup tags get at
-    [ curry assert-depth ]
+    [ curry call( -- ) ]
     [ unknown-chloe-tag ]
     ?if ;
 
index c419c4a1973835875e3cfc4177faf2a49748ec91..e76a812bef0e6188b0f6576abfd919f0d9643247 100644 (file)
@@ -3,7 +3,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: continuations sequences kernel namespaces debugger
 combinators math quotations generic strings splitting accessors
-assocs fry vocabs.parser parser lexer io io.files
+assocs fry vocabs.parser parser lexer io io.files call
 io.streams.string io.encodings.utf8 html.templates ;
 IN: html.templates.fhtml
 
@@ -72,6 +72,6 @@ TUPLE: fhtml path ;
 C: <fhtml> fhtml
 
 M: fhtml call-template* ( filename -- )
-    '[ _ path>> utf8 file-contents eval-template ] assert-depth ;
+    '[ _ path>> utf8 file-contents eval-template ] call( -- ) ;
 
 INSTANCE: fhtml template
index 40da6ebafc7bb185fdd3404d828e8f116e9e042d..eb2eef374232497ad450d7e24afa0052b6f93551 100644 (file)
@@ -5,7 +5,7 @@ hashtables io io.styles kernel math math.order math.vectors
 models models.delay namespaces parser lexer prettyprint
 quotations sequences strings threads listener classes.tuple
 ui.commands ui.gadgets ui.gadgets.editors ui.gadgets.status-bar
-ui.gadgets.presentations ui.gadgets.worlds ui.gestures
+ui.gadgets.presentations ui.gadgets.worlds ui.gestures call
 definitions calendar concurrency.flags concurrency.mailboxes
 ui.tools.workspace accessors sets destructors fry vocabs.parser ;
 IN: ui.tools.interactor
@@ -82,8 +82,7 @@ M: interactor model-changed
     mailbox>> mailbox-put ;
 
 : clear-input ( interactor -- )
-    #! The with-datastack is a kludge to make it infer. Stupid.
-    model>> 1array [ clear-doc ] with-datastack drop ;
+    model>> [ clear-doc ] call( model -- ) ;
 
 : interactor-finish ( interactor -- )
     [ editor-string ] keep
index 37ce4ea499316e04f091fc457d7acfe17ca5dcfa..78f150987f259f1c9c63937fde38c6142f607e1b 100644 (file)
@@ -4,7 +4,7 @@ USING: arrays assocs io kernel math models namespaces make
 dlists deques sequences threads sequences words ui.gadgets
 ui.gadgets.worlds ui.gadgets.tracks ui.gestures ui.backend
 ui.render continuations init combinators hashtables
-concurrency.flags sets accessors calendar ;
+concurrency.flags sets accessors calendar call ;
 IN: ui
 
 ! Assoc mapping aliens to gadgets
@@ -140,7 +140,7 @@ SYMBOL: ui-hook
             layout-queued
             redraw-worlds
             send-queued-gestures
-        ] assert-depth
+        ] call( -- )
     ] [ ui-error ] recover ;
 
 SYMBOL: ui-thread