moved arrays.hpp functions to vm
							parent
							
								
									625380c25c
								
							
						
					
					
						commit
						33ecaa5010
					
				| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
namespace factor
 | 
			
		||||
{
 | 
			
		||||
inline static cell array_nth(array *array, cell slot)
 | 
			
		||||
 | 
			
		||||
inline cell array_nth(array *array, cell slot)
 | 
			
		||||
{
 | 
			
		||||
#ifdef FACTOR_DEBUG
 | 
			
		||||
	assert(slot < array_capacity(array));
 | 
			
		||||
| 
						 | 
				
			
			@ -9,7 +10,7 @@ inline static cell array_nth(array *array, cell slot)
 | 
			
		|||
	return array->data()[slot];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline static void set_array_nth(array *array, cell slot, cell value)
 | 
			
		||||
inline void factorvm::set_array_nth(array *array, cell slot, cell value)
 | 
			
		||||
{
 | 
			
		||||
#ifdef FACTOR_DEBUG
 | 
			
		||||
	assert(slot < array_capacity(array));
 | 
			
		||||
| 
						 | 
				
			
			@ -20,6 +21,11 @@ inline static void set_array_nth(array *array, cell slot, cell value)
 | 
			
		|||
	write_barrier(array);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline void set_array_nth(array *array, cell slot, cell value)
 | 
			
		||||
{
 | 
			
		||||
	return vm->set_array_nth(array,slot,value);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
array *allot_array(cell capacity, cell fill);
 | 
			
		||||
 | 
			
		||||
cell allot_array_1(cell obj);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -213,7 +213,6 @@ struct factorvm {
 | 
			
		|||
	template <typename T> T *allot_array_internal(cell capacity);
 | 
			
		||||
	template <typename T> bool reallot_array_in_place_p(T *array, cell capacity);
 | 
			
		||||
	template <typename TYPE> TYPE *reallot_array(TYPE *array_, cell capacity);
 | 
			
		||||
	// next method here:
 | 
			
		||||
 | 
			
		||||
	//debug
 | 
			
		||||
	void print_chars(string* str);
 | 
			
		||||
| 
						 | 
				
			
			@ -246,6 +245,8 @@ struct factorvm {
 | 
			
		|||
	cell allot_array_2(cell v1_, cell v2_);
 | 
			
		||||
	cell allot_array_4(cell v1_, cell v2_, cell v3_, cell v4_);
 | 
			
		||||
	inline void vmprim_resize_array();
 | 
			
		||||
	inline void set_array_nth(array *array, cell slot, cell value);
 | 
			
		||||
	// next method here:
 | 
			
		||||
 | 
			
		||||
	//strings
 | 
			
		||||
	cell string_nth(string* str, cell index);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue