v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
platform.cc
Go to the documentation of this file.
1
// Copyright 2023 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "
src/base/platform/platform.h
"
6
7
namespace
v8
{
8
namespace
base
{
9
10
namespace
{
11
12
// A pointer to current thread's stack beginning.
13
thread_local
void
* thread_stack_start =
nullptr
;
14
15
}
// namespace
16
17
// static
18
Stack::StackSlot
Stack::GetStackStartUnchecked
() {
19
if
(!thread_stack_start) {
20
thread_stack_start =
ObtainCurrentThreadStackStart
();
21
}
22
return
thread_stack_start;
23
}
24
25
// static
26
Stack::StackSlot
Stack::GetStackStart
() {
return
GetStackStartUnchecked
(); }
27
28
// static
29
int
OS::GetCurrentThreadId
() {
30
static
thread_local
int
id
=
GetCurrentThreadIdInternal
();
31
return
id;
32
}
33
34
}
// namespace base
35
}
// namespace v8
v8::base::OS::GetCurrentThreadIdInternal
static int GetCurrentThreadIdInternal()
Definition
platform-posix.cc:847
v8::base::OS::GetCurrentThreadId
static int GetCurrentThreadId()
Definition
platform.cc:29
v8::base::Stack::GetStackStartUnchecked
static StackSlot GetStackStartUnchecked()
Definition
platform.cc:18
v8::base::Stack::GetStackStart
static StackSlot GetStackStart()
Definition
platform-starboard.cc:491
v8::base::Stack::ObtainCurrentThreadStackStart
static Stack::StackSlot ObtainCurrentThreadStackStart()
Definition
platform-aix.cc:139
base
OpIndex base
Definition
instruction-selector-ia32.cc:65
v8
Definition
api-arguments-inl.h:19
platform.h
v8::base::Stack::StackSlot
Definition
platform.h:646
src
base
platform
platform.cc
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0