v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
hole-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_HOLE_INL_H_
6#define V8_OBJECTS_HOLE_INL_H_
7
8#include "src/objects/hole.h"
9// Include the non-inl header before the rest of the headers.
10
11#include "src/handles/handles.h"
15#include "src/objects/smi-inl.h"
17
18// Has to be the last include (doesn't have include guards):
20
21namespace v8 {
22namespace internal {
23
24OBJECT_CONSTRUCTORS_IMPL(Hole, HeapObject)
25
26void Hole::set_raw_numeric_value(uint64_t bits) {
27 base::WriteUnalignedValue<uint64_t>(field_address(kRawNumericValueOffset),
28 bits);
29}
30
32 DirectHandle<HeapNumber> numeric_value) {
33 hole->set_raw_numeric_value(numeric_value->value_as_bits());
34}
35
36} // namespace internal
37} // namespace v8
38
40
41#endif // V8_OBJECTS_HOLE_INL_H_
static void Initialize(Isolate *isolate, DirectHandle< Hole > hole, DirectHandle< HeapNumber > numeric_value)
Definition hole-inl.h:31
static void WriteUnalignedValue(Address p, V value)
Definition memory.h:41
#define OBJECT_CONSTRUCTORS_IMPL(Type, Super)