mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-19 01:18:40 +03:00
various cleanups and todo list tweaks
This commit is contained in:
parent
578dfaba3c
commit
bf9c58f1f9
21
TODO.md
21
TODO.md
@ -2,11 +2,11 @@
|
||||
- Add void constraints for (do ...) statements
|
||||
- Ownership in while loops
|
||||
- Ownership tracking to enable returning refs from functions (it's forbidden at the moment)
|
||||
- Handle Function pointers as values (add tests)
|
||||
- Handle Function pointers as values (re-activate the tests)
|
||||
- Compilation of generic functions
|
||||
- Compiling arrays
|
||||
- Avoid problems with name shadowing when freeing a local variable (is this possible? disallow shadowing instead?)
|
||||
- Handle global variables referenced inside functions, in regards to the lifetime checker
|
||||
- Avoid problems with name shadowing when freeing a local variable (is this possible? disallow shadowing instead?)
|
||||
- Track dependencies between functions to enable automatic recompilation when a function changes
|
||||
- Change :a and :b in binop and if to :left and :right
|
||||
- lambdas / lambda lifting
|
||||
@ -14,10 +14,7 @@
|
||||
- deftype
|
||||
- compile a whole file to a single dylib
|
||||
- speed up some passes by mutating a single variable instead of copying immutable versions around
|
||||
- Clean up unifier even more
|
||||
- Clean up lifetime checker code
|
||||
- Compiler doesn't catch when a let-binding refers to a variable that's defined later (in the same let binding)
|
||||
- :result-name not needed in literals
|
||||
- add proper no-op :node for ()
|
||||
- self recuring function doens't check argument count/types in the actual call to itself
|
||||
|
||||
@ -29,27 +26,27 @@
|
||||
- 'for' macro with multiple bindings (i, j, etc...)
|
||||
|
||||
# Bugs
|
||||
- Crashing when printing ffi function!
|
||||
- Didn't show error when registering non-existing C function?!
|
||||
|
||||
|
||||
# Dynamic Runtime
|
||||
- call stack isn't properly popped when errors occur inside (load-lisp ...) at startup!
|
||||
- don't allow sending compiled functions of wrong type to ffi functions (check their types with 'signature')
|
||||
- add array as its own tag for Obj, [] syntax, etc
|
||||
- use [] in parameter list for function definitions
|
||||
- register/register-builtin should use the lisp name, not the C name
|
||||
- jump table in evaluator, use a 'dispatch' member with a label adress in Obj
|
||||
- remove globals to enable several instances of the runner in parallel
|
||||
- primops should have signatures, right?
|
||||
- nicer pretty printing of lists of lists
|
||||
- better error handling and input validation for primops, clean up the C macros
|
||||
- lambdas should be able to have their signature set/get
|
||||
- profile the evaluator
|
||||
- namespaces
|
||||
- don't allow sending compiled functions of wrong type to ffi functions (check their types with 'signature')
|
||||
- create pretty printed stack when needed, not always when calling functions
|
||||
- profile the evaluator
|
||||
- better error handling and input validation for primops, clean up the C macros
|
||||
- Fix problem with "No meta data." for some calls in stack trace
|
||||
|
||||
# Maybes
|
||||
- polymorphic math operators?
|
||||
- matching/destructuring in let statements and function arguments too?
|
||||
- reading of dotted pairs?
|
||||
- primops should have signatures, right?
|
||||
- lambdas should be able to have their signature set/get?
|
||||
|
||||
|
@ -201,7 +201,7 @@
|
||||
(bake call-me)
|
||||
(call-twice call-me)))
|
||||
|
||||
;; (test-call-twice)
|
||||
;;(test-call-twice)
|
||||
|
||||
|
||||
;; CHARS
|
||||
|
@ -1,5 +1,8 @@
|
||||
|
||||
(def defmacro (macro (name args body) (list 'def name (list 'macro args body))))
|
||||
(def defmacro (macro (name args body)
|
||||
(list 'do
|
||||
(list 'def name (list 'macro args body))
|
||||
(list 'meta-set! name :name (str name)))))
|
||||
|
||||
(defmacro when (expr a) (list 'if expr a nil))
|
||||
(defmacro if-not (expr a b) (list 'if (list 'not expr) a b))
|
||||
|
@ -696,7 +696,7 @@ void eval_list(Obj *env, Obj *o) {
|
||||
snprintf(function_trace[function_trace_pos], STACK_TRACE_LEN, "%-30s %s %d:%d", func_name, file, line, pos);
|
||||
}
|
||||
else {
|
||||
snprintf(function_trace[function_trace_pos], STACK_TRACE_LEN, "%s", "no meta data"); // obj_to_string(o)->s);
|
||||
snprintf(function_trace[function_trace_pos], STACK_TRACE_LEN, "No meta data."); //"%s", obj_to_string(function)->s);
|
||||
}
|
||||
function_trace_pos++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user