<div dir="ltr">I am using the following version:<div><br></div><div style>VMMaker</div><div style>oscog-EstebanLorenzano.236</div><div style><br></div><div style>Phil</div><div style><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/4/11 Igor Stasenko <span dir="ltr"><<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 11 April 2013 18:00, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Thu, Apr 11, 2013 at 2:11 AM, <a href="mailto:phil@highoctane.be">phil@highoctane.be</a> <<a href="mailto:phil@highoctane.be">phil@highoctane.be</a>> wrote:<br>
>><br>
>><br>
>> Hello,<br>
>><br>
>> I've been working on getting the simulator to work from VMMaker.<br>
>><br>
>> Now, I can load my 6505 formatted image inside the simulator and it looks okay (from what I can inspect).<br>
>><br>
>> Then, I am now running the test of the sim:<br>
>><br>
>> test<br>
>> transcript clear.<br>
>> byteCount := 0.<br>
>> quitBlock := [^ self].<br>
>> self internalizeIPandSP.<br>
>> self fetchNextBytecode.<br>
>> [true] whileTrue:<br>
>> [self dispatchOn: currentBytecode in: BytecodeTable.<br>
>> byteCount := byteCount + 1.<br>
>> byteCount \\ 10000 = 0 ifTrue: [self fullDisplay]].<br>
>> self externalizeIPandSP.<br>
>><br>
>><br>
>> and I hit an issue:<br>
>><br>
>> MNU: isInstanceOfClassFloat: oop.<br>
>> InterpreterSimulatorLSB(Interpreter)>>floatValueOf:<br>
>> InterpreterSimulatorLSB(Interpreter)>>loadFloatOrIntFrom:<br>
>> InterpreterSimulatorLSB(Interpreter)>>primitiveFloatEqual:toArg:<br>
>> InterpreterSimulatorLSB(Interpreter)>>bytecodePrimEqual<br>
>> InterpreterSimulatorLSB(InterpreterSimulator)>>dispatchOn:in:<br>
>> InterpreterSimulatorLSB(InterpreterSimulator)>>test<br>
>> UndefinedObject>>DoIt<br>
>><br>
>> This happens here:<br>
>><br>
>> floatValueOf: oop<br>
>> "Answer the C double precision floating point value of the argument,<br>
>> or fail if it is not a Float, and answer 0.<br>
>> Note: May be called by translated primitive code."<br>
>><br>
>> | isFloat result |<br>
>> <returnTypeC: #double><br>
>> <var: #result type: #double><br>
>> isFloat := self isInstanceOfClassFloat: oop.<br>
>> isFloat ifTrue:<br>
>> [self cCode: '' inSmalltalk: [result := Float new: 2].<br>
>> self fetchFloatAt: oop + BaseHeaderSize into: result.<br>
>> ^result].<br>
>> self primitiveFail.<br>
>> ^0.0<br>
>><br>
>> There is such a method in IntepreterPrimitives, but not in the Interpreter itself nor parents.<br>
>><br>
>> InterpreterPrimitives>>isInstanceOfClassFloat: oop<br>
>> <inline: true><br>
>> "N.B. Because Slang always inlines is:instanceOf:compactClassIndex:<br>
>> (because is:instanceOf:compactClassIndex: has an inline: pragma) the<br>
>> phrase (objectMemory splObj: ClassFloat) is expanded in-place and is<br>
>> _not_ evaluated if oop has a non-zero CompactClassIndex."<br>
>> ^objectMemory<br>
>> is: oop<br>
>> instanceOf: (objectMemory splObj: ClassFloat)<br>
>> compactClassIndex: ClassFloatCompactIndex<br>
>><br>
>> Clues?<br>
><br>
><br>
> Just copy the method into Interpreter and replace objectMemory with self. But I don't understand which VMMsker you're using. In David Lewis' trunk, e.g. VMMaker-dtl.316, Interpreter inherits from InterpreterPrimitives.<br>
<br>
It its Cog branch, i think.<br>
<br>
><br>
>><br>
>><br>
>> Phil<br>
>><br>
><br>
><br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> best,<br>
> Eliot<br>
><br>
<br>
<br>
<br>
--<br>
Best regards,<br>
Igor Stasenko.<br>
<br>
</font></span></blockquote></div><br></div>