]> gitweb.factorcode.org Git - factor.git/commitdiff
Some VM fixes
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 4 May 2009 20:11:31 +0000 (15:11 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 4 May 2009 20:11:31 +0000 (15:11 -0500)
vm/code_block.cpp
vm/strings.cpp

index 5ebb162f7e26c299849f6be181e5b7da5b84d6a2..4694381ed38b13866bf22470bb327671428974f5 100644 (file)
@@ -218,10 +218,7 @@ void update_word_references(code_block *compiled)
           the code heap with dead PICs that will be freed on the next
           GC, we add them to the free list immediately. */
        else if(compiled->block.type == PIC_TYPE)
-       {
-               fflush(stdout);
                heap_free(&code,&compiled->block);
-       }
        else
        {
                iterate_relocations(compiled,update_word_references_step);
index c00c17bc45ec25c6e4640fae2a93a560fab1381f..c70d9dfb6d156f8cee84b8ea5188b143781c9983 100644 (file)
@@ -108,7 +108,9 @@ PRIMITIVE(string)
 
 static bool reallot_string_in_place_p(string *str, cell capacity)
 {
-       return in_zone(&nursery,str) && capacity <= string_capacity(str);
+       return in_zone(&nursery,str)
+               && (str->aux == F || in_zone(&nursery,untag<byte_array>(str->aux)))
+               && capacity <= string_capacity(str);
 }
 
 string* reallot_string(string *str_, cell capacity)