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 sjamaan

Milestone: someday4.10.0

comment:2 Changed 9 years ago by sjamaan

Milestone: 4.10.04.11.0

Maybe we'll find the time to do it for 4.11, otherwise 5 will have to be our target

comment:3 Changed 9 years ago by sjamaan

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 sjamaan

Milestone: 4.11.05.0

Patch submitted for CHICKEN 5. Probably not important enough to fix for CHICKEN 4.

comment:5 Changed 8 years ago by sjamaan

Estimated difficulty: medium

comment:6 Changed 8 years ago by sjamaan

Resolution: fixed
Status: newclosed

Fixed by 5b5b3f7 / a23fa1f

Note: See TracTickets for help on using tickets.