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

Unified Diff: test/cctest/compiler/test-changes-lowering.cc

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 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 | « test/cctest/compiler/test-branch-combine.cc ('k') | test/cctest/compiler/test-gap-resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-changes-lowering.cc
diff --git a/test/cctest/compiler/test-changes-lowering.cc b/test/cctest/compiler/test-changes-lowering.cc
index ceab902ce11fe606c16d84ca2841833c26c79fe2..965382cfd6a46d55a8f67d5ab9649100bd5aff3c 100644
--- a/test/cctest/compiler/test-changes-lowering.cc
+++ b/test/cctest/compiler/test-changes-lowering.cc
@@ -31,7 +31,7 @@ namespace compiler {
template <typename ReturnType>
class ChangesLoweringTester : public GraphBuilderTester<ReturnType> {
public:
- explicit ChangesLoweringTester(MachineType p0 = kMachNone)
+ explicit ChangesLoweringTester(MachineType p0 = MachineType::None())
: GraphBuilderTester<ReturnType>(p0),
javascript(this->zone()),
jsgraph(this->isolate(), this->graph(), this->common(), &javascript,
@@ -60,22 +60,22 @@ class ChangesLoweringTester : public GraphBuilderTester<ReturnType> {
void StoreFloat64(Node* node, double* ptr) {
Node* ptr_node = this->PointerConstant(ptr);
- this->Store(kMachFloat64, ptr_node, node);
+ this->Store(MachineType::Float64(), ptr_node, node);
}
Node* LoadInt32(int32_t* ptr) {
Node* ptr_node = this->PointerConstant(ptr);
- return this->Load(kMachInt32, ptr_node);
+ return this->Load(MachineType::Int32(), ptr_node);
}
Node* LoadUint32(uint32_t* ptr) {
Node* ptr_node = this->PointerConstant(ptr);
- return this->Load(kMachUint32, ptr_node);
+ return this->Load(MachineType::Uint32(), ptr_node);
}
Node* LoadFloat64(double* ptr) {
Node* ptr_node = this->PointerConstant(ptr);
- return this->Load(kMachFloat64, ptr_node);
+ return this->Load(MachineType::Float64(), ptr_node);
}
void CheckNumber(double expected, Object* number) {
@@ -145,7 +145,7 @@ class ChangesLoweringTester : public GraphBuilderTester<ReturnType> {
TEST(RunChangeTaggedToInt32) {
// Build and lower a graph by hand.
- ChangesLoweringTester<int32_t> t(kMachAnyTagged);
+ ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
t.BuildAndLower(t.simplified()->ChangeTaggedToInt32());
FOR_INT32_INPUTS(i) {
@@ -173,7 +173,7 @@ TEST(RunChangeTaggedToInt32) {
TEST(RunChangeTaggedToUint32) {
// Build and lower a graph by hand.
- ChangesLoweringTester<uint32_t> t(kMachAnyTagged);
+ ChangesLoweringTester<uint32_t> t(MachineType::AnyTagged());
t.BuildAndLower(t.simplified()->ChangeTaggedToUint32());
FOR_UINT32_INPUTS(i) {
@@ -200,13 +200,13 @@ TEST(RunChangeTaggedToUint32) {
TEST(RunChangeTaggedToFloat64) {
- ChangesLoweringTester<int32_t> t(kMachAnyTagged);
+ ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
double result;
- t.BuildStoreAndLower(
- t.simplified()->ChangeTaggedToFloat64(),
- t.machine()->Store(StoreRepresentation(kMachFloat64, kNoWriteBarrier)),
- &result);
+ t.BuildStoreAndLower(t.simplified()->ChangeTaggedToFloat64(),
+ t.machine()->Store(StoreRepresentation(
+ MachineType::Float64(), kNoWriteBarrier)),
+ &result);
{
FOR_INT32_INPUTS(i) {
@@ -251,7 +251,7 @@ TEST(RunChangeTaggedToFloat64) {
TEST(RunChangeBoolToBit) {
- ChangesLoweringTester<int32_t> t(kMachAnyTagged);
+ ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
t.BuildAndLower(t.simplified()->ChangeBoolToBit());
{
@@ -269,7 +269,7 @@ TEST(RunChangeBoolToBit) {
TEST(RunChangeBitToBool) {
- ChangesLoweringTester<Object*> t(kMachInt32);
+ ChangesLoweringTester<Object*> t(MachineType::Int32());
t.BuildAndLower(t.simplified()->ChangeBitToBool());
{
« no previous file with comments | « test/cctest/compiler/test-branch-combine.cc ('k') | test/cctest/compiler/test-gap-resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698