<br><br><div class="gmail_quote">On Tue, Jul 14, 2009 at 1:38 PM, askoh <span dir="ltr"><<a href="mailto:askoh@askoh.com">askoh@askoh.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Thanks for the info for developing Cog. Are you using Slang to write the VM?</blockquote><div><br></div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Are you using something like InterpreterSimulator too?</blockquote><div><br></div><div>Yes. Except that the generated x86 machine code is executed by a virtual processor packaged as an external plugin built using the Bochs x86 PC simulator written in C++. The generated machine code is written into the same large ByteArray that houses the Smalltalk heap.</div>
<div><br></div><div>There are also a lot more classes involved</div><div> cogmethod.h:</div><div> CogBlockMethod/CogMethod - objects representing the headers of machine code methods</div><div> cointerp.c</div><div> ObjectMemory/NewObjectMemory/StackInterpreter/CoInterpreter - the interpreter and garbage collector hierarchy</div>
<div> CoInterpreterStackPages & CogSimpleStackPage - where stack frames live</div><div> cogit.c</div><div> Cogit/SimpleStackBasedCogit - the code generator hierarchy</div><div> CogObjectRepresentation/CogObjectRepresentationForSqueakV3 - the abstraction of object access so one can plug-in object representations</div>
<div> AbstractInstruction/CogIA32Compiler - the back-end hierarchy</div><div> CogMethodZone - where generated methods live</div><div> CogBlockStart, CogBytecodeDescriptor, CogBytecodeFixup, CogInstructionAnnotation, CogPrimitiveDescriptor - internal compiler data structures</div>
<div> CogRTLOpcodes - a pool of abstract 2-operand opcodes</div><div><br></div><div>a few of which have simulation subclasses. So its only a bit like InterpreterSimulator. I expect also to abstract out the garbage collector later this year so that the interpreter has the ObjectMemory as an instance variable so one can plug-in GC & object representation.</div>
<div><br></div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> Is Cog still written<br>
in Smalltalk, converted to C and compiled into an executable?<br>
</blockquote><div><br></div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Thanks,<br>
Aik-Siong Koh<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/debugging-plugin-and-virtual-machine-tp22314144p24486966.html" target="_blank">http://www.nabble.com/debugging-plugin-and-virtual-machine-tp22314144p24486966.html</a><br>
</font><div><div></div><div class="h5">Sent from the Squeak - Dev mailing list archive at Nabble.com.<br>
<br>
<br>
</div></div></blockquote></div><br>