Opened 11 years ago
Closed 8 years ago
#1098 closed defect (fixed)
Remove the apply limit wrt the number of arguments
Reported by: | Mario Domenech Goulart | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 5.0 |
Component: | unknown | Version: | 4.8.x |
Keywords: | Cc: | ||
Estimated difficulty: | medium |
Description
If feasible, naturally.
Change History (6)
comment:1 Changed 10 years ago by
Milestone: | someday → 4.10.0 |
---|
comment:2 Changed 9 years ago by
Milestone: | 4.10.0 → 4.11.0 |
---|
comment:3 Changed 9 years ago by
I think the argvector fix has removed the limit for all intents & purposes:
(use srfi-1) (print (apply + (make-list 100000 1))) (use-for-syntax srfi-1) (define-syntax foo (ir-macro-transformer (lambda (e r c) `(print (+ . ,(make-list (cadr e) 1)))))) (foo 100000)
Compiling and running this prints 100000 twice. Interpreting it does the same.
The only case where this could still fail is a procedure which receives a huge number of arguments, and right at the start the stack is just full, so a reclaim is needed. Then the argvector will be saved on the temporary stack, and it will not fit. So a resize of the temporary stack would be required (which can be done in the C_save_and_reclaim[_args]
functions easily).
I'll have to think of a good way to test this...
comment:4 Changed 9 years ago by
Milestone: | 4.11.0 → 5.0 |
---|
Patch submitted for CHICKEN 5. Probably not important enough to fix for CHICKEN 4.
comment:5 Changed 8 years ago by
Estimated difficulty: | → medium |
---|
comment:6 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed by 5b5b3f7 / a23fa1f
Maybe we'll find the time to do it for 4.11, otherwise 5 will have to be our target