[Vm-dev] VM Maker: VMMaker.oscog-cb.1795.mcz

Clément Bera bera.clement at gmail.com
Mon Apr 11 23:19:36 UTC 2016


I changed that method: genPrimitiveFullClosureValue to have the <option:
#SistaV1BytecodeSet> pragma. Thanks for noticing.

On Mon, Apr 11, 2016 at 2:33 PM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

>
> Hi Clement & Eliot,
>
> I had a doubt because genPrimitiveFullClosureValue is generated
> unconditionnally and test primitiveRoutine =
> #primitiveFullClosureValueNoContextSwitch, but maybe this method should be
> tagged <option: #SistaV1BytecodeSet> too...
>
> What if a primitive referenced thru primitiveTable i absent?
>
> 2016-04-11 23:26 GMT+02:00 Eliot Miranda <eliot.miranda at gmail.com>:
>
>>
>> Hi Nicolas,
>>
>>
>> On Apr 11, 2016, at 12:03 PM, Nicolas Cellier <
>> nicolas.cellier.aka.nice at gmail.com> wrote:
>>
>> Hi Clement,
>> currently primitiveFullClosureValueNoContextSwitch is not generated
>> unless:
>>     <option: #SistaV1BytecodeSet>
>>
>> Should we remove the option and always generate the primitive?
>>
>>
>>
>> IMO, no.  One needs the createFullClosure bytecode in the bytecode set
>> give able to generate it, and methods can have multiple option: pragmas.
>> So later on, if we wanted to we could add some other option to bring it
>> in.  But right now our plan is to move to the Sista bytecode set towards
>> the end of the year so that the new releases of Squeak & Pharo in 2017
>> would use it.
>>
>> Why do you want the VM to always include the primitive?
>>
>> _,,,^..^,,,_ (phone)
>>
>>
>> 2016-04-11 20:02 GMT+02:00 <commits at source.squeak.org>:
>>
>>>
>>> ClementBera uploaded a new version of VMMaker to project VM Maker:
>>> http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1795.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: VMMaker.oscog-cb.1795
>>> Author: cb
>>> Time: 11 April 2016, 11:01:37.99209 am
>>> UUID: 7e723234-b8d0-46a7-8e2c-180da3482a3b
>>> Ancestors: VMMaker.oscog-cb.1794
>>>
>>> Fixed minor things to make slang compilation happy.
>>>
>>> =============== Diff against VMMaker.oscog-cb.1794 ===============
>>>
>>> Item was changed:
>>>   ----- Method: Cogit>>computeFullBlockEntryOffsets (in category
>>> 'initialization') -----
>>>   computeFullBlockEntryOffsets
>>>         "Generate the entry code for a method to determine cmEntryOffset
>>> and cmNoCheckEntryOffset.  We
>>>          need cmNoCheckEntryOffset up front to be able to generate the
>>> map starting from cmNoCheckEntryOffset"
>>>         "stack allocate the various collections so that they
>>>          are effectively garbage collected on return."
>>> -       <var: 'sendMissCall' type: #'AbstractInstruction *'>
>>>         self allocateOpcodes: 24 bytecodes: 0.
>>>         methodOrBlockNumArgs := 0.
>>>         self compileFullBlockEntry.
>>>         self computeMaximumSizes.
>>>         self generateInstructionsAt: methodZoneBase + (self sizeof:
>>> CogMethod).
>>>         cbEntryOffset := fullBlockEntry address - methodZoneBase.
>>>         cbNoSwitchEntryOffset := fullBlockNoContextSwitchEntry address -
>>> methodZoneBase!
>>>
>>> Item was changed:
>>>   ----- Method: SimpleStackBasedCogit
>>> class>>initializePrimitiveTableForSqueak (in category 'class
>>> initialization') -----
>>>   initializePrimitiveTableForSqueak
>>>         "Initialize the table of primitive generators.  This does not
>>> include normal primitives implemented in the coInterpreter.
>>>          N.B. primitives that don't have an explicit arg count (the
>>> integer following the generator) may be variadic."
>>>         "SimpleStackBasedCogit initializePrimitiveTableForSqueak"
>>>         MaxCompiledPrimitiveIndex := self objectRepresentationClass
>>> wordSize = 8
>>>
>>>         ifTrue: [555]
>>>
>>>         ifFalse: [222].
>>>         primitiveTable := CArrayAccessor on: (Array new:
>>> MaxCompiledPrimitiveIndex + 1).
>>>         self table: primitiveTable from:
>>>         #(      "Integer Primitives (0-19)"
>>>
>>
>> SNIP ...
>>
>>>                 (207 genPrimitiveFullClosureValue)
>>> "value[:value:value:value:] et al"
>>>                 "(208 genPrimitiveFullClosureValueWithArgs)"
>>> "valueWithArguments:"
>>> +               (209 genPrimitiveFullClosureValue)
>>> "valueNoContextSwitch[:value:] et al"
>>> -               (209 genPrimitiveFullClosureValueNoContextSwitch)
>>> "valueNoContextSwitch[:value:] et al"
>>>
>>>
>> SNIP...
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160411/0faabd36/attachment.htm


More information about the Vm-dev mailing list