5#ifndef INCLUDE_V8_TYPED_ARRAY_H_
6#define INCLUDE_V8_TYPED_ARRAY_H_
26 static constexpr size_t kMaxByteLength = ArrayBuffer::kMaxByteLength;
28#ifdef V8_ENABLE_SANDBOX
30 v8::internal::kMaxSafeBufferSizeForSandbox);
40#ifdef V8_ENABLE_CHECKS
48 static void CheckCast(
Value* obj);
59 static constexpr size_t kMaxLength =
60 TypedArray::kMaxByteLength /
sizeof(uint8_t);
61 static_assert(
sizeof(uint8_t) == 1);
64 size_t byte_offset,
size_t length);
66#ifdef V8_ENABLE_CHECKS
74 static void CheckCast(
Value* obj);
85 static constexpr size_t kMaxLength =
86 TypedArray::kMaxByteLength /
sizeof(uint8_t);
87 static_assert(
sizeof(uint8_t) == 1);
90 size_t byte_offset,
size_t length);
92#ifdef V8_ENABLE_CHECKS
100 static void CheckCast(
Value* obj);
111 static constexpr size_t kMaxLength =
112 TypedArray::kMaxByteLength /
sizeof(int8_t);
113 static_assert(
sizeof(int8_t) == 1);
116 size_t byte_offset,
size_t length);
118#ifdef V8_ENABLE_CHECKS
126 static void CheckCast(
Value* obj);
137 static constexpr size_t kMaxLength =
138 TypedArray::kMaxByteLength /
sizeof(uint16_t);
139 static_assert(
sizeof(uint16_t) == 2);
142 size_t byte_offset,
size_t length);
144#ifdef V8_ENABLE_CHECKS
152 static void CheckCast(
Value* obj);
163 static constexpr size_t kMaxLength =
164 TypedArray::kMaxByteLength /
sizeof(int16_t);
165 static_assert(
sizeof(int16_t) == 2);
168 size_t byte_offset,
size_t length);
170#ifdef V8_ENABLE_CHECKS
178 static void CheckCast(
Value* obj);
189 static constexpr size_t kMaxLength =
190 TypedArray::kMaxByteLength /
sizeof(uint32_t);
191 static_assert(
sizeof(uint32_t) == 4);
194 size_t byte_offset,
size_t length);
196#ifdef V8_ENABLE_CHECKS
204 static void CheckCast(
Value* obj);
215 static constexpr size_t kMaxLength =
216 TypedArray::kMaxByteLength /
sizeof(int32_t);
217 static_assert(
sizeof(int32_t) == 4);
220 size_t byte_offset,
size_t length);
222#ifdef V8_ENABLE_CHECKS
230 static void CheckCast(
Value* obj);
238 static constexpr size_t kMaxLength =
239 TypedArray::kMaxByteLength /
sizeof(uint16_t);
242 size_t byte_offset,
size_t length);
244#ifdef V8_ENABLE_CHECKS
252 static void CheckCast(
Value* obj);
263 static constexpr size_t kMaxLength =
264 TypedArray::kMaxByteLength /
sizeof(float);
265 static_assert(
sizeof(float) == 4);
268 size_t byte_offset,
size_t length);
270#ifdef V8_ENABLE_CHECKS
278 static void CheckCast(
Value* obj);
289 static constexpr size_t kMaxLength =
290 TypedArray::kMaxByteLength /
sizeof(double);
291 static_assert(
sizeof(double) == 8);
294 size_t byte_offset,
size_t length);
296#ifdef V8_ENABLE_CHECKS
304 static void CheckCast(
Value* obj);
315 static constexpr size_t kMaxLength =
316 TypedArray::kMaxByteLength /
sizeof(int64_t);
317 static_assert(
sizeof(int64_t) == 8);
320 size_t byte_offset,
size_t length);
322#ifdef V8_ENABLE_CHECKS
330 static void CheckCast(
Value* obj);
341 static constexpr size_t kMaxLength =
342 TypedArray::kMaxByteLength /
sizeof(uint64_t);
343 static_assert(
sizeof(uint64_t) == 8);
346 size_t byte_offset,
size_t length);
348#ifdef V8_ENABLE_CHECKS
356 static void CheckCast(
Value* obj);
Definition: v8-array-buffer.h:472
Definition: v8-typed-array.h:310
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:321
Definition: v8-typed-array.h:336
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:347
Definition: v8-typed-array.h:236
static Float16Array * Cast(Value *value)
Definition: v8-typed-array.h:243
static Local< Float16Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:258
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:269
Definition: v8-typed-array.h:284
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:295
Definition: v8-typed-array.h:158
static Int16Array * Cast(Value *value)
Definition: v8-typed-array.h:169
static Local< Int16Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:210
static Int32Array * Cast(Value *value)
Definition: v8-typed-array.h:221
static Local< Int32Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:106
static Int8Array * Cast(Value *value)
Definition: v8-typed-array.h:117
static Local< Int8Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-local-handle.h:359
Definition: v8-typed-array.h:20
static constexpr size_t kMaxByteLength
Definition: v8-typed-array.h:26
static TypedArray * Cast(Value *value)
Definition: v8-typed-array.h:39
Definition: v8-typed-array.h:132
static Uint16Array * Cast(Value *value)
Definition: v8-typed-array.h:143
static Local< Uint16Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:184
static Uint32Array * Cast(Value *value)
Definition: v8-typed-array.h:195
static Local< Uint32Array > New(Local< ArrayBufferBase > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:54
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:65
Definition: v8-typed-array.h:80
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:91
Definition: v8-value.h:32
Definition: libplatform.h:15
#define V8_EXPORT
Definition: v8config.h:874
#define V8_INLINE
Definition: v8config.h:518