From 15d6935601ef5a1d23c6012bc1b9ca2b563fc28f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Fri, 10 Nov 2017 08:29:55 +0100 Subject: [PATCH] added TODO for compile time keyword --- src/main/java/dk/camelot64/kickc/TODO.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/dk/camelot64/kickc/TODO.txt b/src/main/java/dk/camelot64/kickc/TODO.txt index b2b224b20..339286ea7 100644 --- a/src/main/java/dk/camelot64/kickc/TODO.txt +++ b/src/main/java/dk/camelot64/kickc/TODO.txt @@ -11,7 +11,10 @@ Features - Improve locality of block sequence for if(cond) { stmt1; } else { stmt2; } to if(!cond) goto @else stmt1; jmp @end; @else: stmt2; @end: - Optimize if/else by swapping if & else if cond is easier to evaluate than !cond. - Let { stmt } and for() {} introduce a new anonymous scope. (But not when optimizing) -- Add preprocessing / find a way to allow some functions to run at compile time +- Add preprocessing / find a way to allow some functions to run at compile time. This will always be to initialize memory to a certain state. + - Syntax: A preprocess keyword usable before initializers or global statements blocks? (maybe compiletime is a better word as it is not a preprocessor in the C-sense of the word) + - byte[$100] sins = preprocess { [x] = sin(2.0*PI*x/$100) }; + - byte[$100] sins; preprocess { for(byte x : 0 $ff) { sins[x] = sin(2.0*PI*x/$100)}}; - Implement inline compilation of functions (and a mechanism for choosing which methods / calls to inline) - Handle long branches - Optimize loops by unrolling them somewhat