]> gitweb.factorcode.org Git - factor.git/commitdiff
removed global functions from strings.cpp
authorPhil Dawes <phil@phildawes.net>
Mon, 17 Aug 2009 20:37:17 +0000 (21:37 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:16:27 +0000 (08:16 +0100)
vm/strings.cpp
vm/strings.hpp

index a8962ee921d31b299898b39dad26e2848a853e72..82db8430ebd93875a655850dd899947c4ebe17d9 100644 (file)
@@ -22,20 +22,12 @@ cell factorvm::string_nth(string* str, cell index)
        }
 }
 
-cell string_nth(string* str, cell index)
-{
-       return vm->string_nth(str,index);
-}
 
 void factorvm::set_string_nth_fast(string *str, cell index, cell ch)
 {
        str->data()[index] = ch;
 }
 
-void set_string_nth_fast(string *str, cell index, cell ch)
-{
-       return vm->set_string_nth_fast(str,index,ch);
-}
 
 void factorvm::set_string_nth_slow(string *str_, cell index, cell ch)
 {
@@ -64,10 +56,6 @@ void factorvm::set_string_nth_slow(string *str_, cell index, cell ch)
        aux->data<u16>()[index] = ((ch >> 7) ^ 1);
 }
 
-void set_string_nth_slow(string *str_, cell index, cell ch)
-{
-       return vm->set_string_nth_slow(str_,index,ch);
-}
 
 /* allocates memory */
 void factorvm::set_string_nth(string *str, cell index, cell ch)
@@ -78,10 +66,6 @@ void factorvm::set_string_nth(string *str, cell index, cell ch)
                set_string_nth_slow(str,index,ch);
 }
 
-void set_string_nth(string *str, cell index, cell ch)
-{
-       return vm->set_string_nth(str,index,ch);
-}
 
 /* Allocates memory */
 string *factorvm::allot_string_internal(cell capacity)
@@ -95,10 +79,6 @@ string *factorvm::allot_string_internal(cell capacity)
        return str;
 }
 
-string *allot_string_internal(cell capacity)
-{
-       return vm->allot_string_internal(capacity);
-}
 
 /* Allocates memory */
 void factorvm::fill_string(string *str_, cell start, cell capacity, cell fill)
@@ -116,10 +96,6 @@ void factorvm::fill_string(string *str_, cell start, cell capacity, cell fill)
        }
 }
 
-void fill_string(string *str_, cell start, cell capacity, cell fill)
-{
-       return vm->fill_string(str_,start,capacity,fill);
-}
 
 /* Allocates memory */
 string *factorvm::allot_string(cell capacity, cell fill)
@@ -129,10 +105,6 @@ string *factorvm::allot_string(cell capacity, cell fill)
        return str.untagged();
 }
 
-string *allot_string(cell capacity, cell fill)
-{
-       return vm->allot_string(capacity,fill);
-}
 
 inline void factorvm::vmprim_string()
 {
@@ -153,10 +125,6 @@ bool factorvm::reallot_string_in_place_p(string *str, cell capacity)
                && capacity <= string_capacity(str);
 }
 
-bool reallot_string_in_place_p(string *str, cell capacity)
-{
-       return vm->reallot_string_in_place_p(str,capacity);
-}
 
 string* factorvm::reallot_string(string *str_, cell capacity)
 {
@@ -200,10 +168,6 @@ string* factorvm::reallot_string(string *str_, cell capacity)
        }
 }
 
-string* reallot_string(string *str_, cell capacity)
-{
-       return vm->reallot_string(str_,capacity);
-}
 
 inline void factorvm::vmprim_resize_string()
 {
index 9a082b0b8362238264c17df10992fdd80b95ef05..87beb9a0a85dbee0f7c90e259bf39e68c7d58563 100644 (file)
@@ -11,16 +11,9 @@ inline static cell string_size(cell size)
        return sizeof(string) + size;
 }
 
-string* allot_string_internal(cell capacity);
-string* allot_string(cell capacity, cell fill);
 PRIMITIVE(string);
-string *reallot_string(string *string, cell capacity);
 PRIMITIVE(resize_string);
 
-/* String getters and setters */
-cell string_nth(string* string, cell index);
-void set_string_nth(string* string, cell index, cell value);
-
 PRIMITIVE(string_nth);
 PRIMITIVE(set_string_nth_slow);
 PRIMITIVE(set_string_nth_fast);