|
|
@@ -229,12 +229,10 @@ namespace Slime { |
|
|
Lisp_Object_Type type = Memory::get_type(definee);
|
|
|
Lisp_Object_Type type = Memory::get_type(definee);
|
|
|
switch (type) {
|
|
|
switch (type) {
|
|
|
case Lisp_Object_Type::Symbol: {
|
|
|
case Lisp_Object_Type::Symbol: {
|
|
|
// BUG(Felix): Defining with doc string crashes
|
|
|
|
|
|
if (form != Memory::nil) {
|
|
|
if (form != Memory::nil) {
|
|
|
Lisp_Object* doc = thing;
|
|
|
Lisp_Object* doc = thing;
|
|
|
try_void assert_type(doc, Lisp_Object_Type::String);
|
|
|
try_void assert_type(doc, Lisp_Object_Type::String);
|
|
|
try_void assert_type(form, Lisp_Object_Type::Pair);
|
|
|
try_void assert_type(form, Lisp_Object_Type::Pair);
|
|
|
form = form->value.pair.rest;
|
|
|
|
|
|
thing = form->value.pair.first;
|
|
|
thing = form->value.pair.first;
|
|
|
try_void assert(form->value.pair.rest == Memory::nil);
|
|
|
try_void assert(form->value.pair.rest == Memory::nil);
|
|
|
// TODO docs
|
|
|
// TODO docs
|
|
|
@@ -1053,16 +1051,17 @@ namespace Slime { |
|
|
}
|
|
|
}
|
|
|
return Memory::t;
|
|
|
return Memory::t;
|
|
|
};
|
|
|
};
|
|
|
define((print (:sep " ") (:end "\n") . things), "TODO") {
|
|
|
|
|
|
|
|
|
define((print (:sep " ") (:end "\n") (:repr ()) . things), "TODO") {
|
|
|
profile_with_name("(print)");
|
|
|
profile_with_name("(print)");
|
|
|
fetch(sep, end, things);
|
|
|
|
|
|
|
|
|
fetch(sep, end, repr, things);
|
|
|
|
|
|
|
|
|
if (things != Memory::nil) {
|
|
|
if (things != Memory::nil) {
|
|
|
print(things->value.pair.first);
|
|
|
|
|
|
|
|
|
bool print_repr = repr != Memory::nil;
|
|
|
|
|
|
print(things->value.pair.first, repr);
|
|
|
|
|
|
|
|
|
for_lisp_list(things->value.pair.rest) {
|
|
|
for_lisp_list(things->value.pair.rest) {
|
|
|
print(sep);
|
|
|
print(sep);
|
|
|
print(it);
|
|
|
|
|
|
|
|
|
print(it, repr);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|