%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/deps/v8/src/compiler/
Upload File :
Create Path :
Current File : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/deps/v8/src/compiler/js-heap-broker-inl.h

// Copyright 2023 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 V8_COMPILER_JS_HEAP_BROKER_INL_H_
#define V8_COMPILER_JS_HEAP_BROKER_INL_H_

#include "src/compiler/js-heap-broker.h"
#include "src/heap/parked-scope-inl.h"

namespace v8::internal::compiler {

V8_INLINE JSHeapBroker::RecursiveSharedMutexGuardIfNeeded::
    RecursiveSharedMutexGuardIfNeeded(LocalIsolate* local_isolate,
                                      base::SharedMutex* mutex,
                                      int* mutex_depth_address)
    : mutex_depth_address_(mutex_depth_address),
      initial_mutex_depth_(*mutex_depth_address_),
      shared_mutex_guard_(local_isolate, mutex, initial_mutex_depth_ == 0) {
  (*mutex_depth_address_)++;
}

V8_INLINE JSHeapBroker::MapUpdaterGuardIfNeeded::MapUpdaterGuardIfNeeded(
    JSHeapBroker* broker)
    : RecursiveSharedMutexGuardIfNeeded(broker->local_isolate_or_isolate(),
                                        broker->isolate()->map_updater_access(),
                                        &broker->map_updater_mutex_depth_) {}

V8_INLINE JSHeapBroker::BoilerplateMigrationGuardIfNeeded::
    BoilerplateMigrationGuardIfNeeded(JSHeapBroker* broker)
    : RecursiveSharedMutexGuardIfNeeded(
          broker->local_isolate_or_isolate(),
          broker->isolate()->boilerplate_migration_access(),
          &broker->boilerplate_migration_mutex_depth_) {}

}  // namespace v8::internal::compiler

#endif  // V8_COMPILER_JS_HEAP_BROKER_INL_H_

Zerion Mini Shell 1.0