Merge branch 'master' of git://factorcode.org/git/factor
commit
85e4a3ba17
|
@ -131,6 +131,14 @@ GENERIC: update-methods ( class seq -- )
|
|||
[ drop update-map+ ]
|
||||
2tri ;
|
||||
|
||||
: forget-predicate ( class -- )
|
||||
dup "predicate" word-prop
|
||||
dup length 1 = [
|
||||
first
|
||||
tuck "predicating" word-prop =
|
||||
[ forget ] [ drop ] if
|
||||
] [ 2drop ] if ;
|
||||
|
||||
GENERIC: class ( object -- class )
|
||||
|
||||
: instance? ( obj class -- ? )
|
||||
|
|
|
@ -136,17 +136,16 @@ M: method-body definer
|
|||
M: method-body forget*
|
||||
dup "forgotten" word-prop [ drop ] [
|
||||
[
|
||||
dup "default" word-prop [ call-next-method ] [
|
||||
dup
|
||||
[ "method-class" word-prop ]
|
||||
[ "method-generic" word-prop ] bi
|
||||
3dup method eq? [
|
||||
[ delete-at ] with-methods
|
||||
call-next-method
|
||||
] [ 3drop ] if
|
||||
dup "default" word-prop [ drop ] [
|
||||
[
|
||||
[ "method-class" word-prop ]
|
||||
[ "method-generic" word-prop ] bi
|
||||
2dup method
|
||||
] keep eq?
|
||||
[ [ delete-at ] with-methods ] [ 2drop ] if
|
||||
] if
|
||||
]
|
||||
[ t "forgotten" set-word-prop ] bi
|
||||
[ call-next-method ] bi
|
||||
] if ;
|
||||
|
||||
M: method-body smart-usage
|
||||
|
@ -169,7 +168,7 @@ M: sequence implementors
|
|||
: forget-class ( class -- )
|
||||
class-usages [
|
||||
{
|
||||
[ "predicate" word-prop [ forget ] each ]
|
||||
[ forget-predicate ]
|
||||
[ forget-methods ]
|
||||
[ update-map- ]
|
||||
[ reset-class ]
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
IN: source-files.tests
|
||||
USING: source-files tools.test assocs sequences strings
|
||||
namespaces kernel ;
|
||||
|
||||
[ { } ] [ source-files get keys [ string? not ] filter ] unit-test
|
|
@ -44,6 +44,7 @@ uses definitions ;
|
|||
\ source-file construct ;
|
||||
|
||||
: source-file ( path -- source-file )
|
||||
dup string? [ "Invalid source file path" throw ] unless
|
||||
source-files get [ <source-file> ] cache ;
|
||||
|
||||
: reset-checksums ( -- )
|
||||
|
|
|
@ -12,7 +12,7 @@ IN: ui.x11
|
|||
|
||||
SINGLETON: x11-ui-backend
|
||||
|
||||
: XA_NET_WM_NAME "_NET_WM_NAME" x-atom ;
|
||||
: XA_NET_WM_NAME ( -- atom ) "_NET_WM_NAME" x-atom ;
|
||||
|
||||
TUPLE: x11-handle window glx xic ;
|
||||
|
||||
|
|
|
@ -1257,8 +1257,8 @@ FUNCTION: Status XSetStandardProperties (
|
|||
|
||||
FUNCTION: void XFree ( void* data ) ;
|
||||
FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ;
|
||||
|
||||
FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
|
||||
FUNCTION: int XBell ( Display* display, int percent ) ;
|
||||
|
||||
! !!! INPUT METHODS
|
||||
|
||||
|
|
Loading…
Reference in New Issue