Commit 9b20a7b7 authored by tebbi's avatar tebbi Committed by Commit bot

[turbofan] fixed uninhabited type handling in ObjectState representation selection

R=jarin@chromium.org

BUG=v8:668517

Review-Url: https://codereview.chromium.org/2536353003
Cr-Commit-Position: refs/heads/master@{#41399}
parent 4ab4bbe9
...@@ -1024,9 +1024,14 @@ class RepresentationSelector { ...@@ -1024,9 +1024,14 @@ class RepresentationSelector {
// TODO(turbofan): Special treatment for ExternalPointer here, // TODO(turbofan): Special treatment for ExternalPointer here,
// to avoid incompatible truncations. We really need a story // to avoid incompatible truncations. We really need a story
// for the JSFunction::entry field. // for the JSFunction::entry field.
UseInfo use_info = input_type->Is(Type::ExternalPointer()) UseInfo use_info = UseInfo::None();
? UseInfo::PointerInt() if (input_type->IsInhabited()) {
: UseInfo::Any(); if (input_type->Is(Type::ExternalPointer())) {
use_info = UseInfo::PointerInt();
} else {
use_info = UseInfo::Any();
}
}
EnqueueInput(node, i, use_info); EnqueueInput(node, i, use_info);
} }
} else if (lower()) { } else if (lower()) {
...@@ -1041,7 +1046,9 @@ class RepresentationSelector { ...@@ -1041,7 +1046,9 @@ class RepresentationSelector {
// TODO(turbofan): Special treatment for ExternalPointer here, // TODO(turbofan): Special treatment for ExternalPointer here,
// to avoid incompatible truncations. We really need a story // to avoid incompatible truncations. We really need a story
// for the JSFunction::entry field. // for the JSFunction::entry field.
if (input_type->Is(Type::ExternalPointer())) { if (!input_type->IsInhabited()) {
(*types)[i] = MachineType::None();
} else if (input_type->Is(Type::ExternalPointer())) {
(*types)[i] = MachineType::Pointer(); (*types)[i] = MachineType::Pointer();
} else { } else {
MachineRepresentation rep = input_type->IsInhabited() MachineRepresentation rep = input_type->IsInhabited()
......
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