v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
global-context.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
7namespace v8 {
8namespace internal {
9namespace torque {
10
12 : collect_language_server_data_(false),
13 collect_kythe_data_(false),
14 force_assert_statements_(false),
15 annotate_ir_(false),
16 ast_(std::move(ast)) {
17 CurrentScope::Scope current_scope(nullptr);
18 CurrentSourcePosition::Scope current_source_position(
19 SourcePosition{CurrentSourceFile::Get(), LineAndColumn::Invalid(),
22 RegisterDeclarable(std::make_unique<Namespace>(kBaseNamespaceName));
23}
24
26 : tagged_size_(force_32bit ? sizeof(int32_t) : kTaggedSize),
27 raw_ptr_size_(force_32bit ? sizeof(int32_t) : kSystemPointerSize),
28 smi_tag_and_shift_size_(
30 : kSmiShiftSize)),
31 external_ptr_size_(force_32bit ? sizeof(int32_t)
33 cppheap_ptr_size_(force_32bit ? sizeof(int32_t)
35 trusted_ptr_size_(force_32bit ? sizeof(int32_t) : kTrustedPointerSize) {}
36
37} // namespace torque
38} // namespace internal
39} // namespace v8
GlobalContext(GlobalContext &&) V8_NOEXCEPT=default
T * RegisterDeclarable(std::unique_ptr< T > d)
STL namespace.
static const char *const kBaseNamespaceName
Definition utils.h:321
constexpr int kTaggedSize
Definition globals.h:542
const int kApiInt32Size
Definition v8-internal.h:67
const int kSmiTagSize
Definition v8-internal.h:87
constexpr int kSystemPointerSize
Definition globals.h:410
constexpr int kExternalPointerSlotSize
Definition globals.h:613
constexpr int kTrustedPointerSize
Definition globals.h:637
const int kSmiShiftSize
constexpr int kCppHeapPointerSlotSize
Definition globals.h:622