[Vm-dev] VM Maker: BytecodeSets.spur-eem.54.mcz

Eliot Miranda eliot.miranda at gmail.com
Thu Jun 16 07:17:19 UTC 2016


Hi Clément,



_,,,^..^,,,_ (phone)
> On Jun 15, 2016, at 11:12 PM, Clément Bera <bera.clement at gmail.com> wrote:
> 
> 
> 
>> On Wed, Jun 15, 2016 at 11:40 PM, <commits at source.squeak.org> wrote:
>> 
>> Eliot Miranda uploaded a new version of BytecodeSets to project VM Maker:
>> http://source.squeak.org/VMMaker/BytecodeSets.spur-eem.54.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: BytecodeSets.spur-eem.54
>> Author: eem
>> Time: 15 June 2016, 2:39:35.207556 pm
>> UUID: ff813806-d8f8-473b-bacc-b0bc62f10c40
>> Ancestors: BytecodeSets.spur-cb.53
>> 
>> In Squeak the compiler checks for exceeding the number of available literals at compile time.  So encoders must implement maxIndexableLiterals.  The default form the Blue Book bytecode set is only 63.  EncoderForV3 answers 256.  Both NewspeakV4 and SistaV1 should answer 65536.
> 
> In SistaV1 there's a bit to mark if the method has counters or not. So 32.000. 

I'm on my phone so I can't show you the code but the compiler uses
  encoder maxIndexableLiterals min: method maxIndexableLiterals

and so method maxIndexableLiterals answers 32,767.  The limitation in the bytecode set is indeed 64k, but the limit in the compiled method header is 32k.

>> 
>> =============== Diff against BytecodeSets.spur-cb.53 ===============
>> 
>> Item was added:
>> + ----- Method: EncoderForNewsqueakV4>>maxIndexableLiterals (in category 'accessing') -----
>> + maxIndexableLiterals
>> +       "Answer the maximum number of literals supported by the receiver's
>> +        bytecode set."
>> +       ^65536!
>> 
>> Item was added:
>> + ----- Method: EncoderForSistaV1>>maxIndexableLiterals (in category 'accessing') -----
>> + maxIndexableLiterals
>> +       "Answer the maximum number of literals supported by the receiver's
>> +        bytecode set."
>> +       ^65536!


_,,,^..^,,,_ (phone)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160616/7cbb1511/attachment.htm


More information about the Vm-dev mailing list