From cd2199b424fa0c7f724e2a7b771ed3e0f9b90e07 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Mon, 4 May 2020 10:44:51 -0400 Subject: found a bug: f(f(x)) --- main.c | 4 +++- test.toc | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index ba98e87..dc166d8 100644 --- a/main.c +++ b/main.c @@ -8,6 +8,8 @@ /* @TODO: +fix puti(puti(x)) +win64 #foreign allow #include "foo.toc", foo; #include "foo.toc", foo; @@ -24,7 +26,7 @@ enums unions bitwise operations --- -either detect circular #includes or set a #include limit (maybe sometimes you want finite circular includes with #if) +either detect circular #includes or set a #include depth limit (maybe sometimes you want finite circular includes with #if) switch to / add as an alternative: libffi - better yet, inline assembly don't bother generating ret_ if nothing's deferred diff --git a/test.toc b/test.toc index c57996e..2df6c46 100644 --- a/test.toc +++ b/test.toc @@ -1,4 +1,9 @@ +foo ::= fn(x: int) int { + 2*x +} + main ::=fn(){ + foo(foo(10)); - yeoop #C 3; } +main(); -- cgit v1.2.3