Updating lots of things to use call( -- )
							parent
							
								
									25dc79d0e8
								
							
						
					
					
						commit
						b65b88364c
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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?
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 ;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue