A debugger, such as gdb or Microsoft Visual Studio, will show you the
machine code when your program stops at a break point or crashes.  The
--print-code option to V8, or the --js-flags="--print-code" option for
chromium (with sandboxing off) will print the generated code for each
function.  There is no support in the V8 API for exporting the
generated code programmatically.

This forum is not designed for answering questions as basic as this,
so you should use other sources for learning about development tools
and V8 basics.  Try reading the sample code in the sample directory,
and look at the flags in src/flag-definitions.h.

On Tue, Aug 23, 2011 at 8:29 AM, chbing <[email protected]> wrote:
> i saw the help docs say:
> "
> For example, the JavaScript code to access property x from a Point
> object is:
>
> point.x
>
> In V8, the machine code generated for accessing x is:
>
> # ebx = the point object
> cmp [ebx,<hidden class offset>],<cached hidden class>
> jne <inline cache miss>
> mov eax,[ebx, <cached x offset>]
> "
>
> my question is: how can i get the machine code when compiled my js?
>
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
>



-- 
William Hesse
Software Engineer
[email protected]

Google Denmark ApS
Frederiksborggade 20B, 1 sal
1360 København K
Denmark
CVR nr. 28 86 69 84

If you received this communication by mistake, please don't forward it
to anyone else (it may contain confidential or privileged
information), please erase all copies of it, including all
attachments, and please let the sender know it went to the wrong
person. Thanks.

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to