The future of lambda delegates

BCS BCS at pathlink.com
Thu Aug 17 09:28:44 PDT 2006


1) What happens when a heap based function calls a stack based function? 
Will the code try to extend the heap frame? How would this be prevented? 
Use another register for the heap-frame-pointer? (stack-frame, 
heap-frame, stack, how many register are left?) Have a stub stack-frame 
to put it in? (makes fn calls more costly.)

2) heap frames only tackles the case where the "lost" scope is the 
function it's self. What about where the scope is a if block?

void fn()
{
	int i;
	auto dg = {return i;};

	if(i);
	{
		int j;
		dg = {return i+j;};
	}

	if(i)
	{
		int k = 3;
		k = dg();	// j overlaps k
	}
}



More information about the Digitalmars-d mailing list