chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1098: Remove the apply limit wrt the number of a


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1098: Remove the apply limit wrt the number of arguments
Date: Sat, 31 Oct 2015 15:53:59 -0000

#1098: Remove the apply limit wrt the number of arguments
----------------------+--------------------
  Reporter:  mario    |      Owner:
      Type:  defect   |     Status:  new
  Priority:  minor    |  Milestone:  4.11.0
 Component:  unknown  |    Version:  4.8.x
Resolution:           |   Keywords:
----------------------+--------------------

Comment (by sjamaan):

 I think the argvector fix has removed the limit for all intents &
 purposes:

 {{{
 #!scm
 (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...

--
Ticket URL: <http://bugs.call-cc.org/ticket/1098#comment:3>
CHICKEN Scheme <http://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]