Summary

(make-vector -1) gets optimised into (##core#inline_allocate ("C_i_a_vector" 0))

Metadata

Description

A simple program

 (make-vector -1)

compiles into:

 [optimized-iteration]
 (lambda (k6)
   (let ((k8 (##core#lambda
               (t1)
               (let ((k10 (##core#lambda
                            (t2)
                            (let ((t3 (##core#inline_allocate ("C_a_i_vector" 0))))
                              (let ((k14 (##core#lambda (t4) (k6 (##core#undefined)))))
                                (let ((k16 (##core#lambda (r17) (r17 k14))))
                                  (##sys#implicit-exit-handler k16)))))))
                 (##core#callunit "eval" k10)))))
     (##core#callunit "library" k8)))

which results in:

 $ /tmp/t                                                     
 [panic] out of memory - heap full while resizing - execution terminated
 
 ##sys#implicit-exit-handler     <--

Changes and comments

[2012-03-17 19:50:53 UTC] ckeen wrote:

A patch has been sent to chicken-hackers

[2012-03-22 21:37:19 UTC] sjamaan changed status from new to closed

[2012-03-22 21:37:19 UTC] sjamaan set resolution to fixed

[2012-03-22 21:37:19 UTC] sjamaan wrote:

and was pushed

[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0

[2012-09-24 21:47:48 UTC] felix wrote:

Milestone 4.8.0 deleted