Commit e13a825b authored by mvstanton's avatar mvstanton Committed by Commit bot

[turbofan] Eliminate uses of representation dimension of Type.

BUG=

Review-Url: https://codereview.chromium.org/2355253002
Cr-Commit-Position: refs/heads/master@{#39621}
parent 5b81f586
......@@ -627,7 +627,7 @@ FieldAccess AccessBuilder::ForContextExtensionExtension() {
// static
ElementAccess AccessBuilder::ForFixedArrayElement() {
ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Tagged(),
ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
MachineType::AnyTagged(), kFullWriteBarrier};
return access;
}
......
......@@ -437,7 +437,7 @@ bool AccessInfoFactory::LookupSpecialFieldAccessor(
int offset;
if (Accessors::IsJSObjectFieldAccessor(map, name, &offset)) {
FieldIndex field_index = FieldIndex::ForInObjectOffset(offset);
Type* field_type = Type::Tagged();
Type* field_type = Type::NonInternal();
MachineRepresentation field_representation = MachineRepresentation::kTagged;
if (map->IsStringMap()) {
DCHECK(Name::Equals(factory()->length_string(), name));
......
......@@ -1092,8 +1092,8 @@ Node* JSCreateLowering::AllocateFastLiteral(
boilerplate_map->instance_descriptors()->GetKey(i), isolate());
FieldIndex index = FieldIndex::ForDescriptor(*boilerplate_map, i);
FieldAccess access = {
kTaggedBase, index.offset(), property_name,
Type::Tagged(), MachineType::AnyTagged(), kFullWriteBarrier};
kTaggedBase, index.offset(), property_name,
Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier};
Node* value;
if (boilerplate->IsUnboxedDoubleField(index)) {
access.machine_type = MachineType::Float64();
......
......@@ -949,7 +949,7 @@ JSNativeContextSpecialization::BuildPropertyAccess(
value = effect =
graph()->NewNode(common()->FinishRegion(), box, effect);
field_access.type = Type::TaggedPointer();
field_access.type = Type::Any();
field_access.machine_type = MachineType::TaggedPointer();
field_access.write_barrier_kind = kPointerWriteBarrier;
} else {
......
......@@ -471,7 +471,8 @@ Node* RepresentationChanger::GetFloat64RepresentationFor(
if (output_type->Is(Type::Undefined())) {
return jsgraph()->Float64Constant(
std::numeric_limits<double>::quiet_NaN());
} else if (output_type->Is(Type::TaggedSigned())) {
} else if (output_rep == MachineRepresentation::kTaggedSigned) {
node = InsertChangeTaggedSignedToInt32(node);
op = machine()->ChangeInt32ToFloat64();
} else if (output_type->Is(Type::Number())) {
......
......@@ -558,7 +558,7 @@ Type* Typer::Visitor::TypeRetain(Node* node) {
Type* Typer::Visitor::TypeInt32Constant(Node* node) {
double number = OpParameter<int32_t>(node);
return Type::Intersect(Type::Range(number, number, zone()),
Type::UntaggedIntegral32(), zone());
Type::Integral32(), zone());
}
......
......@@ -525,15 +525,11 @@ TEST(SingleChanges) {
Type::Unsigned32(), MachineRepresentation::kWord32);
CheckChange(IrOpcode::kChangeTaggedToFloat64, MachineRepresentation::kTagged,
Type::Number(), MachineRepresentation::kFloat64);
CheckChange(IrOpcode::kChangeTaggedToFloat64, MachineRepresentation::kTagged,
Type::Number(), MachineRepresentation::kFloat64);
CheckChange(IrOpcode::kTruncateTaggedToFloat64,
MachineRepresentation::kTagged, Type::NumberOrUndefined(),
MachineRepresentation::kFloat64);
CheckTwoChanges(IrOpcode::kChangeTaggedSignedToInt32,
IrOpcode::kChangeInt32ToFloat64,
MachineRepresentation::kTagged, Type::TaggedSigned(),
MachineRepresentation::kFloat64);
CheckChange(IrOpcode::kChangeTaggedToFloat64, MachineRepresentation::kTagged,
Type::Signed31(), MachineRepresentation::kFloat64);
// Int32,Uint32 <-> Float64 are actually machine conversions.
CheckChange(IrOpcode::kChangeInt32ToFloat64, MachineRepresentation::kWord32,
......
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