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
16 SINGLETONS: freebsd netbsd openbsd solaris macosx linux ;
20 UNION: bsd freebsd netbsd openbsd macosx ;
22 UNION: unix bsd solaris linux haiku ;
24 : os ( -- class ) \ os get-global ; foldable
26 : vm-compiler ( -- string ) \ vm-compiler get-global ; foldable
30 : string>cpu ( str -- class )
39 : string>os ( str -- class )
53 : image ( -- path ) \ image get-global ;
55 : vm ( -- path ) \ vm get-global ;
57 : embedded? ( -- ? ) 15 special-object ;
59 : exit ( n -- * ) do-shutdown-hooks (exit) ;