mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 12:35:05 +02:00
WIP
This commit is contained in:
parent
bc72afcca0
commit
27a9e7abd5
1 changed files with 9 additions and 4 deletions
|
@ -3117,15 +3117,20 @@ static void __host_lambda_1(void *data, int argc, closure self) {
|
||||||
// // 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);
|
||||||
|
|
||||||
|
static int tmp = 0;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
object *stack = ((gc_thread_data *)data)->args; // TODO: do it inline for benchmarks/production code
|
object *stack = ((gc_thread_data *)data)->args; // TODO: do it inline for benchmarks/production code
|
||||||
top = alloca(sizeof(object)); // TODO: is there a more efficient way?
|
top = alloca(sizeof(object)); // TODO: is there a more efficient way?
|
||||||
|
tmp++;
|
||||||
|
if (tmp == 4) {
|
||||||
|
printf("starting GC\n");
|
||||||
// TODO:
|
// TODO:
|
||||||
// if (stack_overflow(&top, (((gc_thread_data *)data)->stack_limit))) {
|
// if (stack_overflow(&top, (((gc_thread_data *)data)->stack_limit))) {
|
||||||
// mclosure0(c1, (function_type) __host_lambda_1);
|
mclosure0(c1, (function_type) __host_lambda_1);
|
||||||
// GC(data, &c1, buf, ?);
|
GC(data, &c1, buf, ?);
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// TODO: if exceeded stack limit, initiate minor GC
|
// TODO: if exceeded stack limit, initiate minor GC
|
||||||
// bundle up args, pc, and pass them along
|
// bundle up args, pc, and pass them along
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue