system: these words can't be foldable

Because they will return new values if you update the VM.
locals-and-roots
Björn Lindqvist 2016-03-16 16:18:23 +01:00
parent db9093dd5c
commit 41d9bda3ce
2 changed files with 14 additions and 7 deletions

View File

@ -0,0 +1,7 @@
USING: arrays sequences system tools.test ;
IN: system.tests
{ { t t t } } [
vm-version vm-compiler vm-compile-time 3array
[ version-info subseq? ] map
] unit-test

View File

@ -20,20 +20,20 @@ UNION: unix macosx linux ;
: os ( -- class ) \ os get-global ; foldable
: vm-version ( -- string ) \ vm-version get-global ; foldable
: vm-version ( -- string ) \ vm-version get-global ;
: vm-git-label ( -- string ) \ vm-git-label get-global ; foldable
: vm-git-label ( -- string ) \ vm-git-label get-global ;
: split-vm-git-label ( -- ref git-id )
vm-git-label "-" split1-last ; foldable
vm-git-label "-" split1-last ;
: vm-git-ref ( -- string ) split-vm-git-label drop ; foldable
: vm-git-ref ( -- string ) split-vm-git-label drop ;
: vm-git-id ( -- string ) split-vm-git-label nip ; foldable
: vm-git-id ( -- string ) split-vm-git-label nip ;
: vm-compiler ( -- string ) \ vm-compiler get-global ; foldable
: vm-compiler ( -- string ) \ vm-compiler get-global ;
: vm-compile-time ( -- string ) \ vm-compile-time get-global ; foldable
: vm-compile-time ( -- string ) \ vm-compile-time get-global ;
<PRIVATE