Stratego/XT JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: STR-119
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Eelco Visser
Reporter: Martin Bravenboer
Votes: 0
Watchers: 0
Operations

Clone this issue
Create sub-task
If you were logged in you would be able to see more operations.
Stratego/XT

Replace GCC nested functions by stack-allocated closures as structs

Created: 2004-06-18 07:23   Updated: 2008-03-31 20:46
Component/s: strc - Stratego compiler
Affects Version/s: None
Fix Version/s: 0.17

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Depends
This issue is blocked by:
STR-408 Escaping variables analysis Major Closed
STR-409 Compute size of closure per function Major Closed
 
Solve
This issue will solve:
STR-108 MacOS X: strc fails for non trivial S... Major Closed
 


 Description  « Hide
Nested functions are causing a lot of problems: the stack must be executable and GCC at Mac OS X still doesn't support them correctly.

The nested functions can be replaced by declaring all local variables in a struct. Nested functions get a pointer to the struct of their lexical scope. A struct might need to have a pointer a struct of its own lexical outer scope. As an alternative, nested functions could be given pointers to structs for all outer lexical scopes.

 All   Comments   Work Log   Change History      Sort Order:
Eelco Visser [2006-08-03 22:15]
The development of the new compilation scheme has been finished in revision 15511; the build of the development branch was succesful.