Opened 16 years ago
Closed 16 years ago
#40 closed defect (fixed)
Non-constant function-argument initforms
Reported by: | ehuelsmann | Owned by: | ehuelsmann |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | compiler | Version: | |
Keywords: | Cc: | ||
Parent Tickets: |
Description
The compiler doesn't support non-constant initforms for compiled functions. One way to work around this would be to take advantage of the existing processArgs() functionality in Closure.java. It's used by the interpreter to evaluate non-constant initforms.
In order to re-use the functionality, the compiler would need to create an Environment object and set it up with the variables used in the initforms for the interpreter to access.
This can be done by removing the CompiledClosure? wrapper around ClosureTemplateFunction?. The ClosureTemplateFunction? should support being .execute()-ed directly (instead of through the wrapper). The compiler should then set a context record (array of LispObjects?) currently carried around in CompiledClosure? directly in ClosureTemplateFunction?. The Environment object should be used to set the 'environment' field in ClosureTemplateFunction?.
Change History (2)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed by rewriting the lambda list into a series of let* forms, using the SUPPLIED-P argument to determine whether to evaluate the initform or not.
Current progress is:
Remain a number of things to do: