[squeak-dev] The Trunk: System-dtl.685.mcz
Eliot Miranda
eliot.miranda at gmail.com
Mon Sep 8 20:09:17 UTC 2014
On Mon, Sep 8, 2014 at 11:58 AM, Bert Freudenberg <bert at freudenbergs.de>
wrote:
> On 08.09.2014, at 20:45, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> On Sun, Sep 7, 2014 at 1:58 PM, <commits at source.squeak.org> wrote:
>
>> David T. Lewis uploaded a new version of System to project The Trunk:
>> http://source.squeak.org/trunk/System-dtl.685.mcz
>>
>> ==================== Summary ====================
>>
>> Name: System-dtl.685
>> Author: dtl
>> Time: 7 September 2014, 4:58:15.377 pm
>> UUID: 55eba121-23d3-41cc-9525-52554adac2ec
>> Ancestors: System-eem.684
>>
>> Smalltalk isRunningCog should answer false for an interpreter VM
>>
>> =============== Diff against System-eem.684 ===============
>>
>> Item was changed:
>> ----- Method: SmalltalkImage>>isRunningCog (in category 'system
>> attributes') -----
>> isRunningCog
>> "Answers if we're running on a Cog VM (JIT or StackInterpreter)"
>>
>> + ^( [self vmParameterAt: 42] on: Error do: [] )
>> - ^(self vmParameterAt: 42)
>> ifNil: [false]
>> ifNotNil: [:numStackPages| numStackPages > 0]!
>>
>
> Instead of creating an exception handler why not modify the interpreter to
> answer nil? I know the answer is that the Interpreter doesn't, and fails.
> But we've had years in which we could change the Interpreter to match
> vmParameterAt: and instead of doing the good thing (have the Interpreter
> answer nil for values answered by Cog VMs), we force the standard system to
> waste time. We should optimize the common case (trunk running on Cog) not
> penalize it to cover the uncommon case (trunk running on Interpreter VM).
>
>
> Nah, if performance really was an issue we could just remove the
> primitiveFailed in vmParameterAt:. No need to change the VM.
>
That's a good idea. Change the primitiveFailed to ^nil.
--
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140908/c2284861/attachment.htm
More information about the Squeak-dev
mailing list
|