memory word cleanups, sdl numlock fix
parent
a0c7e80835
commit
0f2d8b218b
|
@ -14,13 +14,11 @@
|
|||
- code gc
|
||||
- #jump-f #jump-f-label
|
||||
- extract word inside M:, C:, and structure browsing for these
|
||||
- references primitive
|
||||
- fix completion invoke in middle of word
|
||||
- don't hardcode so many colors
|
||||
- ffi unicode strings: null char security hole
|
||||
- utf16 string boxing
|
||||
- more accurate types for various words
|
||||
- optimize out >array, >tuple, >hashtable etc
|
||||
- write read: write should flush
|
||||
|
||||
+ compiler/ffi:
|
||||
|
|
|
@ -42,8 +42,9 @@ SYMBOL: modifiers
|
|||
[[ "ALT" HEX: 0200 ]]
|
||||
[[ "META" HEX: 0400 ]]
|
||||
[[ "META" HEX: 0800 ]]
|
||||
[[ "NUM" HEX: 1000 ]]
|
||||
[[ "CAPS" HEX: 2000 ]]
|
||||
! We ignore these two modifiers since they're mighty useless
|
||||
! [[ "NUM" HEX: 1000 ]]
|
||||
! [[ "CAPS" HEX: 2000 ]]
|
||||
[[ "MODE" HEX: 4000 ]]
|
||||
] modifiers set
|
||||
|
||||
|
|
|
@ -36,12 +36,12 @@ namespaces prettyprint stdio unparser vectors words ;
|
|||
end-scan rethrow
|
||||
] catch ; inline
|
||||
|
||||
: instances ( class -- list )
|
||||
#! Return a list of all instances of a built-in or tuple
|
||||
#! class in the image.
|
||||
: instances ( quot -- list )
|
||||
#! Return a list of all object that return true when the
|
||||
#! quotation is applied to them.
|
||||
[
|
||||
[
|
||||
dup class pick = [ , ] [ drop ] ifte
|
||||
[ swap call ] 2keep rot [ , ] [ drop ] ifte
|
||||
] each-object drop
|
||||
] make-list ;
|
||||
|
||||
|
@ -70,9 +70,7 @@ M: object (each-slot) ( quot obj -- )
|
|||
: references ( obj -- list )
|
||||
#! Return a list of all objects that refer to a given object
|
||||
#! in the image.
|
||||
[ ] [
|
||||
pick over refers? [ swons ] [ drop ] ifte
|
||||
] each-object nip ;
|
||||
[ dupd refers? ] instances nip ;
|
||||
|
||||
: vector+ ( n index vector -- )
|
||||
[ vector-nth + ] 2keep set-vector-nth ;
|
||||
|
|
Loading…
Reference in New Issue