diff options
author | 2017-09-21 22:50:39 +0100 | |
---|---|---|
committer | 2017-09-25 15:45:01 +0100 | |
commit | 0ebe0d83138bba1996e9c8007969b5381d972b32 (patch) | |
tree | a5ee66ebc5b587ade97e56ac8fc7d832fbbed4af /compiler/optimizing/gvn_test.cc | |
parent | e1e347dace0ded83774999bb26c37527dcdb1d5a (diff) |
ART: Introduce compiler data type.
Replace most uses of the runtime's Primitive in compiler
with a new class DataType. This prepares for introducing
new types, such as Uint8, that the runtime does not need
to know about.
Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 23964345
Change-Id: Iec2ad82454eec678fffcd8279a9746b90feb9b0c
Diffstat (limited to 'compiler/optimizing/gvn_test.cc')
-rw-r--r-- | compiler/optimizing/gvn_test.cc | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/compiler/optimizing/gvn_test.cc b/compiler/optimizing/gvn_test.cc index e1ed7f656e..ac0dbee2c5 100644 --- a/compiler/optimizing/gvn_test.cc +++ b/compiler/optimizing/gvn_test.cc @@ -37,7 +37,7 @@ TEST_F(GVNTest, LocalFieldElimination) { HInstruction* parameter = new (&allocator) HParameterValue(graph->GetDexFile(), dex::TypeIndex(0), 0, - Primitive::kPrimNot); + DataType::Type::kReference); entry->AddInstruction(parameter); HBasicBlock* block = new (&allocator) HBasicBlock(graph); @@ -46,7 +46,7 @@ TEST_F(GVNTest, LocalFieldElimination) { block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimNot, + DataType::Type::kReference, MemberOffset(42), false, kUnknownFieldIndex, @@ -55,7 +55,7 @@ TEST_F(GVNTest, LocalFieldElimination) { 0)); block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimNot, + DataType::Type::kReference, MemberOffset(42), false, kUnknownFieldIndex, @@ -65,7 +65,7 @@ TEST_F(GVNTest, LocalFieldElimination) { HInstruction* to_remove = block->GetLastInstruction(); block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimNot, + DataType::Type::kReference, MemberOffset(43), false, kUnknownFieldIndex, @@ -77,7 +77,7 @@ TEST_F(GVNTest, LocalFieldElimination) { block->AddInstruction(new (&allocator) HInstanceFieldSet(parameter, parameter, nullptr, - Primitive::kPrimNot, + DataType::Type::kReference, MemberOffset(42), false, kUnknownFieldIndex, @@ -86,7 +86,7 @@ TEST_F(GVNTest, LocalFieldElimination) { 0)); block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimNot, + DataType::Type::kReference, MemberOffset(42), false, kUnknownFieldIndex, @@ -121,7 +121,7 @@ TEST_F(GVNTest, GlobalFieldElimination) { HInstruction* parameter = new (&allocator) HParameterValue(graph->GetDexFile(), dex::TypeIndex(0), 0, - Primitive::kPrimNot); + DataType::Type::kReference); entry->AddInstruction(parameter); HBasicBlock* block = new (&allocator) HBasicBlock(graph); @@ -129,7 +129,7 @@ TEST_F(GVNTest, GlobalFieldElimination) { entry->AddSuccessor(block); block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -152,7 +152,7 @@ TEST_F(GVNTest, GlobalFieldElimination) { then->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -162,7 +162,7 @@ TEST_F(GVNTest, GlobalFieldElimination) { then->AddInstruction(new (&allocator) HGoto()); else_->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -172,7 +172,7 @@ TEST_F(GVNTest, GlobalFieldElimination) { else_->AddInstruction(new (&allocator) HGoto()); join->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -204,7 +204,7 @@ TEST_F(GVNTest, LoopFieldElimination) { HInstruction* parameter = new (&allocator) HParameterValue(graph->GetDexFile(), dex::TypeIndex(0), 0, - Primitive::kPrimNot); + DataType::Type::kReference); entry->AddInstruction(parameter); HBasicBlock* block = new (&allocator) HBasicBlock(graph); @@ -212,7 +212,7 @@ TEST_F(GVNTest, LoopFieldElimination) { entry->AddSuccessor(block); block->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -235,7 +235,7 @@ TEST_F(GVNTest, LoopFieldElimination) { loop_header->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -250,7 +250,7 @@ TEST_F(GVNTest, LoopFieldElimination) { loop_body->AddInstruction(new (&allocator) HInstanceFieldSet(parameter, parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -260,7 +260,7 @@ TEST_F(GVNTest, LoopFieldElimination) { HInstruction* field_set = loop_body->GetLastInstruction(); loop_body->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -272,7 +272,7 @@ TEST_F(GVNTest, LoopFieldElimination) { exit->AddInstruction(new (&allocator) HInstanceFieldGet(parameter, nullptr, - Primitive::kPrimBoolean, + DataType::Type::kBool, MemberOffset(42), false, kUnknownFieldIndex, @@ -351,7 +351,7 @@ TEST_F(GVNTest, LoopSideEffects) { HInstruction* parameter = new (&allocator) HParameterValue(graph->GetDexFile(), dex::TypeIndex(0), 0, - Primitive::kPrimBoolean); + DataType::Type::kBool); entry->AddInstruction(parameter); entry->AddInstruction(new (&allocator) HGoto()); outer_loop_header->AddInstruction(new (&allocator) HSuspendCheck()); @@ -374,7 +374,7 @@ TEST_F(GVNTest, LoopSideEffects) { entry->AddInstruction(new (&allocator) HInstanceFieldSet(parameter, parameter, nullptr, - Primitive::kPrimNot, + DataType::Type::kReference, MemberOffset(42), false, kUnknownFieldIndex, @@ -399,7 +399,7 @@ TEST_F(GVNTest, LoopSideEffects) { new (&allocator) HInstanceFieldSet(parameter, parameter, nullptr, - Primitive::kPrimNot, + DataType::Type::kReference, MemberOffset(42), false, kUnknownFieldIndex, @@ -425,7 +425,7 @@ TEST_F(GVNTest, LoopSideEffects) { new (&allocator) HInstanceFieldSet(parameter, parameter, nullptr, - Primitive::kPrimNot, + DataType::Type::kReference, MemberOffset(42), false, kUnknownFieldIndex, |