1 ! Copyright (C) 2006, 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors assocs kernel namespaces sequences ;
8 ERROR: no-compilation-unit definition ;
10 : set-in-unit ( value key assoc -- )
11 [ set-at ] [ no-compilation-unit ] if* ;
13 SYMBOL: changed-definitions
15 : changed-definition ( defspec -- )
16 dup changed-definitions get set-in-unit ;
20 : changed-conditionally ( class -- )
21 dup maybe-changed get set-in-unit ;
23 SYMBOL: changed-effects
25 SYMBOL: outdated-generics
29 : new-word ( word -- )
30 dup new-words get set-in-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 dup forgotten-definitions get set-in-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 )