Commit 0ad40c42 authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[heap] Fix -Wshadow warnings in src/heap/heap.cc

Bug: v8:12244, v8:12245
Change-Id: Iaa2d8be352bbe03882f531cc66ab36c15b2b2a75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3182227
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77051}
parent 58249ba6
...@@ -792,16 +792,16 @@ void Heap::PrintRetainingPath(HeapObject target, RetainingPathOption option) { ...@@ -792,16 +792,16 @@ void Heap::PrintRetainingPath(HeapObject target, RetainingPathOption option) {
} }
int distance = static_cast<int>(retaining_path.size()); int distance = static_cast<int>(retaining_path.size());
for (auto node : retaining_path) { for (auto node : retaining_path) {
HeapObject object = node.first; HeapObject node_object = node.first;
bool ephemeron = node.second; bool node_ephemeron = node.second;
PrintF("\n"); PrintF("\n");
PrintF("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); PrintF("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
PrintF("Distance from root %d%s: ", distance, PrintF("Distance from root %d%s: ", distance,
ephemeron ? " (ephemeron)" : ""); node_ephemeron ? " (ephemeron)" : "");
object.ShortPrint(); node_object.ShortPrint();
PrintF("\n"); PrintF("\n");
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
object.Print(); node_object.Print();
PrintF("\n"); PrintF("\n");
#endif #endif
--distance; --distance;
...@@ -1179,8 +1179,8 @@ void Heap::ProcessPretenuringFeedback() { ...@@ -1179,8 +1179,8 @@ void Heap::ProcessPretenuringFeedback() {
// Step 2: Pretenure allocation sites for manual requests. // Step 2: Pretenure allocation sites for manual requests.
if (allocation_sites_to_pretenure_) { if (allocation_sites_to_pretenure_) {
while (!allocation_sites_to_pretenure_->empty()) { while (!allocation_sites_to_pretenure_->empty()) {
auto site = allocation_sites_to_pretenure_->Pop(); auto pretenure_site = allocation_sites_to_pretenure_->Pop();
if (PretenureAllocationSiteManually(isolate_, site)) { if (PretenureAllocationSiteManually(isolate_, pretenure_site)) {
trigger_deoptimization = true; trigger_deoptimization = true;
} }
} }
...@@ -1776,7 +1776,7 @@ bool Heap::CollectGarbage(AllocationSpace space, ...@@ -1776,7 +1776,7 @@ bool Heap::CollectGarbage(AllocationSpace space,
AllowGarbageCollection allow_gc; AllowGarbageCollection allow_gc;
AllowJavascriptExecution allow_js(isolate()); AllowJavascriptExecution allow_js(isolate());
TRACE_GC(tracer(), GCTracer::Scope::HEAP_EXTERNAL_PROLOGUE); TRACE_GC(tracer(), GCTracer::Scope::HEAP_EXTERNAL_PROLOGUE);
VMState<EXTERNAL> state(isolate_); VMState<EXTERNAL> callback_state(isolate_);
HandleScope handle_scope(isolate_); HandleScope handle_scope(isolate_);
CallGCPrologueCallbacks(gc_type, kNoGCCallbackFlags); CallGCPrologueCallbacks(gc_type, kNoGCCallbackFlags);
} }
...@@ -1812,7 +1812,7 @@ bool Heap::CollectGarbage(AllocationSpace space, ...@@ -1812,7 +1812,7 @@ bool Heap::CollectGarbage(AllocationSpace space,
AllowGarbageCollection allow_gc; AllowGarbageCollection allow_gc;
AllowJavascriptExecution allow_js(isolate()); AllowJavascriptExecution allow_js(isolate());
TRACE_GC(tracer(), GCTracer::Scope::HEAP_EXTERNAL_EPILOGUE); TRACE_GC(tracer(), GCTracer::Scope::HEAP_EXTERNAL_EPILOGUE);
VMState<EXTERNAL> state(isolate_); VMState<EXTERNAL> callback_state(isolate_);
HandleScope handle_scope(isolate_); HandleScope handle_scope(isolate_);
CallGCEpilogueCallbacks(gc_type, gc_callback_flags); CallGCEpilogueCallbacks(gc_type, gc_callback_flags);
} }
......
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