From: <rg...@us...> - 2009-06-12 06:49:30
|
Revision: 15708 http://jikesrvm.svn.sourceforge.net/jikesrvm/?rev=15708&view=rev Author: rgarner Date: 2009-06-12 06:48:58 +0000 (Fri, 12 Jun 2009) Log Message: ----------- Add stack -> nursery -> mature pointers to Lists script Modified Paths: -------------- rvmroot/trunk/MMTk/harness/test-scripts/Lists.script Modified: rvmroot/trunk/MMTk/harness/test-scripts/Lists.script =================================================================== --- rvmroot/trunk/MMTk/harness/test-scripts/Lists.script 2009-06-10 14:20:23 UTC (rev 15707) +++ rvmroot/trunk/MMTk/harness/test-scripts/Lists.script 2009-06-12 06:48:58 UTC (rev 15708) @@ -36,10 +36,16 @@ cell tail; } +/* A singly-linked list, so we can provide a chain of pointers stack -> nursery -> mature */ +type single { + single next; +} + void main() { int nLists = 15; int rotations = 10000; object lists = alloc(nLists,0,false); + single s = alloc(single); // Create the lists int i=0; @@ -64,6 +70,7 @@ if ( (j%1000) == 0 ) { lengths(lists,nLists); } + s = cons(s); j = j + 1; } } @@ -136,3 +143,13 @@ } return n; } + +/* + * Prepend a singly-linked list cell onto a list + */ +single cons(single l) { + single result = alloc(single); + result.next = l; + return result; +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |