r/ProgrammingLanguages • u/sleepydevxd • Jun 17 '26
V8 Engine Feedback Vector
Hello everyone,
Recently, I'm looking into v8 JavaScript Engine and found out about FeedBack Vector, which I want to investigate more about it in order to understand how the Engine assigns type at runtime after being interpreted by Ignition.
Although I tried to compile the v8 source code and it was able to run a simple script on my machine, I can't seem to be able to get the information regarding Feedback Vector and the data inside it.
So far, I have tried to use some promising flags that are available:
+ --log-feedback-vector
+ --maglev-print-feedback
+ --invocation-count-for-feedback-allocation=1
+ --no-lazy-feedback-allocation
None of them are working - no output to the terminal after I ran it.
I followed this (old and maybe outdated) article:
- An Introduction to Speculative Optimization in V8
With the same code, I can not retrieve the same BinaryOp which I believe have changed after many updates. I want to avoid any "natives syntax", in general, but even when I included it (e.g. %DebugPrint(add);), it does not seem to give me the information that I wanted like in the article.
My goal is to analyse JavaScript's V8 bytecode and output the correct possible types of variables (similar to what Mytype do). So if I can have another way to work around this, it would be very appreciated!
I don't know if this is the right place to ask these kind of question. Therefore, I'm sorry in advanced if this caused any confusion.
Thank you everyone for your time.
View all comments
2
u/awoocent Jun 18 '26
What are you actually trying to do? If your goal is analyzing the bytecode ahead of time to predict types, then that's a totally different problem from runtime type speculation.