Commit 3c4c6011 authored by Maya Lekova's avatar Maya Lekova Committed by V8 LUCI CQ

[fastcall] Remove redundant offsetof comparison

This fixes a compilation error on GCC.

Bug: v8:12072
Change-Id: Ief14968ba15776ad5f72b85b93c9158996833453
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086475
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76227}
parent b213e0fd
......@@ -317,12 +317,6 @@ struct FastApiTypedArray : public FastApiTypedArrayBase {
#ifdef DEBUG
ValidateIndex(index);
#endif // DEBUG
static_assert(offsetof(FastApiTypedArray<T>, length_) <
offsetof(FastApiTypedArray<T>, data_),
"length_ should be "
"stored in memory before data_, initializing the "
"FastApiTypedArray struct will fail.");
T tmp;
memcpy(&tmp, reinterpret_cast<T*>(data_) + index, sizeof(T));
return tmp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment