5#ifndef INCLUDE_V8_TYPED_ARRAY_H_
6#define INCLUDE_V8_TYPED_ARRAY_H_
27 static constexpr size_t kMaxByteLength =
28 internal::kMaxSafeBufferSizeForSandbox;
29#elif V8_HOST_ARCH_32_BIT
30 static constexpr size_t kMaxByteLength = std::numeric_limits<int>::max();
33 static constexpr size_t kMaxByteLength =
34 static_cast<size_t>((uint64_t{1} << 53) - 1);
44#ifdef V8_ENABLE_CHECKS
52 static void CheckCast(
Value* obj);
63 static constexpr size_t kMaxLength =
64 TypedArray::kMaxByteLength /
sizeof(uint8_t);
65 static_assert(
sizeof(uint8_t) == 1);
68 size_t byte_offset,
size_t length);
70 size_t byte_offset,
size_t length);
72#ifdef V8_ENABLE_CHECKS
80 static void CheckCast(
Value* obj);
91 static constexpr size_t kMaxLength =
92 TypedArray::kMaxByteLength /
sizeof(uint8_t);
93 static_assert(
sizeof(uint8_t) == 1);
96 size_t byte_offset,
size_t length);
101#ifdef V8_ENABLE_CHECKS
109 static void CheckCast(
Value* obj);
120 static constexpr size_t kMaxLength =
121 TypedArray::kMaxByteLength /
sizeof(int8_t);
122 static_assert(
sizeof(int8_t) == 1);
125 size_t byte_offset,
size_t length);
127 size_t byte_offset,
size_t length);
129#ifdef V8_ENABLE_CHECKS
137 static void CheckCast(
Value* obj);
148 static constexpr size_t kMaxLength =
149 TypedArray::kMaxByteLength /
sizeof(uint16_t);
150 static_assert(
sizeof(uint16_t) == 2);
153 size_t byte_offset,
size_t length);
155 size_t byte_offset,
size_t length);
157#ifdef V8_ENABLE_CHECKS
165 static void CheckCast(
Value* obj);
176 static constexpr size_t kMaxLength =
177 TypedArray::kMaxByteLength /
sizeof(int16_t);
178 static_assert(
sizeof(int16_t) == 2);
181 size_t byte_offset,
size_t length);
183 size_t byte_offset,
size_t length);
185#ifdef V8_ENABLE_CHECKS
193 static void CheckCast(
Value* obj);
204 static constexpr size_t kMaxLength =
205 TypedArray::kMaxByteLength /
sizeof(uint32_t);
206 static_assert(
sizeof(uint32_t) == 4);
209 size_t byte_offset,
size_t length);
211 size_t byte_offset,
size_t length);
213#ifdef V8_ENABLE_CHECKS
221 static void CheckCast(
Value* obj);
232 static constexpr size_t kMaxLength =
233 TypedArray::kMaxByteLength /
sizeof(int32_t);
234 static_assert(
sizeof(int32_t) == 4);
237 size_t byte_offset,
size_t length);
239 size_t byte_offset,
size_t length);
241#ifdef V8_ENABLE_CHECKS
249 static void CheckCast(
Value* obj);
260 static constexpr size_t kMaxLength =
261 TypedArray::kMaxByteLength /
sizeof(float);
262 static_assert(
sizeof(float) == 4);
265 size_t byte_offset,
size_t length);
267 size_t byte_offset,
size_t length);
269#ifdef V8_ENABLE_CHECKS
277 static void CheckCast(
Value* obj);
288 static constexpr size_t kMaxLength =
289 TypedArray::kMaxByteLength /
sizeof(double);
290 static_assert(
sizeof(double) == 8);
293 size_t byte_offset,
size_t length);
295 size_t byte_offset,
size_t length);
297#ifdef V8_ENABLE_CHECKS
305 static void CheckCast(
Value* obj);
316 static constexpr size_t kMaxLength =
317 TypedArray::kMaxByteLength /
sizeof(int64_t);
318 static_assert(
sizeof(int64_t) == 8);
321 size_t byte_offset,
size_t length);
323 size_t byte_offset,
size_t length);
325#ifdef V8_ENABLE_CHECKS
333 static void CheckCast(
Value* obj);
344 static constexpr size_t kMaxLength =
345 TypedArray::kMaxByteLength /
sizeof(uint64_t);
346 static_assert(
sizeof(uint64_t) == 8);
349 size_t byte_offset,
size_t length);
351 size_t byte_offset,
size_t length);
353#ifdef V8_ENABLE_CHECKS
361 static void CheckCast(
Value* obj);
Definition: v8-array-buffer.h:351
Definition: v8-typed-array.h:311
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:324
Definition: v8-typed-array.h:339
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:352
Definition: v8-typed-array.h:255
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:268
Definition: v8-typed-array.h:283
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:296
Definition: v8-typed-array.h:171
static Int16Array * Cast(Value *value)
Definition: v8-typed-array.h:184
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:227
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:240
static Local< Int32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:115
static Int8Array * Cast(Value *value)
Definition: v8-typed-array.h:128
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:248
Definition: v8-typed-array.h:20
static TypedArray * Cast(Value *value)
Definition: v8-typed-array.h:43
Definition: v8-typed-array.h:143
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:156
static Local< Uint16Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
Definition: v8-typed-array.h:199
static Uint32Array * Cast(Value *value)
Definition: v8-typed-array.h:212
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:58
static Uint8Array * Cast(Value *value)
Definition: v8-typed-array.h:71
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:86
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:100
Definition: v8-value.h:32
Definition: libplatform.h:15
#define V8_EXPORT
Definition: v8config.h:739
#define V8_INLINE
Definition: v8config.h:466