As an educational exercise, I'd like to inspect disassembled JS generated 
by JS, and compare both the optimized and unoptimized versions to see what 
changes and what doesn't.

In Vyacheslav Egorov's JSConf 2012 excellent slides 
(http://s3.mrale.ph/jsconf2012.pdf) he recommends compiling V8 like so:

=====
make ia32.release objectprint=on \
  disassembler=on

out/ia32.release/d8 --print-opt-code \
  --code-comments \
  --trace-hydrogen \
  test.js
=====

which will enable the disassembler for introspection by the curious.

I'm having a little trouble understanding the current state of affairs, 
though:

0. Is this the best way of doing things? How do I generate the 
*unoptimized* JS versus the *optimized* JS for test.js in this example?

1. Are Hydrogen and Crankshaft still relevant? For example, my limited 
understanding is that TurboFan will be replacing 
Hydrogen: https://codereview.chromium.org/426233002
Is there somewhere I can read about the relevance and lifecycle of 
different pieces like Hydrogen and Crankshaft and how they play a role in 
code generation/optimization?

2. Why does Vyacheslav suggest using --trace-hydrogen? Is that needed to 
see the disassembly?

Thanks for your help!

best,
~ jf

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to