Merge branch 'master' of git://factorcode.org/git/factor

db4
Joe Groff 2008-06-11 20:09:26 -07:00
commit 85e4a3ba17
6 changed files with 25 additions and 12 deletions

View File

@ -131,6 +131,14 @@ GENERIC: update-methods ( class seq -- )
[ drop update-map+ ] [ drop update-map+ ]
2tri ; 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 ) GENERIC: class ( object -- class )
: instance? ( obj class -- ? ) : instance? ( obj class -- ? )

View File

@ -136,17 +136,16 @@ M: method-body definer
M: method-body forget* M: method-body forget*
dup "forgotten" word-prop [ drop ] [ dup "forgotten" word-prop [ drop ] [
[ [
dup "default" word-prop [ call-next-method ] [ dup "default" word-prop [ drop ] [
dup [
[ "method-class" word-prop ] [ "method-class" word-prop ]
[ "method-generic" word-prop ] bi [ "method-generic" word-prop ] bi
3dup method eq? [ 2dup method
[ delete-at ] with-methods ] keep eq?
call-next-method [ [ delete-at ] with-methods ] [ 2drop ] if
] [ 3drop ] if
] if ] if
] ]
[ t "forgotten" set-word-prop ] bi [ call-next-method ] bi
] if ; ] if ;
M: method-body smart-usage M: method-body smart-usage
@ -169,7 +168,7 @@ M: sequence implementors
: forget-class ( class -- ) : forget-class ( class -- )
class-usages [ class-usages [
{ {
[ "predicate" word-prop [ forget ] each ] [ forget-predicate ]
[ forget-methods ] [ forget-methods ]
[ update-map- ] [ update-map- ]
[ reset-class ] [ reset-class ]

View File

@ -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

View File

@ -44,6 +44,7 @@ uses definitions ;
\ source-file construct ; \ source-file construct ;
: source-file ( path -- source-file ) : source-file ( path -- source-file )
dup string? [ "Invalid source file path" throw ] unless
source-files get [ <source-file> ] cache ; source-files get [ <source-file> ] cache ;
: reset-checksums ( -- ) : reset-checksums ( -- )

View File

@ -12,7 +12,7 @@ IN: ui.x11
SINGLETON: x11-ui-backend 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 ; TUPLE: x11-handle window glx xic ;

View File

@ -1257,8 +1257,8 @@ FUNCTION: Status XSetStandardProperties (
FUNCTION: void XFree ( void* data ) ; FUNCTION: void XFree ( void* data ) ;
FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ; FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ;
FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ; FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ;
FUNCTION: int XBell ( Display* display, int percent ) ;
! !!! INPUT METHODS ! !!! INPUT METHODS