<commit_before>! Copyright (C) 2006, 2009 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences namespaces assocs math ;
IN: definitions

MIXIN: definition

ERROR: no-compilation-unit definition ;

SYMBOLS: inlined-dependency flushed-dependency called-dependency ;

: set-in-unit ( value key assoc -- )
    [ set-at ] [ no-compilation-unit ] if* ;

SYMBOL: changed-definitions

: changed-definition ( defspec -- )
    inlined-dependency swap changed-definitions get set-in-unit ;

SYMBOL: changed-effects

SYMBOL: changed-generics

SYMBOL: outdated-generics

SYMBOL: new-classes

: new-class ( word -- )
    dup new-classes get set-in-unit ;

: new-class? ( word -- ? )
    new-classes get key? ;

GENERIC: where ( defspec -- loc )

M: object where drop f ;

GENERIC: set-where ( loc defspec -- )

GENERIC: forget* ( defspec -- )

M: f forget* drop ;

SYMBOL: forgotten-definitions

: forgotten-definition ( defspec -- )
    dup forgotten-definitions get set-in-unit ;

: forget ( defspec -- ) [ forgotten-definition ] [ forget* ] bi ;

: forget-all ( definitions -- ) [ forget ] each ;

GENERIC: definer ( defspec -- start end )

GENERIC: definition ( defspec -- seq )<commit_msg>Make FORGET: M\ ... work<commit_after>! Copyright (C) 2006, 2009 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences namespaces assocs math accessors ;
IN: definitions

MIXIN: definition

ERROR: no-compilation-unit definition ;

SYMBOLS: inlined-dependency flushed-dependency called-dependency ;

: set-in-unit ( value key assoc -- )
    [ set-at ] [ no-compilation-unit ] if* ;

SYMBOL: changed-definitions

: changed-definition ( defspec -- )
    inlined-dependency swap changed-definitions get set-in-unit ;

SYMBOL: changed-effects

SYMBOL: changed-generics

SYMBOL: outdated-generics

SYMBOL: new-classes

: new-class ( word -- )
    dup new-classes get set-in-unit ;

: new-class? ( word -- ? )
    new-classes get key? ;

GENERIC: where ( defspec -- loc )

M: object where drop f ;

GENERIC: set-where ( loc defspec -- )

GENERIC: forget* ( defspec -- )

M: f forget* drop ;

M: wrapper forget* wrapped>> forget* ;

SYMBOL: forgotten-definitions

: forgotten-definition ( defspec -- )
    dup forgotten-definitions get set-in-unit ;

: forget ( defspec -- ) [ forgotten-definition ] [ forget* ] bi ;

: forget-all ( definitions -- ) [ forget ] each ;

GENERIC: definer ( defspec -- start end )

GENERIC: definition ( defspec -- seq )
{'fraction_non_alphanumeric': 0.12795828319294023, 'fraction_numerical': 0.006417970316887284, 'mean_word_length': 3.2778730703259007, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3812737', 'n_tokens_mistral': 816, 'n_tokens_neox': 781, 'n_words': 227}