tools.gc-decode: update vocab to match gc-map changes

db4
Björn Lindqvist 2014-08-26 20:53:58 +02:00 committed by Doug Coleman
parent 8cd2eee8e0
commit 5e1a0e212a
3 changed files with 12 additions and 10 deletions

View File

@ -16,7 +16,7 @@ HELP: decode-gc-maps
{
"Each value is a two-tuple where:"
{ $list
"The first element is a three-tuple containing the scrub patterns for the datastack, retainstack and gc roots."
"The first element is a five-tuple containing the scrub patterns for the datastack, retainstack, then the check patterns for them and gc roots."
"The second element is a sequence of derived roots for the callsite."
}
}
@ -26,7 +26,7 @@ HELP: decode-gc-maps
{ $unchecked-example
"USING: effects prettyprint ;"
"\\ <effect> decode-gc-maps ."
"{ { 151 { { ?{ t } ?{ t t t } ?{ f t t t t } } { } } } }"
"{ { 151 { { ?{ } ?{ t t t } ?{ } ?{ } ?{ f t t t t } } { } } } }"
}
} ;

View File

@ -18,7 +18,7 @@ IN: tools.gc-decode.tests
! scrub-bits
{
?{ t t t t f t t t t }
?{ t t t f t t t t }
} [
\ effects:<effect> word>gc-info scrub-bits
] unit-test
@ -32,7 +32,7 @@ IN: tools.gc-decode.tests
! decode-gc-maps
{
{
{ 151 { { ?{ t } ?{ t t t } ?{ f t t t t } } { } } }
{ 151 { { ?{ } ?{ t t t } ?{ } ?{ } ?{ f t t t t } } { } } }
}
} [
\ effects:<effect> decode-gc-maps
@ -40,9 +40,10 @@ IN: tools.gc-decode.tests
{
{
{ 82 { { ?{ t f f } ?{ t f } ?{ } } { } } }
{ 244 { { ?{ t f f } ?{ f f } ?{ } } { } } }
{ 522 { { ?{ t t f } ?{ t f } ?{ } } { } } }
{ 82 { { ?{ t f } ?{ t } ?{ f } ?{ f f } ?{ } } { } } }
{ 244 { { ?{ f f } ?{ f } ?{ f } ?{ t f } ?{ } } { } } }
{ 445 { { ?{ f f } ?{ f } ?{ t } ?{ t t } ?{ } } { } } }
{ 522 { { ?{ t t } ?{ f } ?{ f } ?{ t f } ?{ } } { } } }
}
} [
\ unix.process:fork-process decode-gc-maps
@ -55,12 +56,13 @@ IN: tools.gc-decode.tests
! base-pointer-groups
{
{
{ -1 -1 -1 -1 -1 -1 -1 }
{ -1 -1 -1 -1 -1 -1 -1 }
{ -1 -1 -1 -1 -1 -1 -1 }
{ -1 -1 -1 -1 -1 -1 5 }
{ -1 -1 -1 -1 -1 -1 5 }
{ -1 -1 -1 -1 -1 -1 -1 }
}
} [
\ llvm.types:resolve-types word>gc-info base-pointer-groups
@ -69,7 +71,7 @@ IN: tools.gc-decode.tests
! One of the few words that has derived roots.
{
S{ gc-info f 0 2 6 7 4 }
S{ gc-info f 0 2 2 2 6 7 6 }
} [
\ llvm.types:resolve-types word>gc-info
] unit-test

View File

@ -21,7 +21,7 @@ IN: tools.gc-decode
c-direct-array-constructor execute( alien len -- seq ) ;
: bit-counts ( gc-info -- counts )
struct-slot-values 3 head ;
struct-slot-values 5 head ;
: total-bitmap-bits ( gc-info -- n )
[ bit-counts sum ] [ return-address-count>> ] bi * ;