After Debugging in the V8 source code, I really cannot figure out what is the MarkDependentCodeForDeoptimization(); which is called in function MarkCompactCollector::ClearNonLiveReferences() used for?
I find it will clear the references of weak objects embedded in JIT optimized code.
What is a weak_object and what dose it mean by embedded_object can it be a simple Smi Or String? And the most important thing is, what is the realtionship with deoptimization?
It will be more helpful if you can provided an example of js code with simple string's definition and operation.