Re:How JavaScript works: inside the V8 engine
by mncharity on Monday August 21, 2017 @03:26PM
(#15067045)
Ignition/Turbofan has a new IR - IRHydra 1 and 2 won't help. For Turbofan there's https://github.com/v8/v8/tree/master/tools/turbolizer .
Re:How JavaScript works: inside the V8 engine
by mraleph on Monday August 21, 2017 @04:13PM
(#15067462)
You can still do
d8 --trace-turbo \
--trace-deopt \
--code-comments \
--redirect-code-traces \
--redirect-code-traces-to=code.asm \
--print-opt-code \
your-file.js
and load resulting turbo.cfg and code.asm into IRHydra.However most of the important features (like source and deopt-to-ir mapping) are broken.
I used to repair things in my free time - but I don't think I want to do it anymore.
Re:How JavaScript works: inside the V8 engine
by mncharity on Monday August 21, 2017 @04:50PM
(#15067770)
> I used to repair things in my free time
Oh! Thank you for all your work.
I noticed my current node wasn't dumping .cfg's, and assumed that data path had died with TF.
> but I don't think I want to do it anymore.
Nod. Programming languages - civilization critical infrastructure funded like kindergarten bake sales.
Re:How JavaScript works: inside the V8 engine
by pkozlowski_os on Monday August 21, 2017 @02:56PM
(#15066779)
Is the IRHydra is not working with the latest V8 pipeline (Ignition + Turbofan), AFAIK: https://github.com/mraleph/irhydra/issues/52#issuecomment-25...
I think the only workable approach is what you're doing - have an approximate idea of how the compiler works and make intelligent guesses about what will help. But when you're tuning at the level where changing the order of if statements makes a difference, you're at the level where next month's update may reverse your fix, so in a lot of cases it'll be questionable whether it's worth the effort.
[0] IRHydra - http://mrale.ph/irhydra/2/