Can webassembly/javascript be added? #4700
Replies: 5 comments 3 replies
-
we have an old issue about this @ #264 |
Beta Was this translation helpful? Give feedback.
-
Thankyou, Ill get started. I guess I need to first do a local setup before I can attempt to add the feature. I already have a local compilation of v8 so I can generate all the assembly and bytecode. (oh sorry I posted from my work account here) |
Beta Was this translation helpful? Give feedback.
-
So I now have a local setup of the app where I am able to generate the bytecode and asm for javascript as generated by v8. Bytecode is on the right and its on stdout. |
Beta Was this translation helpful? Give feedback.
-
Opened a PR: #4721 |
Beta Was this translation helpful? Give feedback.
-
d8 has a lot of flags to trace various things about compilation and execution. For example look for the word trace in this file: https://github.com/v8/v8/blob/master/src/flags/flag-definitions.h I think there should be some way to see the output of these in the compiler explorer. Would it be possible to add some features to show these? One example can be found in this web.dev blogpost where some tracing is done for optimizing some javascript. https://web.dev/performance-mystery/ From the above blogpost the visualization of the trace: I'm thinking there should be a way to watch these in the explorer as well. Would this be out of scope of compiler explorer? Since v8 is JITed, some real value can be gained from building the ability to see these traces easily. I don't think chrome dev tools allows us to see these things, so its a unique thing that is hard to do unless one goes and builds v8 on their own. |
Beta Was this translation helpful? Give feedback.
-
Hello,
the
d8
executable that is created when compilingv8
allows one to print out the bytecode for a javascript program by runningIt also allows flags like
--print-code
,--print-opt-code
and--print-wasm-code
to output the asm code generated from a javascript or webassembly input. Can godbolt support showing these outputs for javascript/wasm?Beta Was this translation helpful? Give feedback.
All reactions