[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: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#76227}
This commit is contained in:
parent
b213e0fd8b
commit
3c4c6011ed
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user