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 size_t byte_offset,
size_t length);
68#ifdef V8_ENABLE_CHECKS
76 static void CheckCast(
Value* obj);
87 static constexpr size_t kMaxLength =
88 TypedArray::kMaxByteLength /
sizeof(uint8_t);
89 static_assert(
sizeof(uint8_t) == 1);
92 size_t byte_offset,
size_t length);
97#ifdef V8_ENABLE_CHECKS
105 static void CheckCast(
Value* obj);
116 static constexpr size_t kMaxLength =
117 TypedArray::kMaxByteLength /
sizeof(int8_t);
118 static_assert(
sizeof(int8_t) == 1);
121 size_t byte_offset,
size_t length);
123 size_t byte_offset,
size_t length);
125#ifdef V8_ENABLE_CHECKS
133 static void CheckCast(
Value* obj);
144 static constexpr size_t kMaxLength =
145 TypedArray::kMaxByteLength /
sizeof(uint16_t);
146 static_assert(
sizeof(uint16_t) == 2);
149 size_t byte_offset,
size_t length);
151 size_t byte_offset,
size_t length);
153#ifdef V8_ENABLE_CHECKS
161 static void CheckCast(
Value* obj);
172 static constexpr size_t kMaxLength =
173 TypedArray::kMaxByteLength /
sizeof(int16_t);
174 static_assert(
sizeof(int16_t) == 2);
177 size_t byte_offset,
size_t length);
179 size_t byte_offset,
size_t length);
181#ifdef V8_ENABLE_CHECKS
189 static void CheckCast(
Value* obj);
200 static constexpr size_t kMaxLength =
201 TypedArray::kMaxByteLength /
sizeof(uint32_t);
202 static_assert(
sizeof(uint32_t) == 4);
205 size_t byte_offset,
size_t length);
207 size_t byte_offset,
size_t length);
209#ifdef V8_ENABLE_CHECKS
217 static void CheckCast(
Value* obj);
228 static constexpr size_t kMaxLength =
229 TypedArray::kMaxByteLength /
sizeof(int32_t);
230 static_assert(
sizeof(int32_t) == 4);
233 size_t byte_offset,
size_t length);
235 size_t byte_offset,
size_t length);
237#ifdef V8_ENABLE_CHECKS
245 static void CheckCast(
Value* obj);
253 static constexpr size_t kMaxLength =
254 TypedArray::kMaxByteLength /
sizeof(uint16_t);
257 size_t byte_offset,
size_t length);
259 size_t byte_offset,
size_t length);
261#ifdef V8_ENABLE_CHECKS
269 static void CheckCast(
Value* obj);
280 static constexpr size_t kMaxLength =
281 TypedArray::kMaxByteLength /
sizeof(float);
282 static_assert(
sizeof(float) == 4);
285 size_t byte_offset,
size_t length);
287 size_t byte_offset,
size_t length);
289#ifdef V8_ENABLE_CHECKS
297 static void CheckCast(
Value* obj);
308 static constexpr size_t kMaxLength =
309 TypedArray::kMaxByteLength /
sizeof(double);
310 static_assert(
sizeof(double) == 8);
313 size_t byte_offset,
size_t length);
315 size_t byte_offset,
size_t length);
317#ifdef V8_ENABLE_CHECKS
325 static void CheckCast(
Value* obj);
336 static constexpr size_t kMaxLength =
337 TypedArray::kMaxByteLength /
sizeof(int64_t);
338 static_assert(
sizeof(int64_t) == 8);
341 size_t byte_offset,
size_t length);
343 size_t byte_offset,
size_t length);
345#ifdef V8_ENABLE_CHECKS
353 static void CheckCast(
Value* obj);
364 static constexpr size_t kMaxLength =
365 TypedArray::kMaxByteLength /
sizeof(uint64_t);
366 static_assert(
sizeof(uint64_t) == 8);
369 size_t byte_offset,
size_t length);
371 size_t byte_offset,
size_t length);
373#ifdef V8_ENABLE_CHECKS
381 static void CheckCast(
Value* obj);
Definition: v8-array-buffer.h:417
Definition: v8-typed-array.h:331
static Local< BigInt64Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Local< BigInt64Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static BigInt64Array * Cast(Value *value)
Definition: v8-typed-array.h:344
Definition: v8-typed-array.h:359
static Local< BigUint64Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< BigUint64Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static BigUint64Array * Cast(Value *value)
Definition: v8-typed-array.h:372
Definition: v8-typed-array.h:251
static Local< Float16Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Float16Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Float16Array * Cast(Value *value)
Definition: v8-typed-array.h:260
Definition: v8-typed-array.h:275
static Local< Float32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Float32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Float32Array * Cast(Value *value)
Definition: v8-typed-array.h:288
Definition: v8-typed-array.h:303
static Local< Float64Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Float64Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Float64Array * Cast(Value *value)
Definition: v8-typed-array.h:316
Definition: v8-typed-array.h:167
static Int16Array * Cast(Value *value)
Definition: v8-typed-array.h:180
static Local< Int16Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Local< Int16Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:223
static Local< Int32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Int32Array * Cast(Value *value)
Definition: v8-typed-array.h:236
static Local< Int32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:111
static Int8Array * Cast(Value *value)
Definition: v8-typed-array.h:124
static Local< Int8Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Local< Int8Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
Definition: v8-local-handle.h:266
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:139
static Local< Uint16Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Uint16Array * Cast(Value *value)
Definition: v8-typed-array.h:152
static Local< Uint16Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:195
static Uint32Array * Cast(Value *value)
Definition: v8-typed-array.h:208
static Local< Uint32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Uint32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:54
static Uint8Array * Cast(Value *value)
Definition: v8-typed-array.h:67
static Local< Uint8Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Uint8Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:82
static Local< Uint8ClampedArray > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< Uint8ClampedArray > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Uint8ClampedArray * Cast(Value *value)
Definition: v8-typed-array.h:96
Definition: v8-value.h:32
Definition: libplatform.h:15
#define V8_EXPORT
Definition: v8config.h:803
#define V8_INLINE
Definition: v8config.h:499