1 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel namespaces assocs io.files io.encodings.utf8
4 prettyprint help.lint benchmark tools.time bootstrap.stage2
5 tools.test tools.vocabs help.html mason.common words generic
6 accessors compiler.errors sequences sets sorting math ;
11 [ keys load-everything-vocabs-file to-file ]
12 [ load-everything-errors-file utf8 [ load-failures. ] with-file-writer ]
15 GENERIC: word-vocabulary ( word -- vocabulary )
17 M: word word-vocabulary vocabulary>> ;
19 M: method-body word-vocabulary "method-generic" word-prop word-vocabulary ;
21 : do-compile-errors ( -- )
22 compiler-errors-file utf8 [
23 +error+ errors-of-type keys
24 [ word-vocabulary ] map
30 [ keys test-all-vocabs-file to-file ]
31 [ test-all-errors-file utf8 [ test-failures. ] with-file-writer ]
36 [ keys help-lint-vocabs-file to-file ]
37 [ help-lint-errors-file utf8 [ typos. ] with-file-writer ]
40 : do-benchmarks ( -- )
41 run-benchmarks benchmarks-file to-file ;
43 : benchmark-ms ( quot -- ms )
44 benchmark 1000 /i ; inline
48 bootstrap-time get boot-time-file to-file
49 [ do-load do-compile-errors ] benchmark-ms load-time-file to-file
50 [ generate-help ] benchmark-ms html-help-time-file to-file
51 [ do-tests ] benchmark-ms test-time-file to-file
52 [ do-help-lint ] benchmark-ms help-lint-time-file to-file
53 [ do-benchmarks ] benchmark-ms benchmark-time-file to-file