Question about JIT Compiling...

gopunk

Lifer
Jul 7, 2001
29,239
2
0
how does it translate into native machine language? like, how does it know how to do that? did people have to write instructions on how to translate, for every different CPU architecture? or was there a simpler way?

sorry if this is a dumb question.... i don't know that much about this stuff :p
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
It's not an ignorant question, and there are many techniques to do so. Rather than try to explain them all, download MS' shared source CLI and have a look at FJit::jitCompile in fjitcompiler.cpp under clr\src. This is of course just one technique, but it will explain things far better than anyone could through a post.

Have fun! Post back here if you have any questions. I've extended the process by adding a few of my own opcodes as well...

[edit]link broke, fixed[/edit]
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
thanks! can't really look at it now, it's tarball so it'll require putting the thing on a unix machine... but i'll post back after i have a look. thanks.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
It is a tarball, but you can extract it with Winzip and look at it on your Windows boxen if you like.

 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
hmm, i don't have winzip because i find xp's thing to be sufficient... can't figure out how to use it to open this file though.. i think i'll just have to upload it to another machine