removed global functions from strings.cpp
							parent
							
								
									d21b1b2e1e
								
							
						
					
					
						commit
						9e2d40a228
					
				| 
						 | 
				
			
			@ -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()
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue