v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
tagged-value.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_H_
6#define V8_OBJECTS_TAGGED_VALUE_H_
7
9
10#include "include/v8-internal.h"
12
13namespace v8 {
14namespace internal {
15
16// Almost same as Object but this one deals with in-heap and potentially
17// compressed representation of Objects and provide only limited functionality
18// which doesn't require decompression.
20 : public TaggedImpl<HeapObjectReferenceType::STRONG, Tagged_t> {
21 public:
22 constexpr StrongTaggedValue() : TaggedImpl() {}
23 explicit constexpr StrongTaggedValue(Tagged_t ptr) : TaggedImpl(ptr) {}
25
26 inline static Tagged<Object> ToObject(Isolate* isolate,
27 StrongTaggedValue object);
28};
29
30// Almost same as Tagged<MaybeObject> but this one deals with in-heap and
31// potentially compressed representation of Objects and provide only limited
32// functionality which doesn't require decompression.
33class TaggedValue : public TaggedImpl<HeapObjectReferenceType::WEAK, Tagged_t> {
34 public:
35 constexpr TaggedValue() : TaggedImpl() {}
36 explicit constexpr TaggedValue(Tagged_t ptr) : TaggedImpl(ptr) {}
38
39 inline static Tagged<MaybeObject> ToMaybeObject(Isolate* isolate,
40 TaggedValue object);
41};
42
43} // namespace internal
44} // namespace v8
45
46#endif // V8_OBJECTS_TAGGED_VALUE_H_
constexpr StrongTaggedValue(Tagged_t ptr)
static Tagged< Object > ToObject(Isolate *isolate, StrongTaggedValue object)
constexpr TaggedValue(Tagged_t ptr)
static Tagged< MaybeObject > ToMaybeObject(Isolate *isolate, TaggedValue object)
Address Tagged_t
Definition globals.h:547