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

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

Issue 1514863002: [turbofan] Make FieldAccess::name usable in practice. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. 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 | « src/compiler/simplified-operator.cc ('k') | test/unittests/compiler/change-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-simplified-lowering.cc
diff --git a/test/cctest/compiler/test-simplified-lowering.cc b/test/cctest/compiler/test-simplified-lowering.cc
index c5b48615bbeced4116f9d8540037477444550771..1f2c0a45262e7bf97b10ae80a4a7852d4e580079 100644
--- a/test/cctest/compiler/test-simplified-lowering.cc
+++ b/test/cctest/compiler/test-simplified-lowering.cc
@@ -99,12 +99,12 @@ TEST(RunNumberToInt32_float64) {
double input;
int32_t result;
SimplifiedLoweringTester<Object*> t;
- FieldAccess load = {kUntaggedBase, 0, Handle<Name>(), Type::Number(),
+ FieldAccess load = {kUntaggedBase, 0, nullptr, Type::Number(),
MachineType::Float64()};
Node* loaded = t.LoadField(load, t.PointerConstant(&input));
NodeProperties::SetType(loaded, Type::Number());
Node* convert = t.NumberToInt32(loaded);
- FieldAccess store = {kUntaggedBase, 0, Handle<Name>(), Type::Signed32(),
+ FieldAccess store = {kUntaggedBase, 0, nullptr, Type::Signed32(),
MachineType::Int32()};
t.StoreField(store, t.PointerConstant(&result), convert);
t.Return(t.jsgraph.TrueConstant());
@@ -126,12 +126,12 @@ TEST(RunNumberToUint32_float64) {
double input;
uint32_t result;
SimplifiedLoweringTester<Object*> t;
- FieldAccess load = {kUntaggedBase, 0, Handle<Name>(), Type::Number(),
+ FieldAccess load = {kUntaggedBase, 0, nullptr, Type::Number(),
MachineType::Float64()};
Node* loaded = t.LoadField(load, t.PointerConstant(&input));
NodeProperties::SetType(loaded, Type::Number());
Node* convert = t.NumberToUint32(loaded);
- FieldAccess store = {kUntaggedBase, 0, Handle<Name>(), Type::Unsigned32(),
+ FieldAccess store = {kUntaggedBase, 0, nullptr, Type::Unsigned32(),
MachineType::Uint32()};
t.StoreField(store, t.PointerConstant(&result), convert);
t.Return(t.jsgraph.TrueConstant());
@@ -291,8 +291,8 @@ TEST(RunLoadFieldFromUntaggedBase) {
for (size_t i = 0; i < arraysize(smis); i++) {
int offset = static_cast<int>(i * sizeof(Smi*));
- FieldAccess access = {kUntaggedBase, offset, Handle<Name>(),
- Type::Integral32(), MachineType::AnyTagged()};
+ FieldAccess access = {kUntaggedBase, offset, nullptr, Type::Integral32(),
+ MachineType::AnyTagged()};
SimplifiedLoweringTester<Object*> t;
Node* load = t.LoadField(access, t.PointerConstant(smis));
@@ -313,8 +313,8 @@ TEST(RunStoreFieldToUntaggedBase) {
for (size_t i = 0; i < arraysize(smis); i++) {
int offset = static_cast<int>(i * sizeof(Smi*));
- FieldAccess access = {kUntaggedBase, offset, Handle<Name>(),
- Type::Integral32(), MachineType::AnyTagged()};
+ FieldAccess access = {kUntaggedBase, offset, nullptr, Type::Integral32(),
+ MachineType::AnyTagged()};
SimplifiedLoweringTester<Object*> t(MachineType::AnyTagged());
Node* p0 = t.Parameter(0);
@@ -526,7 +526,7 @@ class AccessTester : public HandleAndZoneScope {
int offset = field * sizeof(E);
FieldAccess access = {tagged ? kTaggedBase : kUntaggedBase,
offset + (tagged ? FixedArrayBase::kHeaderSize : 0),
- Handle<Name>(), Type::Any(), rep};
+ nullptr, Type::Any(), rep};
return access;
}
@@ -1335,8 +1335,8 @@ TEST(LowerLoadField_to_load) {
TestingGraph t(Type::Any(), Type::Signed32());
for (size_t i = 0; i < arraysize(kMachineReps); i++) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(), kMachineReps[i]};
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, nullptr,
+ Type::Any(), kMachineReps[i]};
Node* load = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);
@@ -1358,8 +1358,8 @@ TEST(LowerStoreField_to_store) {
TestingGraph t(Type::Any(), Type::Signed32());
for (size_t i = 0; i < arraysize(kMachineReps); i++) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(), kMachineReps[i]};
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, nullptr,
+ Type::Any(), kMachineReps[i]};
Node* val = t.ExampleWithOutput(kMachineReps[i]);
@@ -1383,9 +1383,8 @@ TEST(LowerStoreField_to_store) {
Zone* z = scope.main_zone();
TestingGraph t(Type::Any(), Type::Intersect(Type::SignedSmall(),
Type::TaggedSigned(), z));
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::AnyTagged()};
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, nullptr,
+ Type::Any(), MachineType::AnyTagged()};
Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0,
t.p1, t.start, t.start);
t.Effect(store);
@@ -1518,9 +1517,8 @@ TEST(InsertChangeForLoadElement) {
TEST(InsertChangeForLoadField) {
// TODO(titzer): test all load/store representation change insertions.
TestingGraph t(Type::Any(), Type::Signed32());
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::Float64()};
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, nullptr,
+ Type::Any(), MachineType::Float64()};
Node* load = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);
@@ -1553,9 +1551,8 @@ TEST(InsertChangeForStoreElement) {
TEST(InsertChangeForStoreField) {
// TODO(titzer): test all load/store representation change insertions.
TestingGraph t(Type::Any(), Type::Signed32());
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::Float64()};
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, nullptr,
+ Type::Any(), MachineType::Float64()};
Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0,
t.p1, t.start, t.start);
@@ -1575,8 +1572,8 @@ TEST(UpdatePhi) {
Type* kTypes[] = {Type::Signed32(), Type::Unsigned32(), Type::Number()};
for (size_t i = 0; i < arraysize(kMachineTypes); i++) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), kTypes[i], kMachineTypes[i]};
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, nullptr,
+ kTypes[i], kMachineTypes[i]};
Node* load0 = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | test/unittests/compiler/change-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698