1 ! Copyright (C) 2007, 2009 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 ;
9 UNION: x86 x86.32 x86.64 ;
11 : cpu ( -- class ) \ cpu get-global ; foldable
13 SINGLETONS: winnt wince ;
15 UNION: windows winnt wince ;
17 SINGLETONS: freebsd netbsd openbsd solaris macosx linux ;
21 UNION: bsd freebsd netbsd openbsd macosx ;
23 UNION: unix bsd solaris linux haiku ;
25 : os ( -- class ) \ os get-global ; foldable
29 : string>cpu ( str -- class )
37 : string>os ( str -- class )
52 : image ( -- path ) \ image get-global ;
54 : vm ( -- path ) \ vm get-global ;
56 : embedded? ( -- ? ) 15 getenv ;
58 : millis ( -- ms ) micros 1000 /i ;