Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: src/compiler/simplified-lowering.cc

Issue 2536353003: [turbofan] fixed uninhabited type handling in ObjectState representation selection (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index cb32fc9ae35967c59bffa9e412f9cf7b1d5d30ad..5dcb37fae83f3b098278c203a7d4823c6d259314 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1024,9 +1024,14 @@ class RepresentationSelector {
// TODO(turbofan): Special treatment for ExternalPointer here,
// to avoid incompatible truncations. We really need a story
// for the JSFunction::entry field.
- UseInfo use_info = input_type->Is(Type::ExternalPointer())
- ? UseInfo::PointerInt()
- : UseInfo::Any();
+ UseInfo use_info = UseInfo::None();
+ if (input_type->IsInhabited()) {
+ if (input_type->Is(Type::ExternalPointer())) {
+ use_info = UseInfo::PointerInt();
+ } else {
+ use_info = UseInfo::Any();
+ }
+ }
EnqueueInput(node, i, use_info);
}
} else if (lower()) {
@@ -1041,7 +1046,9 @@ class RepresentationSelector {
// TODO(turbofan): Special treatment for ExternalPointer here,
// to avoid incompatible truncations. We really need a story
// 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();
} else {
MachineRepresentation rep = input_type->IsInhabited()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698