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

Unified Diff: test/cctest/compiler/test-representation-change.cc

Issue 2266823002: [turbofan] Insert dummy values when changing from None type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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 | « src/compiler/x87/code-generator-x87.cc ('k') | test/mjsunit/compiler/regress-638132.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-representation-change.cc
diff --git a/test/cctest/compiler/test-representation-change.cc b/test/cctest/compiler/test-representation-change.cc
index b475e9a5b9d76e79148bd4fb4c4d78e84c32ba84..4d054fcaced7d34ab7e3ea3c120ccff22cd981b7 100644
--- a/test/cctest/compiler/test-representation-change.cc
+++ b/test/cctest/compiler/test-representation-change.cc
@@ -493,9 +493,9 @@ static void CheckChange(IrOpcode::Value expected, MachineRepresentation from,
TEST(SingleChanges) {
CheckChange(IrOpcode::kChangeTaggedToBit, MachineRepresentation::kTagged,
- Type::None(), MachineRepresentation::kBit);
+ Type::Boolean(), MachineRepresentation::kBit);
CheckChange(IrOpcode::kChangeBitToTagged, MachineRepresentation::kBit,
- Type::None(), MachineRepresentation::kTagged);
+ Type::Boolean(), MachineRepresentation::kTagged);
CheckChange(IrOpcode::kChangeInt31ToTaggedSigned,
MachineRepresentation::kWord32, Type::Signed31(),
@@ -546,7 +546,7 @@ TEST(SingleChanges) {
Type::Unsigned32(), MachineRepresentation::kWord32);
CheckChange(IrOpcode::kTruncateFloat64ToFloat32,
- MachineRepresentation::kFloat64, Type::None(),
+ MachineRepresentation::kFloat64, Type::Number(),
MachineRepresentation::kFloat32);
// Int32,Uint32 <-> Float32 require two changes.
@@ -570,11 +570,11 @@ TEST(SingleChanges) {
// Float32 <-> Tagged require two changes.
CheckTwoChanges(IrOpcode::kChangeFloat32ToFloat64,
IrOpcode::kChangeFloat64ToTagged,
- MachineRepresentation::kFloat32, Type::None(),
+ MachineRepresentation::kFloat32, Type::Number(),
MachineRepresentation::kTagged);
CheckTwoChanges(IrOpcode::kChangeTaggedToFloat64,
IrOpcode::kTruncateFloat64ToFloat32,
- MachineRepresentation::kTagged, Type::None(),
+ MachineRepresentation::kTagged, Type::Number(),
MachineRepresentation::kFloat32);
}
@@ -587,7 +587,7 @@ TEST(SignednessInWord32) {
CheckChange(IrOpcode::kChangeTaggedToUint32, MachineRepresentation::kTagged,
Type::Unsigned32(), MachineRepresentation::kWord32);
CheckChange(IrOpcode::kChangeInt32ToFloat64, MachineRepresentation::kWord32,
- Type::None(), MachineRepresentation::kFloat64);
+ Type::Signed32(), MachineRepresentation::kFloat64);
CheckChange(IrOpcode::kChangeFloat64ToInt32, MachineRepresentation::kFloat64,
Type::Signed32(), MachineRepresentation::kWord32);
CheckChange(IrOpcode::kTruncateFloat64ToWord32,
@@ -600,7 +600,7 @@ TEST(SignednessInWord32) {
CheckTwoChanges(IrOpcode::kChangeInt32ToFloat64,
IrOpcode::kTruncateFloat64ToFloat32,
- MachineRepresentation::kWord32, Type::None(),
+ MachineRepresentation::kWord32, Type::Signed32(),
MachineRepresentation::kFloat32);
CheckTwoChanges(IrOpcode::kChangeFloat32ToFloat64,
IrOpcode::kTruncateFloat64ToWord32,
@@ -614,13 +614,11 @@ TEST(Nops) {
// X -> X is always a nop for any single representation X.
for (size_t i = 0; i < arraysize(kMachineTypes); i++) {
- r.CheckNop(kMachineTypes[i].representation(), Type::None(),
+ r.CheckNop(kMachineTypes[i].representation(), Type::Number(),
kMachineTypes[i].representation());
}
// 32-bit floats.
- r.CheckNop(MachineRepresentation::kFloat32, Type::None(),
- MachineRepresentation::kFloat32);
r.CheckNop(MachineRepresentation::kFloat32, Type::Number(),
MachineRepresentation::kFloat32);
@@ -639,14 +637,6 @@ TEST(Nops) {
MachineRepresentation::kWord32);
// kRepBit (result of comparison) is implicitly a wordish thing.
- r.CheckNop(MachineRepresentation::kBit, Type::None(),
- MachineRepresentation::kWord8);
- r.CheckNop(MachineRepresentation::kBit, Type::None(),
- MachineRepresentation::kWord16);
- r.CheckNop(MachineRepresentation::kBit, Type::None(),
- MachineRepresentation::kWord32);
- r.CheckNop(MachineRepresentation::kBit, Type::None(),
- MachineRepresentation::kWord64);
r.CheckNop(MachineRepresentation::kBit, Type::Boolean(),
MachineRepresentation::kWord8);
r.CheckNop(MachineRepresentation::kBit, Type::Boolean(),
@@ -662,39 +652,39 @@ TEST(TypeErrors) {
RepresentationChangerTester r;
// Wordish cannot be implicitly converted to/from comparison conditions.
- r.CheckTypeError(MachineRepresentation::kWord8, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kWord8, Type::Number(),
MachineRepresentation::kBit);
- r.CheckTypeError(MachineRepresentation::kWord16, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kWord16, Type::Number(),
MachineRepresentation::kBit);
- r.CheckTypeError(MachineRepresentation::kWord32, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kWord32, Type::Number(),
MachineRepresentation::kBit);
- r.CheckTypeError(MachineRepresentation::kWord64, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kWord64, Type::Number(),
MachineRepresentation::kBit);
// Floats cannot be implicitly converted to/from comparison conditions.
- r.CheckTypeError(MachineRepresentation::kFloat64, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kFloat64, Type::Number(),
MachineRepresentation::kBit);
// Floats cannot be implicitly converted to/from comparison conditions.
- r.CheckTypeError(MachineRepresentation::kFloat32, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kFloat32, Type::Number(),
MachineRepresentation::kBit);
- r.CheckTypeError(MachineRepresentation::kBit, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kBit, Type::Number(),
MachineRepresentation::kFloat32);
r.CheckTypeError(MachineRepresentation::kBit, Type::Boolean(),
MachineRepresentation::kFloat32);
// Word64 is internal and shouldn't be implicitly converted.
- r.CheckTypeError(MachineRepresentation::kWord64, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kWord64, Type::Internal(),
MachineRepresentation::kTagged);
- r.CheckTypeError(MachineRepresentation::kTagged, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kTagged, Type::Number(),
MachineRepresentation::kWord64);
r.CheckTypeError(MachineRepresentation::kTagged, Type::Boolean(),
MachineRepresentation::kWord64);
// Word64 / Word32 shouldn't be implicitly converted.
- r.CheckTypeError(MachineRepresentation::kWord64, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kWord64, Type::Internal(),
MachineRepresentation::kWord32);
- r.CheckTypeError(MachineRepresentation::kWord32, Type::None(),
+ r.CheckTypeError(MachineRepresentation::kWord32, Type::Number(),
MachineRepresentation::kWord64);
r.CheckTypeError(MachineRepresentation::kWord32, Type::Signed32(),
MachineRepresentation::kWord64);
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | test/mjsunit/compiler/regress-638132.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698