|
|
|
@@ -1,13 +1,21 @@ |
|
|
|
namespace Memory { |
|
|
|
|
|
|
|
// ------------------ |
|
|
|
// lisp_object |
|
|
|
// lisp_objects |
|
|
|
// ------------------ |
|
|
|
int object_memory_size; |
|
|
|
Int_Array_List* free_spots_in_object_memory; |
|
|
|
Lisp_Object* object_memory; |
|
|
|
int next_index_in_object_memory = 0; |
|
|
|
|
|
|
|
// ------------------ |
|
|
|
// environments |
|
|
|
// ------------------ |
|
|
|
int environment_memory_size; |
|
|
|
Int_Array_List* free_spots_in_environment_memory; |
|
|
|
Lisp_Object* environment_memory; |
|
|
|
int next_index_in_environment_memory = 0; |
|
|
|
|
|
|
|
// ------------------ |
|
|
|
// strings |
|
|
|
// ------------------ |
|
|
|
@@ -19,7 +27,6 @@ namespace Memory { |
|
|
|
String* string_memory; |
|
|
|
String* next_free_spot_in_string_memory; |
|
|
|
|
|
|
|
|
|
|
|
// ------------------ |
|
|
|
// immutables |
|
|
|
// ------------------ |
|
|
|
@@ -168,8 +175,7 @@ namespace Memory { |
|
|
|
next_index_in_object_memory = 2; // because t and nil are always there |
|
|
|
next_free_spot_in_string_memory = string_memory; |
|
|
|
|
|
|
|
Globals::root_environment->next_index = 0; |
|
|
|
Globals::root_environment->parents->next_index = 0; |
|
|
|
Globals::root_environment = create_built_ins_environment(); |
|
|
|
} |
|
|
|
|
|
|
|
proc create_lisp_object_number(double number) -> Lisp_Object* { |
|
|
|
|