Martin Cracauer wrote:
>Raymond Toy wrote on Tue, Feb 18, 2003 at 10:43:59AM -0500:
>
>
>>>>>>>"William" == William C Halliburton <[EMAIL PROTECTED]> writes:
>>>>>>>
>>>>>>>
>> William> Anyone have experience with the following note.
>>
>> William> Note: Unable to optimize because:
>> William> Could not optimize away %SAP-ALIEN: forced to do runtime
>> William> allocation of alien-value structure.
>>
>>I've seen this. I tried long ago to make it go away in certain
>>situations but it made others worse.
>>
>>Is this a problem?
>>
>>
>
>It conses and it extremly slow.
>
>So what is that code which is causing this?
>
>The c-struct package generates very ineffective code.
>
>Martin
>
With an ounce of thought I believe may I have a grasp.
(def-alien-type test-struct
(struct nil (foo unsigned)))
(def-alien-routine test-struct-routine void (foo (* test-struct)))
(defun test-struct ()
(make-alien test-struct))
(defun test-struct-wo-note ()
(with-alien ((foo test-struct))
(format t "~a" (slot foo 'foo) )))
(defun test-struct-calling-out ()
(with-alien ((foo test-struct))
(test-struct-routine foo)))
I guess that the note happens anytime an alien-value is created and I
need to deal
with alien values without passing any around. Is this a valid assessment.
Why does the last function give the note, it would seem to not need to
allocate
the alien wrapper.
Thank you,
William