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