[Vm-dev] [Squeak 0007821]: Make generated interpreter code
compatible with Plan9's POSIX C compiler
Bert Freudenberg
bert at freudenbergs.de
Thu Oct 2 14:44:27 UTC 2014
On 02.10.2014, at 16:05, Alex Franchuk <alex.franchuk at gmail.com> wrote:
> The changes were:
> 1. Fix a couple incorrect/faulty C type declarations for certain methods and scoped variables within the methods.
> 2. Ensure functions which declare a return type will return some value at the end of the block (defaulting to null).
> 3. Ensure assignments are properly casted when type data about the expression and variable is available.
> 4. Ensure functions arguments are properly casted when type data about the function's parameters and the argument expressions is available.
That sounds rather useful. I need better type information, too.
E.g., I'd like to know that firstIndexableField() is really an 'unsigned char *' here, not a 'void *' as declared:
unsafeByteOf: bytesOop at: ix
"Argument bytesOop must not be aSmallInteger!"
<inline: true>
| pointer |
<var: #pointer type: #'unsigned char *'>
^(pointer := interpreterProxy firstIndexableField: bytesOop) at: ix - 1
I thought I could use the scopeStack but that appears to not be available when generating code ...
- Bert -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4142 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20141002/260f8ab9/smime.bin
More information about the Vm-dev
mailing list