Merge branch 'master' of git://factorcode.org/git/factor

db4
Joe Groff 2009-02-10 16:39:45 -06:00
commit 77ee6abe27
19 changed files with 30 additions and 32 deletions

View File

@ -29,7 +29,7 @@ SYMBOL: super-sent-messages
SYMBOL: frameworks
frameworks global [ V{ } clone or ] change-at
frameworks [ V{ } clone ] initialize
[ frameworks get [ load-framework ] each ] "cocoa.messages" add-init-hook

View File

@ -19,8 +19,8 @@ IN: cocoa.messages
SYMBOL: message-senders
SYMBOL: super-message-senders
message-senders global [ H{ } assoc-like ] change-at
super-message-senders global [ H{ } assoc-like ] change-at
message-senders [ H{ } clone ] initialize
super-message-senders [ H{ } clone ] initialize
: cache-stub ( method function hash -- )
[
@ -53,7 +53,7 @@ MEMO: <selector> ( name -- sel ) f \ selector boa ;
SYMBOL: objc-methods
objc-methods global [ H{ } assoc-like ] change-at
objc-methods [ H{ } clone ] initialize
: lookup-method ( selector -- method )
dup objc-methods get at
@ -79,7 +79,7 @@ MACRO: (send) ( selector super? -- quot )
! Runtime introspection
SYMBOL: class-init-hooks
class-init-hooks global [ H{ } clone or ] change-at
class-init-hooks [ H{ } clone or ] initialize
: (objc-class) ( name word -- class )
2dup execute dup [ 2nip ] [

View File

@ -24,4 +24,4 @@ IN: compiler.utilities
SYMBOL: yield-hook
yield-hook global [ [ ] or ] change-at
yield-hook [ [ ] ] initialize

View File

@ -85,4 +85,4 @@ PRIVATE>
: get-process ( name -- process )
dup registered-processes at [ ] [ thread ] ?if ;
\ registered-processes global [ H{ } assoc-like ] change-at
\ registered-processes [ H{ } clone ] initialize

View File

@ -118,7 +118,7 @@ M: word set-article-parent swap "help-parent" set-word-prop ;
SYMBOL: help-hook
help-hook global [ [ print-topic ] or ] change-at
help-hook [ [ print-topic ] ] initialize
: help ( topic -- )
help-hook get call ;

View File

@ -27,11 +27,11 @@ M: link summary
! Help articles
SYMBOL: articles
articles global [ H{ } assoc-like ] change-at
articles [ H{ } clone ] initialize
SYMBOL: article-xref
article-xref global [ H{ } assoc-like ] change-at
article-xref [ H{ } clone ] initialize
GENERIC: article-name ( topic -- string )
GENERIC: article-title ( topic -- string )

View File

@ -11,7 +11,7 @@ html.templates ;
SYMBOL: tags
tags global [ H{ } clone or ] change-at
tags [ H{ } clone ] initialize
: define-chloe-tag ( name quot -- ) swap tags get set-at ;

View File

@ -161,7 +161,7 @@ C: <trivial-responder> trivial-responder
M: trivial-responder call-responder* nip response>> clone ;
main-responder global [ <404> <trivial-responder> or ] change-at
main-responder [ <404> <trivial-responder> ] initialize
: invert-slice ( slice -- slice' )
dup slice? [ [ seq>> ] [ from>> ] bi head-slice ] [ drop { } ] if ;

View File

@ -47,8 +47,8 @@ PRIVATE>
"resource:basis/io/encodings/iana/character-sets"
utf8 <file-reader> make-aliases aliases set-global
n>e-table global [ initial-n>e or ] change-at
e>n-table global [ initial-e>n or ] change-at
n>e-table [ initial-n>e ] initialize
e>n-table [ initial-e>n ] initialize
: register-encoding ( descriptor name -- )
[

View File

@ -87,7 +87,7 @@ M: word annotate-methods
SYMBOL: word-timing
word-timing global [ H{ } clone or ] change-at
word-timing [ H{ } clone ] initialize
: reset-word-timing ( -- )
word-timing get clear-assoc ;

View File

@ -141,9 +141,9 @@ CLASS: {
SYMBOL: cocoa-init-hook
cocoa-init-hook global [
[ "MiniFactor.nib" load-nib install-app-delegate ] or
] change-at
cocoa-init-hook [
[ "MiniFactor.nib" load-nib install-app-delegate ]
] initialize
M: cocoa-ui-backend ui
"UI" assert.app [

View File

@ -81,7 +81,7 @@ SYMBOL: ui-error-hook
: ui-error ( error -- )
ui-error-hook get [ call ] [ die ] if* ;
ui-error-hook global [ [ rethrow ] or ] change-at
ui-error-hook [ [ rethrow ] ] initialize
: draw-world ( world -- )
dup draw-world? [

View File

@ -51,7 +51,7 @@ M: alien equal?
SYMBOL: libraries
libraries global [ H{ } assoc-like ] change-at
libraries [ H{ } clone ] initialize
TUPLE: library path abi dll ;

View File

@ -178,6 +178,4 @@ SYMBOL: remake-generics-hook
: default-recompile-hook ( words -- alist )
[ f ] { } map>assoc ;
recompile-hook global
[ [ default-recompile-hook ] or ]
change-at
recompile-hook [ [ default-recompile-hook ] ] initialize

View File

@ -8,7 +8,7 @@ SYMBOL: io-backend
SINGLETON: c-io-backend
io-backend global [ c-io-backend or ] change-at
io-backend [ c-io-backend ] initialize
HOOK: init-io io-backend ( -- )

View File

@ -200,7 +200,7 @@ SYMBOL: interactive-vocabs
SYMBOL: print-use-hook
print-use-hook global [ [ ] or ] change-at
print-use-hook [ [ ] ] initialize
: parse-fresh ( lines -- quot )
[

View File

@ -22,9 +22,9 @@ ERROR: bad-escape ;
SYMBOL: name>char-hook
name>char-hook global [
[ "Unicode support not available" throw ] or
] change-at
name>char-hook [
[ "Unicode support not available" throw ]
] initialize
: unicode-escape ( str -- ch str' )
"{" ?head-slice [

View File

@ -96,11 +96,11 @@ M: word uses ( word -- seq )
SYMBOL: compiled-crossref
compiled-crossref global [ H{ } assoc-like ] change-at
compiled-crossref [ H{ } clone ] initialize
SYMBOL: compiled-generic-crossref
compiled-generic-crossref global [ H{ } assoc-like ] change-at
compiled-generic-crossref [ H{ } clone ] initialize
: (compiled-xref) ( word dependencies word-prop variable -- )
[ [ set-word-prop ] curry ]

View File

@ -81,7 +81,7 @@ SYMBOL: upload-directory
! Optional: override ssh and scp command names
SYMBOL: scp-command
scp-command global [ "scp" or ] change-at
scp-command [ "scp" ] initialize
SYMBOL: ssh-command
ssh-command global [ "ssh" or ] change-at
ssh-command [ "ssh" ] initialize