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

Unified Diff: src/compiler/js-native-context-specialization.cc

Issue 2255533003: [turbofan] Remove representation axis for float64 fields. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months 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 | src/types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-native-context-specialization.cc
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc
index 28625c87f6b560d3bea5a1caf785d1c82d65a1c2..6293c49ad359e901e2868e91fbb5696bc30c4a1a 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -896,6 +896,11 @@ JSNativeContextSpecialization::BuildPropertyAccess(
field_type, MachineType::AnyTagged(), kFullWriteBarrier};
if (access_mode == AccessMode::kLoad) {
if (field_type->Is(Type::UntaggedFloat64())) {
+ // TODO(turbofan): We remove the representation axis from the type to
+ // avoid uninhabited representation types. This is a workaround until
+ // the {PropertyAccessInfo} is using {MachineRepresentation} instead.
+ field_access.type = Type::Union(
+ field_type, Type::Representation(Type::Number(), zone()), zone());
if (!field_index.is_inobject() || field_index.is_hidden_field() ||
!FLAG_unbox_double_fields) {
storage = effect = graph()->NewNode(
@@ -910,6 +915,11 @@ JSNativeContextSpecialization::BuildPropertyAccess(
} else {
DCHECK_EQ(AccessMode::kStore, access_mode);
if (field_type->Is(Type::UntaggedFloat64())) {
+ // TODO(turbofan): We remove the representation axis from the type to
+ // avoid uninhabited representation types. This is a workaround until
+ // the {PropertyAccessInfo} is using {MachineRepresentation} instead.
+ field_access.type = Type::Union(
+ field_type, Type::Representation(Type::Number(), zone()), zone());
value = effect = graph()->NewNode(simplified()->CheckNumber(), value,
effect, control);
« no previous file with comments | « no previous file | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698