: strip-word-props ( stripped-props words -- )
"Stripping word properties" show
- [
- swap '[
- [
- [ drop _ member? not ] assoc-filter sift-assoc
- >alist f like
- ] change-props drop
- ] each
- ] [
- H{ } clone '[
- [ [ _ [ ] cache ] map ] change-props drop
- ] each
- ] bi ;
+ swap '[
+ [
+ [ drop _ member? not ] assoc-filter sift-assoc
+ >alist f like
+ ] change-props drop
+ ] each ;
: stripped-word-props ( -- seq )
[
[ cache>> ] [ blocks>> ] bi
'[ _ nth-unsafe <code-block> ] cache ; inline
-M: code-blocks hashcode* 2drop 0 ;
-
INSTANCE: code-blocks immutable-sequence
: code-blocks ( -- blocks )
[ (( x y z -- * )) ] [ \ derived-error stack-effect ] unit-test
-USE: classes.struct
-
-[ { } ] [
- classes
- [ "prototype" word-prop ] map
- [ '[ _ hashcode drop f ] [ drop t ] recover ] filter
-] unit-test
-
! Make sure that tuple reshaping updates code heap roots
TUPLE: code-heap-ref ;