Commit 130d7dc3 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Properly merge compatible field access infos.

For a polymorphic access to o.x we would only merge it into a single
PropertyAccessInfo so far, if x is at the same offset in all maps and
the property index of x (in the descriptor arrays) is the same. But that
doesn't matter for code generation and blocks optimizations even.

BUG=v8:6278,v8:6344,v8:6396
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2883883002
Cr-Commit-Position: refs/heads/master@{#45294}
parent 1073dc98
......@@ -145,9 +145,12 @@ bool PropertyAccessInfo::Merge(PropertyAccessInfo const* that,
case kDataField:
case kDataConstantField: {
// Check if we actually access the same field.
if (this->kind_ == that->kind_ &&
this->field_index_ == that->field_index_) {
// Check if we actually access the same field (we use the
// GetFieldAccessStubKey method here just like the ICs do
// since that way we only compare the relevant bits of the
// field indices).
if (this->field_index_.GetFieldAccessStubKey() ==
that->field_index_.GetFieldAccessStubKey()) {
switch (access_mode) {
case AccessMode::kLoad: {
if (this->field_representation_ != that->field_representation_) {
......
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