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: winnt wince ;
16 UNION: windows winnt wince ;
18 SINGLETONS: freebsd netbsd openbsd solaris macosx linux ;
22 UNION: bsd freebsd netbsd openbsd macosx ;
24 UNION: unix bsd solaris linux haiku ;
26 : os ( -- class ) \ os get-global ; foldable
28 : vm-compiler ( -- string ) \ vm-compiler get-global ; foldable
32 : string>cpu ( str -- class )
41 : string>os ( str -- class )
56 : image ( -- path ) \ image get-global ;
58 : vm ( -- path ) \ vm get-global ;
60 : embedded? ( -- ? ) 15 special-object ;
62 : exit ( n -- * ) do-shutdown-hooks (exit) ;