mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Added notes
This commit is contained in:
parent
cb62cadf97
commit
80ac3ef86f
1 changed files with 6 additions and 4 deletions
|
@ -12,12 +12,14 @@
|
||||||
(write (fac 10))
|
(write (fac 10))
|
||||||
#| Next-gen runtime:
|
#| Next-gen runtime:
|
||||||
|
|
||||||
|
// TODO: pass pc, args, argc (?? maybe not, already part of fnc calls) via gc_thread_data.
|
||||||
|
// that allows all sub-functions to be called via the same function prototype
|
||||||
static void __host_lambda_1(void *data, int pc, int argc, object *args) { // TODO: self? cont?
|
static void __host_lambda_1(void *data, int pc, int argc, object *args) { // TODO: self? cont?
|
||||||
object top;
|
object top;
|
||||||
object stack[3]; // length computed by the compiler based on function arguments
|
// object stack[3]; // length computed by the compiler based on function arguments
|
||||||
// initialize "stack" here, and unload arguments.
|
// // initialize "stack" here, and unload arguments.
|
||||||
// assumes the compile can compute the stack's max size, since it knows the number of args each function has
|
// // assumes the compile can compute the stack's max size, since it knows the number of args each function has
|
||||||
memcpy(stack, args, sizeof(object) * argc);
|
// memcpy(stack, args, sizeof(object) * argc);
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
top = alloca(sizeof(object)); // TODO: is there a more efficient way?
|
top = alloca(sizeof(object)); // TODO: is there a more efficient way?
|
||||||
|
|
Loading…
Add table
Reference in a new issue