v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
thread-local-top.cc
Go to the documentation of this file.
1// Copyright 2019 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
6
10
11#if V8_ENABLE_WEBASSEMBLY
13#endif // V8_ENABLE_WEBASSEMBLY
14
15namespace v8 {
16namespace internal {
17
48
50 Clear();
53#if V8_ENABLE_WEBASSEMBLY
54 thread_in_wasm_flag_address_ = reinterpret_cast<Address>(
57#endif // V8_ENABLE_WEBASSEMBLY
58#ifdef USE_SIMULATOR
59 simulator_ = Simulator::current(isolate);
60#endif
61}
62
64
65#if defined(USE_SIMULATOR)
66void ThreadLocalTop::StoreCurrentStackPosition() {
67 last_api_entry_ = simulator_->get_sp();
68}
69#elif defined(V8_USE_ADDRESS_SANITIZER)
70void ThreadLocalTop::StoreCurrentStackPosition() {
71 last_api_entry_ = reinterpret_cast<Address>(GetCurrentStackPosition());
72}
73#endif
74
75} // namespace internal
76} // namespace v8
static ThreadId Current()
Definition thread-id.h:32
ExternalCallbackScope * external_callback_scope_
const v8::Context::BackupIncumbentScope * top_backup_incumbent_scope_
v8::FailedAccessCheckCallback failed_access_check_callback_
EmbedderState * current_embedder_state_
std::atomic< ThreadId > thread_id_
Tagged< Context > topmost_script_having_context_
Isolate * isolate
uintptr_t GetCurrentStackPosition()
Definition utils.cc:222
static constexpr Address kNullAddress
Definition v8-internal.h:53
@ EXTERNAL
Definition v8-unwinder.h:43