1 ! Copyright (C) 2006, 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors assocs kernel namespaces sequences sets ;
8 ERROR: no-compilation-unit definition ;
10 : add-to-unit ( key set -- )
11 [ adjoin ] [ no-compilation-unit ] if* ;
13 SYMBOL: changed-definitions
15 : changed-definition ( defspec -- )
16 changed-definitions get add-to-unit ;
20 : changed-conditionally ( class -- )
21 maybe-changed get add-to-unit ;
23 SYMBOL: changed-effects
25 SYMBOL: outdated-generics
29 : new-word ( word -- )
30 new-words get add-to-unit ;
32 : new-word? ( word -- ? )
35 GENERIC: where ( defspec -- loc )
37 M: object where drop f ;
39 GENERIC: set-where ( loc defspec -- )
41 GENERIC: forget* ( defspec -- )
43 SYMBOL: forgotten-definitions
45 : forgotten-definition ( defspec -- )
46 forgotten-definitions get add-to-unit ;
48 : forget ( defspec -- ) [ forgotten-definition ] [ forget* ] bi ;
52 M: wrapper forget* wrapped>> forget ;
54 : forget-all ( definitions -- ) [ forget ] each ;
56 GENERIC: definer ( defspec -- start end )
58 GENERIC: definition ( defspec -- seq )