Commit ea496d13 authored by Rudi Chen's avatar Rudi Chen

Scan GC references stored in rewriter during the rewrite.

A GC could happen during the rewrite.
parent 41b8dbc3
......@@ -1389,6 +1389,12 @@ void Rewriter::addDependenceOn(ICInvalidator& invalidator) {
void Rewriter::gc_visit(GCVisitor* visitor) {
rewrite->gc_visit(visitor);
// A GC could happen during a rewrite, so we need to scan the list of references
// both as it is being built and after the rewrite commits.
for (auto& reference : gc_references) {
visitor->visitNonRelocatable(reference);
}
}
Location Rewriter::allocScratch() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment