Re: SV: ;;; An error occurred in function GROW-CODE-BUFFER:

"lcluke" <[email protected]> Fri, 04 Apr 2003 21:35:46 -0000
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
--- In [email protected], Roger Corman <roger@c...> wrote:
> This is true, but GROW-CODE-BUFFER is only used by the assembler. 
Compiled functions (like the one Luke shows) do not use this 4k 
buffer. Compiled functions can generally grow to 64k bytes (more, I 
believe, with a setting change). The 4k limitation (which could 
easily be increased in assembler.lisp) is usually sufficient because 
normally you don't write assembler functions thousands of lines long.
> 
> I just don't understand why the assembler was getting called here. 
I tried the function, increasing to v7, and did not get that error.
> 

Roger and JP,

I am using:

- CCL 2.01 (no patches installed as I just re-installed the whole 
thing)
- Windows XP Home, with the latest service pack.

What follows is the exact code that generates the error under my 
setup (not exactly stellar LISP code, but my plan was to port an 
OpenGL example from C to LISP - statement for statement - in order 
to test my SDL FFI definitions):

(ct:defctype vertex-arrayf (:single-float 3))
(ct:defctype colour-arrayu (:unsigned-char 4))

(defun create-object ()
    (setf (ct:cref vertex-arrayf v0 0) -1.0)
    (setf (ct:cref vertex-arrayf v0 1) -1.0)
    (setf (ct:cref vertex-arrayf v0 2) 1.0)

	(format t "v0 [~A, ~A, ~A]~%" 
	(ct:cref vertex-arrayf v0 0)
	(ct:cref vertex-arrayf v0 1)
	(ct:cref vertex-arrayf v0 2))
	        
    (setf (ct:cref vertex-arrayf v1 0) 1.0)
    (setf (ct:cref vertex-arrayf v1 1) -1.0)
    (setf (ct:cref vertex-arrayf v1 2) 1.0)
	
	(format t "v1 [~A, ~A, ~A]~%" 
	(ct:cref vertex-arrayf v1 0)
	(ct:cref vertex-arrayf v1 1)
	(ct:cref vertex-arrayf v1 2))
    
    (setf (ct:cref vertex-arrayf v2 0) 1.0)
    (setf (ct:cref vertex-arrayf v2 1) 1.0)
    (setf (ct:cref vertex-arrayf v2 2) 1.0)        
	
	(format t "v2 [~A, ~A, ~A]~%" 
	(ct:cref vertex-arrayf v2 0)
	(ct:cref vertex-arrayf v2 1)
	(ct:cref vertex-arrayf v2 2))
    
    (setf (ct:cref vertex-arrayf v3 0) -1.0)
    (setf (ct:cref vertex-arrayf v3 1) 1.0)
    (setf (ct:cref vertex-arrayf v3 2) 1.0)  
	
	(format t "v3 [~A, ~A, ~A]~%" 
	(ct:cref vertex-arrayf v3 0)
	(ct:cref vertex-arrayf v3 1)
	(ct:cref vertex-arrayf v3 2))
    
    (setf (ct:cref vertex-arrayf v4 0) -1.0)
    (setf (ct:cref vertex-arrayf v4 1) -1.0)
    (setf (ct:cref vertex-arrayf v4 2) -1.0)          
	
	(format t "v4 [~A, ~A, ~A]~%" 
	(ct:cref vertex-arrayf v4 0)
	(ct:cref vertex-arrayf v4 1)
	(ct:cref vertex-arrayf v4 2))

    (setf (ct:cref vertex-arrayf v5 0) 1.0)
    (setf (ct:cref vertex-arrayf v5 1) -1.0)
    (setf (ct:cref vertex-arrayf v5 2) -1.0)        
	
	(format t "v5 [~A, ~A, ~A]~%" 
	(ct:cref vertex-arrayf v5 0)
	(ct:cref vertex-arrayf v5 1)
	(ct:cref vertex-arrayf v5 2))

    (setf (ct:cref vertex-arrayf v6 0) 1.0)
    (setf (ct:cref vertex-arrayf v6 1) 1.0)
    (setf (ct:cref vertex-arrayf v6 2) -1.0)
	
	(format t "v6 [~A, ~A, ~A]~%" 
	(ct:cref vertex-arrayf v6 0)
	(ct:cref vertex-arrayf v6 1)
	(ct:cref vertex-arrayf v6 2))

    (setf (ct:cref vertex-arrayf v7 0) -1.0)
    (setf (ct:cref vertex-arrayf v7 1) 1.0)
    (setf (ct:cref vertex-arrayf v7 2) -1.0)        
	
	(format t "v7 [~A, ~A, ~A]~%" 
	(ct:cref vertex-arrayf v7 0)
	(ct:cref vertex-arrayf v7 1)
	(ct:cref vertex-arrayf v7 2))

        
    (setf (ct:cref colour-arrayu red 0) 255)
    (setf (ct:cref colour-arrayu red 1) 0)
    (setf (ct:cref colour-arrayu red 2) 0)
    (setf (ct:cref colour-arrayu red 3) 255)
        
    (setf (ct:cref colour-arrayu green 0) 0)
    (setf (ct:cref colour-arrayu green 1) 255)
    (setf (ct:cref colour-arrayu green 2) 0)
    (setf (ct:cref colour-arrayu green 3) 255)

    (setf (ct:cref colour-arrayu blue 0) 0)
    (setf (ct:cref colour-arrayu blue 1) 0)
    (setf (ct:cref colour-arrayu blue 2) 255)
    (setf (ct:cref colour-arrayu blue 3) 255)
        
    (setf (ct:cref colour-arrayu white 0) 255)
    (setf (ct:cref colour-arrayu white 1) 255)
    (setf (ct:cref colour-arrayu white 2) 255)
    (setf (ct:cref colour-arrayu white 3) 255)

    (setf (ct:cref colour-arrayu yellow 0) 0)
    (setf (ct:cref colour-arrayu yellow 1) 255)
    (setf (ct:cref colour-arrayu yellow 2) 255)
    (setf (ct:cref colour-arrayu yellow 3) 255)

    (setf (ct:cref colour-arrayu black 0) 0)
    (setf (ct:cref colour-arrayu black 1) 0)
    (setf (ct:cref colour-arrayu black 2) 0)
    (setf (ct:cref colour-arrayu black 3) 255)

    (setf (ct:cref colour-arrayu orange 0) 255)
    (setf (ct:cref colour-arrayu orange 1) 255)
    (setf (ct:cref colour-arrayu orange 2) 0)
    (setf (ct:cref colour-arrayu orange 3) 255)

    (setf (ct:cref colour-arrayu purple 0) 255)
    (setf (ct:cref colour-arrayu purple 1) 0)
    (setf (ct:cref colour-arrayu purple 2) 255)
    (setf (ct:cref colour-arrayu purple 3) 0))

And the error...

VERTEX-ARRAYF
COLOUR-ARRAYU
;;; Warning: Symbol V0 assumed special
;;; Warning: Symbol V0 assumed special
;;; Warning: Symbol V0 assumed special
;;; Warning: Symbol V0 assumed special
;;; Warning: Symbol V0 assumed special
;;; Warning: Symbol V0 assumed special
;;; Warning: Symbol V1 assumed special
;;; Warning: Symbol V1 assumed special
;;; Warning: Symbol V1 assumed special
;;; Warning: Symbol V1 assumed special
;;; Warning: Symbol V1 assumed special
;;; Warning: Symbol V1 assumed special
;;; Warning: Symbol V2 assumed special
;;; Warning: Symbol V2 assumed special
;;; Warning: Symbol V2 assumed special
;;; Warning: Symbol V2 assumed special
;;; Warning: Symbol V2 assumed special
;;; Warning: Symbol V2 assumed special
;;; Warning: Symbol V3 assumed special
;;; Warning: Symbol V3 assumed special
;;; Warning: Symbol V3 assumed special
;;; Warning: Symbol V3 assumed special
;;; Warning: Symbol V3 assumed special
;;; Warning: Symbol V3 assumed special
;;; Warning: Symbol V4 assumed special
;;; Warning: Symbol V4 assumed special
;;; Warning: Symbol V4 assumed special
;;; Warning: Symbol V4 assumed special
;;; Warning: Symbol V4 assumed special
;;; Warning: Symbol V4 assumed special
;;; Warning: Symbol V5 assumed special
;;; Warning: Symbol V5 assumed special
;;; An error occurred in function GROW-CODE-BUFFER:
;;; Error: not implemented
;;; Entering Corman Lisp debug loop. 






------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/xaxhjB/hdqFAA/VygGAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/