mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 20:45:06 +02:00
Added notes
This commit is contained in:
parent
dfdad96d57
commit
5ad0f6fa68
1 changed files with 16 additions and 0 deletions
|
@ -96,6 +96,13 @@ Disadvantages:
|
||||||
|
|
||||||
Based on this overview I am planning to use C arrays rather than Cyclone vectors to pass arguments.
|
Based on this overview I am planning to use C arrays rather than Cyclone vectors to pass arguments.
|
||||||
|
|
||||||
|
### Packing Arguments
|
||||||
|
|
||||||
|
don't even need alloca for this, can just use an array, EG:
|
||||||
|
|
||||||
|
object aa[2];
|
||||||
|
aa[0] = arg1;
|
||||||
|
aa[1] = arg2;
|
||||||
|
|
||||||
TODO: how to call these functions, need to pack args prior to call
|
TODO: how to call these functions, need to pack args prior to call
|
||||||
TODO: how to unpack args for a call. I think it would be simple, need to change compiler to point to members of `args` instead of directly to arguments
|
TODO: how to unpack args for a call. I think it would be simple, need to change compiler to point to members of `args` instead of directly to arguments
|
||||||
|
@ -105,6 +112,15 @@ Varargs functions still expect to receive extra arguments as part of a list. we
|
||||||
TODO: example of packing/unpacking for fixed args, EG: (lambda (a b c))
|
TODO: example of packing/unpacking for fixed args, EG: (lambda (a b c))
|
||||||
TODO: example of packing for (lambda X) and (lambda (a b . c) variadic forms
|
TODO: example of packing for (lambda X) and (lambda (a b . c) variadic forms
|
||||||
|
|
||||||
|
### Unpacking Arguments
|
||||||
|
|
||||||
|
Unpacking is just simple array references:
|
||||||
|
|
||||||
|
arg1 = args[0];
|
||||||
|
arg2 = args[1];
|
||||||
|
|
||||||
|
TODO: any compilications here due to assumptions by our compiler, and how it compiles identifiers?
|
||||||
|
|
||||||
## Performance
|
## Performance
|
||||||
|
|
||||||
A key consideration is the impact to runtime performance. We do not want this solution to significantly slow down our programs. I expect there may be some performance hit though.
|
A key consideration is the impact to runtime performance. We do not want this solution to significantly slow down our programs. I expect there may be some performance hit though.
|
||||||
|
|
Loading…
Add table
Reference in a new issue