Opened 4 years ago

Closed 13 months ago

#1098 closed defect (fixed)

Remove the apply limit wrt the number of arguments

Reported by: mario 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 3 years ago by sjamaan

  • Milestone changed from someday to 4.10.0

comment:2 Changed 2 years ago by sjamaan

  • Milestone changed from 4.10.0 to 4.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 2 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 21 months ago by sjamaan

  • Milestone changed from 4.11.0 to 5.0

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

comment:5 Changed 13 months ago by sjamaan

  • Estimated difficulty set to medium

comment:6 Changed 13 months ago by sjamaan

  • Resolution set to fixed
  • Status changed from new to closed

Fixed by 5b5b3f7 / a23fa1f

Note: See TracTickets for help on using tickets.