Another inconclusive session: still nothing works, still making progress.
This commit is contained in:
parent
ef59563e25
commit
eed4711fee
35 changed files with 317 additions and 232 deletions
|
|
@ -1,5 +1,19 @@
|
|||
# State of Play
|
||||
|
||||
## 20260421
|
||||
|
||||
### To have `c_` functions or not to have `c_` functions?
|
||||
|
||||
Up to now I've had a conscious design pattern of having C functions with names beginning with `c_` which were 'the simplest possible way of solving the problem in C', and C functions with names beginning `lisp_` which were (usually) wrappers around those functions designed to be callable from Lisp. The current current refactoring exercise — and the `0.1.0` design doctrine that I should only code in C things which are absolutely necessary to bootstrap the Lisp compiler — is calling into question the need for many of the `c_` functions. After all, the `lisp_` functions are callable from C, it's just a little more prolix.
|
||||
|
||||
However, there is an overhead to calling a `lisp_` function: you have to generate a new stack frame, and there is a overhead, and consequently a time penalty. It may be in the long term it will be worth reviving `c_` functions for performance optimisation; but I think the priority for `0.1.X` is functionality, not performance.
|
||||
|
||||
### Type checking stack frames
|
||||
|
||||
Passing everything around as `pso_pointers` bypasses even C's rather lax type safety. Of course this doesn't matter for code written in Lisp, because it is the compiler's responsibility to mechanically make sure that **only** stack frames are passed into functions as stack frames. But if something else was passed in as a stack frame, the results probable wouldn't be pretty, and at least while I'm mostly running boostrap functions written in C, there is a risk.
|
||||
|
||||
Type checking the stack frame every time a function is entered is an overhead that will grow big quickly. I'm inclined to not do it in production. But I think it's essential to do it during debugging. proposal [here]().
|
||||
|
||||
## 20260420
|
||||
|
||||
Still on side projects, but those side-projects are giving me thinking time;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue