Hi. Suppose I am doing something in #commonSend:
commonSend
"Send a message, starting lookup with the receiver's class."
"Assume: messageSelector and argumentCount have been set, and that
the receiver and arguments have been pushed onto the stack,"
"Note: This method is inlined into the interpreter dispatch loop."
<sharedCodeNamed: 'commonSend' inCase: 131>
self internalFindNewMethod.
self internalExecuteNewMethod.
self fetchNextBytecode
and somewhere there I want to do something like this:
(messageSelector = '#foo') ifTrue: [ self print: 'the message foo was
called'; cr ].
messageSelector is the instVar of Interpreter and it is already in the
stack.
Of course, the part that doesn't work is (messageSelector = '#foo')
I tried several things but I don't find how to do it.
Thank in advance
--
Mariano
http://marianopeck.wordpress.com
On Tue, Apr 19, 2011 at 7:32 PM, Mariano Martinez Peck <
marianopeck(a)gmail.com> wrote:
> Hi guys. Since several months, I wanted to create a little browser for
> learning VM and related stuff. I never did anything because I was lazy. Last
> week, I took Glamour and without knowing almost anything about it, in less
> than 3 hours, I come up with what I want to share with you. Basically, I
> only have the browsers for the moment. My knowledge is very limited in the
> Slang to C translator, or machine code simulation. The only thing I need is
> CompiledMethod >> #asCString and #asMachineCode. Eliot told me he was going
> to provide me such stuff for machine code, and hopefully Dave can help me
> with the C code.
>
> Having said that, I would like to share what I have in mind: there are 3
> browsers:
>
> 1) VMBrowserSlang: shows only packages and classes which are written in
> slang. When you select a method, you have 2 panels: smalltalk code and C
> translated code.
> Screenshot: http://img857.imageshack.us/i/vmbrowserslang.png/
>
> 2) VMBrowserMethods: shows all packages and classes of the system and for
> every method, you have 3 panels: smalltalk code, bytecodes and machine code
> (using the simple mapping)
> Screenshot: http://img862.imageshack.us/i/vmbrowsermethods.png/
>
> 3) VMBrowserMappings: this is for you Eliot!! Basically, it shows all
> packages and classes of the system and for every method, you have 5 panels:
> smalltalk code and one panel per strategy to map to machine code (simple
> cogit, sista, etc).
> Screenshot: http://img4.imageshack.us/f/vmbrowsermappings.png/
>
> As soon as someone can provide me the #asMachineCode and #asCString for
> Cog, I release it.
>
> What do you think ?
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
--
Mariano
http://marianopeck.wordpress.com
Hi guys. I think there is a mistake..."expert"??? No....I am FAR from being
an expert. I am just a newbie like you but that I try to share the minimum
I learn.
BTW, the video has a couple of mistakes I did that I want to share just in
case:
1) I downloaded git in an ugly directory (inside the build of another git
repository) and then I don't know why there was an error and I couldn't
download git sources again. So, I needed to stay with the ugly and confusing
directory.
2) When I debugged with XCode you could see there were a lot of '??' in the
debugger. This was wrong and it was because of a compiler flag in the Mac
builds. This was fixed a couple of days ago, what we were still using an old
version
3) when we put a flag in the method lookup for the #dnu it didn't work
because (I think) of the black magic that happens when executing things from
the workspace. If I would have evaluated the same code but from a method, it
should have worked
BTW, How can I have such an ugly voice? heheh
Cheers
Mariano
On Sun, Apr 17, 2011 at 8:55 AM, laurent laffont
<laurent.laffont(a)gmail.com>wrote:
>
> Hi,
>
> First video of PharoCasts with Experts serie.
>
> Mariano explainsuys. in a 1h30 HD video:
> - what the VM is made of
> - what are the different VM built by the Pharo project continuous
> integration server
> - how to get the platform sources from Gitorious
> - how to generate the interpreter sources using ConfigurationOfCogVM
> - build the VM
> - run and debug it with gdb and XCode
> - what Slang is and how to change it for debugging purposes
>
>
> Enjoy it here: http://www.pharocasts.com/2011/04/debug-cog-vm.html
>
> --
>
> Laurent Laffont - @lolgzs
>
> Pharo Smalltalk Screencasts: http://www.pharocasts.com/
> Blog: http://magaloma.blogspot.com/
> Developer group: http://cara74.seasidehosting.st
>
--
Mariano
http://marianopeck.wordpress.com
Hello,
I'm trying to build a Squeak VM for Mac iOS using a Pharo 1.2.1 image,
based on the instructions at
http://book.pharo-project.org/book/Virtual-Machine/Building/BuildVMOnOSX/.
I'm using snv rev 2330, since that's noted as compatible with VMMaker
1.4 (ConfigurationOfVMMaker-LaurentLaffon.20)
(FWIW I've tried every combination of revs 2330 and 2378, VMMaker 1.4
and 1.5. Pharo 1.1.1, 1,2,1, and 1.3).
If I check out revision 2330 (or 2378) and simply compile the 64-bit
Mac VM (non-Cog) in distribution config, I get
ld: duplicate symbol _createWindowWidthheightoriginXyattrlength
If I generate my own src directory from VMMaker (all internal plugins,
as shown below) and compile then I get:
[...]/platforms/iOS/vm/src/vm/intplugins/ObjectiveCPlugin/ObjectiveCPlugin.c:
No such file or directory
If I copy in the ObjectiveCPlugin folder from the non-generated src
folder then I get the duplicate symbol link error as above
I'm using Xcode 4, SDK Mac OSX 10.6
Thanks very much for any pointers - sorry if I missed something obvious
Jay
EXTERNAL_PLUGINS =
INTERNAL_PLUGINS = ADPCMCodecPlugin Squeak3D BMPReadWriterPlugin
B2DPlugin BitBltPlugin ClipboardExtendedPlugin CroquetPlugin DSAPrims
ZipPlugin SqueakFFIPrims FFTPlugin FT2Plugin FloatArrayPlugin
FloatMathPlugin GeniePlugin JPEGReaderPlugin Klatt LargeIntegers
MacMenubarPlugin Matrix2x3Plugin MiscPrimitivePlugin IA32ABI IA32ABI
QuicktimePlugin RePlugin SecurityPlugin SlangTestSupportPlugin
SlangTestSupportSSIP SoundCodecPrims SoundGenerationPlugin SoundPlugin
StarSqueakPlugin SurfacePlugin
On Thu, Apr 7, 2011 at 11:47 AM, Mariano Martinez Peck <
marianopeck(a)gmail.com> wrote:
>
>
> On Thu, Apr 7, 2011 at 11:37 AM, Torsten Bergmann <astares(a)gmx.de> wrote:
>
>>
>> I know how to build standard Vm from Squeakvm.org,
>> I'm also able to compile Eliots Cog from the same
>> SVN.
>>
>> But what if I want to go the "new" CMake way?
>> Where to start? Where are the files? Do I need git?
>> Is cmake for win32 ready?
>>
>>
> can you wait a couple of days (2 or 3) ? I am writing right now a blog
> post about that.
>
Anyway, here it is:
http://marianopeck.wordpress.com/2011/04/10/building-the-vm-from-scratch-us…
Any feedback is more than welcome.
Cheers
Mariano
>
>> Is there a short summary on the cmake work (state,
>> where to start)? Or is the mess even worse than before?
>>
>
> It is much better from my point of view. If you can wait my post, I hope I
> will make things clear.
>
>
>>
>> Thx
>> T.
>>
>> --
>> NEU: FreePhone - kostenlos mobil telefonieren und surfen!
>> Jetzt informieren: http://www.gmx.net/de/go/freephone
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
--
Mariano
http://marianopeck.wordpress.com
Hi folks. I will start a sequence of VM related posts called “Journey
through the VM”, similar to what Igor did in Deep Smalltalk
School<http://www.inria.fr/centre-de-recherche-inria/lille-nord-europe/agenda/smal…>.
My main focus is that a regular Smalltalker, without any knowledge in VM
stuff can understand the basis of it (ObjectMemory, Interpreter, etc). In
addition, I expect the reader can download, change, compile, run, and debug
(and why not fixing?) the VM.
Later on in the journey, I would also like to talk about what the compiler
does, what bytecodes are, how to read them, how they are mapped to the VM,
etc. I will also show some hooks or tricks that the VM provides and that are
not always known. Moreover, I will explain what a primitive is, how they are
executed by the VM, how you can write your own primitives, etc. FFI and
writing your own plugin are also in my plans.
It is important to notice that all these posts are thought for VM newbies. I
would appreciate if there can be some VM hackers paying attention that I
don't say stupid things.
http://marianopeck.wordpress.com/
Cheers