Hi there!
This mailing list helped me so many times, so I will give it another try :)
I am executing a javascript file containing a simple addition program as follows:
user@debugbox: v8/out/ia32.release/d8 --print_opt_code test.js
The addition in the program is called a few thousand times in a for loop to trigger the optimization.
When looking at the produced assembler code I wondered about its generation:
Sometimes, when executing different JS programs, similar ASM code is generated, which means, that different JS code is optimized into the same ASM (or similar ASM code).
So far so good. But is there something like a template, which specifies which JS code is translated into which ASM code?
I mean something like "If there is a JS assignment, use 'mov register, variable' in ASM".
Sorry, if the question is dumb. I just want to understand what's going on :)
Thanks!