mirror of https://github.com/rusefi/bldc.git
Squashed 'lispBM/lispBM/' changes from 5f2a3f36..a7e04542
a7e04542 Fix: Closures now evaluate into themselves which is more in line with expected behaviour git-subtree-dir: lispBM/lispBM git-subtree-split: a7e045423ae289ce0f7b1aaeffd1cbb79cdd4f86
This commit is contained in:
parent
a067399ea7
commit
1ed1b7a2c4
|
@ -947,6 +947,11 @@ static inline void eval_macro(eval_context_t *ctx) {
|
|||
ctx->app_cont = true;
|
||||
}
|
||||
|
||||
static inline void eval_closure(eval_context_t *ctx) {
|
||||
ctx->r = ctx->curr_exp;
|
||||
ctx->app_cont = true;
|
||||
}
|
||||
|
||||
static inline void eval_callcc(eval_context_t *ctx) {
|
||||
|
||||
lbm_value continuation = NIL;
|
||||
|
@ -2116,6 +2121,7 @@ static void evaluation_step(void){
|
|||
case SYM_DEFINE: eval_define(ctx); return;
|
||||
case SYM_PROGN: eval_progn(ctx); return;
|
||||
case SYM_LAMBDA: eval_lambda(ctx); return;
|
||||
case SYM_CLOSURE: eval_closure(ctx); return;
|
||||
case SYM_IF: eval_if(ctx); return;
|
||||
case SYM_LET: eval_let(ctx); return;
|
||||
case SYM_AND: eval_and(ctx); return;
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "heap.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
|
||||
int res = 1;
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
uint32_t gc_stack_storage[GC_STACK_SIZE];
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
int res = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue