Skip to content

Commit

Permalink
src: use 24 as default for kHeaderSize
Browse files Browse the repository at this point in the history
PR-URL: #330
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
mmarchini committed Jan 21, 2020
1 parent 1b8f143 commit b30cf41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/llv8-constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ void DescriptorArray::Load() {
kFirstIndex = LoadOptionalConstant({"prop_idx_first"}, 0);
kSize = LoadConstant({"prop_desc_size"});
kHeaderSize = LoadOptionalConstant(
{"class_DescriptorArray__header_size__uintptr_t"}, 0);
{"class_DescriptorArray__header_size__uintptr_t"}, 24);
}


Expand Down
2 changes: 1 addition & 1 deletion src/llv8-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ inline T DescriptorArray::Get(int index, int64_t offset) {
if (v8()->descriptor_array()->kFirstIndex.Loaded()) {
return FixedArray::Get<T>(
*(v8()->descriptor_array()->kFirstIndex) + index + offset, err);
} else if (v8()->descriptor_array()->kHeaderSize.Loaded()) {
} else if (v8()->descriptor_array()->kHeaderSize.Check()) {
index *= v8()->common()->kPointerSize;
index += *(v8()->descriptor_array()->kHeaderSize);
index += (v8()->common()->kPointerSize * offset);
Expand Down

0 comments on commit b30cf41

Please sign in to comment.