Commit 21e7b70c authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

Remove unused method from FieldIndex

Change-Id: I319496294fe5b560ac6189c178fa047879093729
Reviewed-on: https://chromium-review.googlesource.com/1184701Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55293}
parent f26eaaa9
......@@ -41,32 +41,6 @@ inline FieldIndex FieldIndex::ForPropertyIndex(const Map* map,
first_inobject_offset);
}
// Takes an index as computed by GetLoadByFieldIndex and reconstructs a
// FieldIndex object from it.
inline FieldIndex FieldIndex::ForLoadByFieldIndex(const Map* map,
int orig_index) {
int field_index = orig_index;
bool is_inobject = true;
int first_inobject_offset = 0;
Encoding encoding = field_index & 1 ? kDouble : kTagged;
field_index >>= 1;
int offset;
if (field_index < 0) {
first_inobject_offset = FixedArray::kHeaderSize;
field_index = -(field_index + 1);
is_inobject = false;
offset = FixedArray::kHeaderSize + field_index * kPointerSize;
} else {
first_inobject_offset = map->GetInObjectPropertyOffset(0);
offset = map->GetInObjectPropertyOffset(field_index);
}
FieldIndex result(is_inobject, offset, encoding, map->GetInObjectProperties(),
first_inobject_offset);
DCHECK_EQ(result.GetLoadByFieldIndex(), orig_index);
return result;
}
// Returns the index format accepted by the HLoadFieldByIndex instruction.
// (In-object: zero-based from (object start + JSObject::kHeaderSize),
// out-of-object: zero-based from FixedArray::kHeaderSize.)
......
......@@ -29,7 +29,6 @@ class FieldIndex final {
static FieldIndex ForInObjectOffset(int offset, Encoding encoding,
const Map* map = nullptr);
static FieldIndex ForDescriptor(const Map* map, int descriptor_index);
static FieldIndex ForLoadByFieldIndex(const Map* map, int index);
int GetLoadByFieldIndex() const;
......
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