v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
tagged-value-inl.h
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
5#ifndef V8_OBJECTS_TAGGED_VALUE_INL_H_
6#define V8_OBJECTS_TAGGED_VALUE_INL_H_
7
9// Include the non-inl header before the rest of the headers.
10
11#include "include/v8-internal.h"
14#include "src/objects/objects.h"
15#include "src/objects/oddball.h"
17#include "src/roots/roots-inl.h"
18
19namespace v8 {
20namespace internal {
21
23 :
24#ifdef V8_COMPRESS_POINTERS
25 TaggedImpl(V8HeapCompressionScheme::CompressObject(o.ptr()))
26#else
27 TaggedImpl(o.ptr())
28#endif
29{
30}
31
33 StrongTaggedValue object) {
34#ifdef V8_COMPRESS_POINTERS
35 return Tagged<Object>(
37#else
38 return Tagged<Object>(object.ptr());
39#endif
40}
41
43 :
44#ifdef V8_COMPRESS_POINTERS
45 TaggedImpl(V8HeapCompressionScheme::CompressAny(o.ptr()))
46#else
47 TaggedImpl(o.ptr())
48#endif
49{
50}
51
53 TaggedValue object) {
54#ifdef V8_COMPRESS_POINTERS
57#else
58 return Tagged<MaybeObject>(object.ptr());
59#endif
60}
61
62} // namespace internal
63} // namespace v8
64
65#endif // V8_OBJECTS_TAGGED_VALUE_INL_H_
static Tagged< Object > ToObject(Isolate *isolate, StrongTaggedValue object)
static Tagged< MaybeObject > ToMaybeObject(Isolate *isolate, TaggedValue object)
static V8_INLINE Address DecompressTagged(TOnHeapAddress on_heap_addr, Tagged_t raw_value)
Tagged(T object) -> Tagged< T >