1 ! Copyright (C) 2004, 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: continuations continuations.private kernel
4 kernel.private sequences assocs namespaces namespaces.private ;
9 init-hooks global [ drop V{ } clone ] cache drop
11 : do-init-hooks ( -- )
12 init-hooks get [ nip call ] assoc-each ;
14 : add-init-hook ( quot name -- )
15 dup init-hooks get at [ over call ] unless
16 init-hooks get set-at ;
18 : boot ( -- ) init-namespaces init-catchstack init-error-handler ;
20 : boot-quot ( -- quot ) 20 getenv ;
22 : set-boot-quot ( quot -- ) 20 setenv ;