[squeak-dev] Anyone know the following about Slang?
Eliot Miranda
eliot.miranda at gmail.com
Fri Jul 4 00:25:51 UTC 2008
Hi All,
does anyone know (or even better has anyone fixed it) how hard it is to
make Slang inline methods that contain simple type declarations?
I would like to eliminate compile-time integer/pointer mismatch errors in
the new StackInterpreter I'm writing. I'd like to say things like:
callerSPOf: theFP
"Answer the SP of the caller provided theFP is not a base frame.
This points to the hottest item on the frame's stack."
self var: #theFP type: 'char *'.
self returnTypeC: 'char *'.
self assert: (self isBaseFrame: theFP) not.
^theFP + FoxCallerSavedIP + ((self frameNumArgs: theFP) + 2 * BytesPerWord)
but Slang refuses to inline anything that has C declarations. I'm guessing
that the issue is moving the type information from the method to its inlined
form. It took me half a day to discover where Slang refuses to inline
(should have looked in the obvious place CCodeGenerator>>collectInlineList,
instead of in the inlining code :/ ). So I'm afraid to waste the time
trying to find out where the restriction bites. Anyone know how to fix this
or better still have a fix?
best
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080703/ba2e7bbe/attachment.htm
More information about the Squeak-dev
mailing list
|