1 ! Copyright (C) 2007, 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel kernel.private sequences math namespaces
4 init splitting assocs system.private layouts words ;
7 SINGLETONS: x86.32 x86.64 arm ppc.32 ppc.64 ;
9 UNION: x86 x86.32 x86.64 ;
10 UNION: ppc ppc.32 ppc.64 ;
12 : cpu ( -- class ) \ cpu get-global ; foldable
14 SINGLETONS: windows macosx linux ;
16 UNION: unix macosx linux ;
18 : os ( -- class ) \ os get-global ; foldable
20 : vm-compiler ( -- string ) \ vm-compiler get-global ; foldable
24 : string>cpu ( str -- class )
33 : string>os ( str -- class )
42 : image ( -- path ) \ image get-global ;
44 : vm ( -- path ) \ vm get-global ;
46 : embedded? ( -- ? ) OBJ-EMBEDDED special-object ;
48 : exit ( n -- * ) do-shutdown-hooks (exit) ;