Преглед на файлове

some small fixes

master
FelixBrendel преди 5 години
родител
ревизия
828abbdf13
променени са 4 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. +1
    -0
      src/assert.hpp
  2. +2
    -1
      src/env.cpp
  3. +1
    -1
      src/eval.cpp
  4. +1
    -0
      src/forward_decls.cpp

+ 1
- 0
src/assert.hpp Целия файл

@@ -40,6 +40,7 @@
} while(0)

#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) \
do { \


+ 2
- 1
src/env.cpp Целия файл

@@ -75,6 +75,7 @@ namespace Slime {
proc lookup_symbol(Lisp_Object* node, Environment* env) -> Lisp_Object* {
profile_with_comment(node->value.symbol.data);
assert("env was null", env);
// print(node);
assert_type(node, Lisp_Object_Type::Symbol);
@@ -109,7 +110,7 @@ namespace Slime {
for_hash_map (env->hm) {
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);
}
for (u32 i = 0; i < env->parents.next_index; ++i) {


+ 1
- 1
src/eval.cpp Целия файл

@@ -367,7 +367,7 @@ plot(sin(t))
Lisp_Object_Type type = pc->type;
switch (type) {
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());
} break;
case Lisp_Object_Type::Pair: {


+ 1
- 0
src/forward_decls.cpp Целия файл

@@ -59,6 +59,7 @@ namespace Slime {
Lisp_Object* get_keyword(String identifier);
Lisp_Object* get_keyword(const char*);
Lisp_Object* create_lisp_object(f64);
Lisp_Object* create_lisp_object(void*);
Lisp_Object* create_lisp_object(const char*);
Lisp_Object* create_lisp_object_continuation();
Lisp_Object* create_lisp_object_vector(Lisp_Object*);


Зареждане…
Отказ
Запис