small optimizaitons
This commit is contained in:
@@ -14,11 +14,11 @@
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define if_error_log_location_and_return() \
|
||||
#define if_error_log_location_and_return(val) \
|
||||
do { \
|
||||
if (Globals::error) { \
|
||||
log_location(); \
|
||||
return; \
|
||||
return val; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
@@ -114,13 +114,13 @@
|
||||
Parser::parser_col = 0; \
|
||||
auto label(params,__LINE__) = Parser::parse_single_expression( \
|
||||
Memory::get_c_str(Memory::create_string(#def))); \
|
||||
if_error_log_location_and_return(); \
|
||||
if_error_log_location_and_return(nullptr); \
|
||||
assert_type(label(params,__LINE__), Lisp_Object_Type::Pair); \
|
||||
assert_type(label(params,__LINE__)->value.pair.first, Lisp_Object_Type::Symbol); \
|
||||
auto label(sym,__LINE__) = label(params,__LINE__)->value.pair.first; \
|
||||
auto label(sfun,__LINE__) = Memory::create_lisp_object_cfunction(special); \
|
||||
create_arguments_from_lambda_list_and_inject(label(params,__LINE__)->value.pair.rest, label(sfun,__LINE__)); \
|
||||
if_error_log_location_and_return(); \
|
||||
if_error_log_location_and_return(nullptr); \
|
||||
label(sfun,__LINE__)->docstring = Memory::create_string(docs); \
|
||||
define_symbol(label(sym,__LINE__), label(sfun,__LINE__)); \
|
||||
label(sfun,__LINE__)->value.cFunction->body = []() -> Lisp_Object*
|
||||
@@ -132,6 +132,7 @@
|
||||
Globals::Current_Execution::envi_stack.next_index-1)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* iterate over lisp vectors
|
||||
*/
|
||||
@@ -151,3 +152,9 @@
|
||||
for (Lisp_Object* head = l, *it; \
|
||||
Memory::get_type(head) == Lisp_Object_Type::Pair && (it = head->value.pair.first); \
|
||||
head = head->value.pair.rest, ++it_index)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user