5#ifndef INCLUDE_V8_TYPED_ARRAY_H_
6#define INCLUDE_V8_TYPED_ARRAY_H_
27 static constexpr size_t kMaxByteLength = ArrayBuffer::kMaxByteLength;
29#ifdef V8_ENABLE_SANDBOX
31 v8::internal::kMaxSafeBufferSizeForSandbox);
41#ifdef V8_ENABLE_CHECKS
49 static void CheckCast(
Value* obj);
60 static constexpr size_t kMaxLength =
61 TypedArray::kMaxByteLength /
sizeof(uint8_t);
62 static_assert(
sizeof(uint8_t) == 1);
65 size_t byte_offset,
size_t length);
72 std::span<const uint8_t> data);
74#ifdef V8_ENABLE_CHECKS
82 static void CheckCast(
Value* obj);
93 static constexpr size_t kMaxLength =
94 TypedArray::kMaxByteLength /
sizeof(uint8_t);
95 static_assert(
sizeof(uint8_t) == 1);
98 size_t byte_offset,
size_t length);
100#ifdef V8_ENABLE_CHECKS
108 static void CheckCast(
Value* obj);
119 static constexpr size_t kMaxLength =
120 TypedArray::kMaxByteLength /
sizeof(int8_t);
121 static_assert(
sizeof(int8_t) == 1);
124 size_t byte_offset,
size_t length);
126#ifdef V8_ENABLE_CHECKS
134 static void CheckCast(
Value* obj);
145 static constexpr size_t kMaxLength =
146 TypedArray::kMaxByteLength /
sizeof(uint16_t);
147 static_assert(
sizeof(uint16_t) == 2);
150 size_t byte_offset,
size_t length);
152#ifdef V8_ENABLE_CHECKS
160 static void CheckCast(
Value* obj);
171 static constexpr size_t kMaxLength =
172 TypedArray::kMaxByteLength /
sizeof(int16_t);
173 static_assert(
sizeof(int16_t) == 2);
176 size_t byte_offset,
size_t length);
178#ifdef V8_ENABLE_CHECKS
186 static void CheckCast(
Value* obj);
197 static constexpr size_t kMaxLength =
198 TypedArray::kMaxByteLength /
sizeof(uint32_t);
199 static_assert(
sizeof(uint32_t) == 4);
202 size_t byte_offset,
size_t length);
204#ifdef V8_ENABLE_CHECKS
212 static void CheckCast(
Value* obj);
223 static constexpr size_t kMaxLength =
224 TypedArray::kMaxByteLength /
sizeof(int32_t);
225 static_assert(
sizeof(int32_t) == 4);
228 size_t byte_offset,
size_t length);
230#ifdef V8_ENABLE_CHECKS
238 static void CheckCast(
Value* obj);
246 static constexpr size_t kMaxLength =
247 TypedArray::kMaxByteLength /
sizeof(uint16_t);
250 size_t byte_offset,
size_t length);
252#ifdef V8_ENABLE_CHECKS
260 static void CheckCast(
Value* obj);
271 static constexpr size_t kMaxLength =
272 TypedArray::kMaxByteLength /
sizeof(float);
273 static_assert(
sizeof(float) == 4);
276 size_t byte_offset,
size_t length);
278#ifdef V8_ENABLE_CHECKS
286 static void CheckCast(
Value* obj);
297 static constexpr size_t kMaxLength =
298 TypedArray::kMaxByteLength /
sizeof(double);
299 static_assert(
sizeof(double) == 8);
302 size_t byte_offset,
size_t length);
304#ifdef V8_ENABLE_CHECKS
312 static void CheckCast(
Value* obj);
323 static constexpr size_t kMaxLength =
324 TypedArray::kMaxByteLength /
sizeof(int64_t);
325 static_assert(
sizeof(int64_t) == 8);
328 size_t byte_offset,
size_t length);
330#ifdef V8_ENABLE_CHECKS
338 static void CheckCast(
Value* obj);
349 static constexpr size_t kMaxLength =
350 TypedArray::kMaxByteLength /
sizeof(uint64_t);
351 static_assert(
sizeof(uint64_t) == 8);
354 size_t byte_offset,
size_t length);
356#ifdef V8_ENABLE_CHECKS
364 static void CheckCast(
Value* obj);
Definition: v8-array-buffer.h:472
Definition: v8-typed-array.h:318
static Local< BigInt64Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
static BigInt64Array * Cast(Value *value)
Definition: v8-typed-array.h:329
Definition: v8-typed-array.h:344
static Local< BigUint64Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
static BigUint64Array * Cast(Value *value)
Definition: v8-typed-array.h:355
Definition: v8-typed-array.h:244
static Float16Array * Cast(Value *value)
Definition: v8-typed-array.h:251
static Local< Float16Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:266
static Local< Float32Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
static Float32Array * Cast(Value *value)
Definition: v8-typed-array.h:277
Definition: v8-typed-array.h:292
static Local< Float64Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
static Float64Array * Cast(Value *value)
Definition: v8-typed-array.h:303
Definition: v8-typed-array.h:166
static Int16Array * Cast(Value *value)
Definition: v8-typed-array.h:177
static Local< Int16Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:218
static Int32Array * Cast(Value *value)
Definition: v8-typed-array.h:229
static Local< Int32Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:114
static Int8Array * Cast(Value *value)
Definition: v8-typed-array.h:125
static Local< Int8Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-isolate.h:305
Definition: v8-local-handle.h:356
Definition: v8-local-handle.h:724
Definition: v8-typed-array.h:21
static constexpr size_t kMaxByteLength
Definition: v8-typed-array.h:27
static TypedArray * Cast(Value *value)
Definition: v8-typed-array.h:40
Definition: v8-typed-array.h:140
static Uint16Array * Cast(Value *value)
Definition: v8-typed-array.h:151
static Local< Uint16Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:192
static Uint32Array * Cast(Value *value)
Definition: v8-typed-array.h:203
static Local< Uint32Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:55
static Local< Uint8Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
static Uint8Array * Cast(Value *value)
Definition: v8-typed-array.h:73
static MaybeLocal< Uint8Array > MaybeNew(Isolate *isolate, std::span< const uint8_t > data)
Definition: v8-typed-array.h:88
static Local< Uint8ClampedArray > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
static Uint8ClampedArray * Cast(Value *value)
Definition: v8-typed-array.h:99
Definition: v8-value.h:32
Definition: libplatform.h:15
#define V8_EXPORT
Definition: v8config.h:875
#define V8_INLINE
Definition: v8config.h:519