Commit 2523e6c1 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[handles] Use v8_flags for accessing flag values

Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=dinfuehr@chromium.org

Bug: v8:12887
Change-Id: Icc9e1d2db58999b676477924284f78043cf5533c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899124Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83263}
parent 1047e423
...@@ -817,7 +817,7 @@ Handle<Object> GlobalHandles::CopyGlobal(Address* location) { ...@@ -817,7 +817,7 @@ Handle<Object> GlobalHandles::CopyGlobal(Address* location) {
GlobalHandles* global_handles = GlobalHandles* global_handles =
Node::FromLocation(location)->global_handles(); Node::FromLocation(location)->global_handles();
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
if (i::FLAG_verify_heap) { if (v8_flags.verify_heap) {
Object(*location).ObjectVerify(global_handles->isolate()); Object(*location).ObjectVerify(global_handles->isolate());
} }
#endif // VERIFY_HEAP #endif // VERIFY_HEAP
...@@ -847,7 +847,7 @@ void GlobalHandles::CopyTracedReference(const Address* const* from, ...@@ -847,7 +847,7 @@ void GlobalHandles::CopyTracedReference(const Address* const* from,
TracedNode::Verify(from); TracedNode::Verify(from);
TracedNode::Verify(to); TracedNode::Verify(to);
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
if (i::FLAG_verify_heap) { if (v8_flags.verify_heap) {
Object(**to).ObjectVerify(global_handles->isolate()); Object(**to).ObjectVerify(global_handles->isolate());
} }
#endif // VERIFY_HEAP #endif // VERIFY_HEAP
...@@ -1022,7 +1022,7 @@ void GlobalHandles::IterateWeakRootsForPhantomHandles( ...@@ -1022,7 +1022,7 @@ void GlobalHandles::IterateWeakRootsForPhantomHandles(
void GlobalHandles::ComputeWeaknessForYoungObjects( void GlobalHandles::ComputeWeaknessForYoungObjects(
WeakSlotCallback is_unmodified) { WeakSlotCallback is_unmodified) {
if (!FLAG_reclaim_unmodified_wrappers) return; if (!v8_flags.reclaim_unmodified_wrappers) return;
// Treat all objects as roots during incremental marking to avoid corrupting // Treat all objects as roots during incremental marking to avoid corrupting
// marking worklists. // marking worklists.
...@@ -1068,7 +1068,7 @@ void GlobalHandles::ProcessWeakYoungObjects( ...@@ -1068,7 +1068,7 @@ void GlobalHandles::ProcessWeakYoungObjects(
} }
} }
if (!FLAG_reclaim_unmodified_wrappers) return; if (!v8_flags.reclaim_unmodified_wrappers) return;
auto* const handler = isolate()->heap()->GetEmbedderRootsHandler(); auto* const handler = isolate()->heap()->GetEmbedderRootsHandler();
for (TracedNode* node : traced_young_nodes_) { for (TracedNode* node : traced_young_nodes_) {
...@@ -1220,7 +1220,7 @@ void GlobalHandles::PostGarbageCollectionProcessing( ...@@ -1220,7 +1220,7 @@ void GlobalHandles::PostGarbageCollectionProcessing(
DCHECK_EQ(Heap::NOT_IN_GC, isolate_->heap()->gc_state()); DCHECK_EQ(Heap::NOT_IN_GC, isolate_->heap()->gc_state());
const bool synchronous_second_pass = const bool synchronous_second_pass =
FLAG_optimize_for_size || FLAG_predictable || v8_flags.optimize_for_size || v8_flags.predictable ||
isolate_->heap()->IsTearingDown() || isolate_->heap()->IsTearingDown() ||
(gc_callback_flags & (gc_callback_flags &
(kGCCallbackFlagForced | kGCCallbackFlagCollectAllAvailableGarbage | (kGCCallbackFlagForced | kGCCallbackFlagCollectAllAvailableGarbage |
......
...@@ -115,7 +115,7 @@ HandleScope& HandleScope::operator=(HandleScope&& other) V8_NOEXCEPT { ...@@ -115,7 +115,7 @@ HandleScope& HandleScope::operator=(HandleScope&& other) V8_NOEXCEPT {
void HandleScope::CloseScope(Isolate* isolate, Address* prev_next, void HandleScope::CloseScope(Isolate* isolate, Address* prev_next,
Address* prev_limit) { Address* prev_limit) {
#ifdef DEBUG #ifdef DEBUG
int before = FLAG_check_handle_count ? NumberOfHandles(isolate) : 0; int before = v8_flags.check_handle_count ? NumberOfHandles(isolate) : 0;
#endif #endif
DCHECK_NOT_NULL(isolate); DCHECK_NOT_NULL(isolate);
HandleScopeData* current = isolate->handle_scope_data(); HandleScopeData* current = isolate->handle_scope_data();
...@@ -136,7 +136,7 @@ void HandleScope::CloseScope(Isolate* isolate, Address* prev_next, ...@@ -136,7 +136,7 @@ void HandleScope::CloseScope(Isolate* isolate, Address* prev_next,
static_cast<size_t>(reinterpret_cast<Address>(limit) - static_cast<size_t>(reinterpret_cast<Address>(limit) -
reinterpret_cast<Address>(current->next))); reinterpret_cast<Address>(current->next)));
#ifdef DEBUG #ifdef DEBUG
int after = FLAG_check_handle_count ? NumberOfHandles(isolate) : 0; int after = v8_flags.check_handle_count ? NumberOfHandles(isolate) : 0;
DCHECK_LT(after - before, kCheckHandleThreshold); DCHECK_LT(after - before, kCheckHandleThreshold);
DCHECK_LT(before, kCheckHandleThreshold); DCHECK_LT(before, kCheckHandleThreshold);
#endif #endif
......
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