v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
dependent-code-inl.h
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#ifndef V8_OBJECTS_DEPENDENT_CODE_INL_H_
6#define V8_OBJECTS_DEPENDENT_CODE_INL_H_
7
9// Include the non-inl header before the rest of the headers.
10
13#include "src/objects/tagged.h"
14
15// Has to be the last include (doesn't have include guards):
17
18namespace v8 {
19namespace internal {
20
21OBJECT_CONSTRUCTORS_IMPL(DependentCode, WeakArrayList)
22
23// static
24template <typename ObjectT>
26 DependencyGroups groups) {
27 static_assert(kTaggedCanConvertToRawObjects);
28 DeoptimizeDependencyGroups(isolate, Tagged<ObjectT>(object), groups);
29}
30
31// static
32template <typename ObjectT>
34 Tagged<ObjectT> object,
35 DependencyGroups groups) {
36 // Shared objects are designed to never invalidate code.
39 object->dependent_code()->DeoptimizeDependencyGroups(isolate, groups);
40}
41
42// static
43template <typename ObjectT>
45 Tagged<ObjectT> object,
46 DependencyGroups groups) {
47 // Shared objects are designed to never invalidate code.
50 return object->dependent_code()->MarkCodeForDeoptimization(isolate, groups);
51}
52
53} // namespace internal
54} // namespace v8
55
57
58#endif // V8_OBJECTS_DEPENDENT_CODE_INL_H_
static void DeoptimizeDependencyGroups(Isolate *isolate, ObjectT object, DependencyGroups groups)
static bool MarkCodeForDeoptimization(Isolate *isolate, Tagged< ObjectT > object, DependencyGroups groups)
static V8_INLINE bool InReadOnlySpace(Tagged< HeapObject > object)
static V8_INLINE bool InAnySharedSpace(Tagged< HeapObject > object)
static constexpr bool kTaggedCanConvertToRawObjects
Definition tagged.h:329
#define OBJECT_CONSTRUCTORS_IMPL(Type, Super)
#define DCHECK(condition)
Definition logging.h:482