| @@ -40,6 +40,7 @@ | |||||
| } while(0) | } while(0) | ||||
| #define assert_list_length(_node, _len) assert("List length assertion", list_length(_node) == _len) | #define assert_list_length(_node, _len) assert("List length assertion", list_length(_node) == _len) | ||||
| #define assert_vector_length(_node, _len) assert("Vector length assertion", _node->value.vector.length == _len) | |||||
| #define assert(message, condition) \ | #define assert(message, condition) \ | ||||
| do { \ | do { \ | ||||
| @@ -75,6 +75,7 @@ namespace Slime { | |||||
| proc lookup_symbol(Lisp_Object* node, Environment* env) -> Lisp_Object* { | proc lookup_symbol(Lisp_Object* node, Environment* env) -> Lisp_Object* { | ||||
| profile_with_comment(node->value.symbol.data); | profile_with_comment(node->value.symbol.data); | ||||
| assert("env was null", env); | |||||
| // print(node); | // print(node); | ||||
| assert_type(node, Lisp_Object_Type::Symbol); | assert_type(node, Lisp_Object_Type::Symbol); | ||||
| @@ -109,7 +110,7 @@ namespace Slime { | |||||
| for_hash_map (env->hm) { | for_hash_map (env->hm) { | ||||
| written += print_indent(); | written += print_indent(); | ||||
| written += print_to_file(file, "-> %{str} :: %{L_O} (%{ptr})\n", | |||||
| written += print_to_file(file, "-> %{str} :: %{l_o} (%{ptr})\n", | |||||
| ((Lisp_Object*)key)->value.symbol.data, value, value); | ((Lisp_Object*)key)->value.symbol.data, value, value); | ||||
| } | } | ||||
| for (u32 i = 0; i < env->parents.next_index; ++i) { | for (u32 i = 0; i < env->parents.next_index; ++i) { | ||||
| @@ -367,7 +367,7 @@ plot(sin(t)) | |||||
| Lisp_Object_Type type = pc->type; | Lisp_Object_Type type = pc->type; | ||||
| switch (type) { | switch (type) { | ||||
| case Lisp_Object_Type::Symbol: { | case Lisp_Object_Type::Symbol: { | ||||
| Current_Execution.cs.data[Current_Execution.cs.next_index-1] | |||||
| try Current_Execution.cs.data[Current_Execution.cs.next_index-1] | |||||
| = lookup_symbol(pc, get_current_environment()); | = lookup_symbol(pc, get_current_environment()); | ||||
| } break; | } break; | ||||
| case Lisp_Object_Type::Pair: { | case Lisp_Object_Type::Pair: { | ||||
| @@ -59,6 +59,7 @@ namespace Slime { | |||||
| Lisp_Object* get_keyword(String identifier); | Lisp_Object* get_keyword(String identifier); | ||||
| Lisp_Object* get_keyword(const char*); | Lisp_Object* get_keyword(const char*); | ||||
| Lisp_Object* create_lisp_object(f64); | Lisp_Object* create_lisp_object(f64); | ||||
| Lisp_Object* create_lisp_object(void*); | |||||
| Lisp_Object* create_lisp_object(const char*); | Lisp_Object* create_lisp_object(const char*); | ||||
| Lisp_Object* create_lisp_object_continuation(); | Lisp_Object* create_lisp_object_continuation(); | ||||
| Lisp_Object* create_lisp_object_vector(Lisp_Object*); | Lisp_Object* create_lisp_object_vector(Lisp_Object*); | ||||