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

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

Issue 1952703002: Turn on -Wmissing-field-initializers on Linux. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
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 f4f137482ea8c9fc1b732b2d9634e71a9bf0d177..cda148cb343dfd56a1e4b4fb9a3dac2ffeceffb6 100644
--- a/test/cctest/compiler/test-simplified-lowering.cc
+++ b/test/cctest/compiler/test-simplified-lowering.cc
@@ -106,13 +106,15 @@ TEST(RunNumberToInt32_float64) {
double input;
int32_t result;
SimplifiedLoweringTester<Object*> t;
- FieldAccess load = {kUntaggedBase, 0, Handle<Name>(), Type::Number(),
- MachineType::Float64()};
+ FieldAccess load = {kUntaggedBase, 0,
+ Handle<Name>(), Type::Number(),
+ MachineType::Float64(), kNoWriteBarrier};
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(),
- MachineType::Int32()};
+ FieldAccess store = {kUntaggedBase, 0,
+ Handle<Name>(), Type::Signed32(),
+ MachineType::Int32(), kNoWriteBarrier};
t.StoreField(store, t.PointerConstant(&result), convert);
t.Return(t.jsgraph.TrueConstant());
t.LowerAllNodesAndLowerChanges();
@@ -133,13 +135,15 @@ TEST(RunNumberToUint32_float64) {
double input;
uint32_t result;
SimplifiedLoweringTester<Object*> t;
- FieldAccess load = {kUntaggedBase, 0, Handle<Name>(), Type::Number(),
- MachineType::Float64()};
+ FieldAccess load = {kUntaggedBase, 0,
+ Handle<Name>(), Type::Number(),
+ MachineType::Float64(), kNoWriteBarrier};
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(),
- MachineType::Uint32()};
+ FieldAccess store = {kUntaggedBase, 0,
+ Handle<Name>(), Type::Unsigned32(),
+ MachineType::Uint32(), kNoWriteBarrier};
t.StoreField(store, t.PointerConstant(&result), convert);
t.Return(t.jsgraph.TrueConstant());
t.LowerAllNodesAndLowerChanges();
@@ -298,8 +302,12 @@ 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,
+ Handle<Name>(),
+ Type::Integral32(),
+ MachineType::AnyTagged(),
+ kNoWriteBarrier};
SimplifiedLoweringTester<Object*> t;
Node* load = t.LoadField(access, t.PointerConstant(smis));
@@ -320,8 +328,12 @@ 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,
+ Handle<Name>(),
+ Type::Integral32(),
+ MachineType::AnyTagged(),
+ kNoWriteBarrier};
SimplifiedLoweringTester<Object*> t(MachineType::AnyTagged());
Node* p0 = t.Parameter(0);
@@ -347,7 +359,7 @@ TEST(RunLoadElementFromUntaggedBase) {
for (size_t j = 0; (i + j) < arraysize(smis); j++) { // for element index
int offset = static_cast<int>(i * sizeof(Smi*));
ElementAccess access = {kUntaggedBase, offset, Type::Integral32(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kNoWriteBarrier};
SimplifiedLoweringTester<Object*> t;
Node* load = t.LoadElement(access, t.PointerConstant(smis),
@@ -373,7 +385,7 @@ TEST(RunStoreElementFromUntaggedBase) {
for (size_t j = 0; (i + j) < arraysize(smis); j++) { // for element index
int offset = static_cast<int>(i * sizeof(Smi*));
ElementAccess access = {kUntaggedBase, offset, Type::Integral32(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kNoWriteBarrier};
SimplifiedLoweringTester<Object*> t(MachineType::AnyTagged());
Node* p0 = t.Parameter(0);
@@ -525,7 +537,7 @@ class AccessTester : public HandleAndZoneScope {
ElementAccess GetElementAccess() {
ElementAccess access = {tagged ? kTaggedBase : kUntaggedBase,
tagged ? FixedArrayBase::kHeaderSize : 0,
- Type::Any(), rep};
+ Type::Any(), rep, kFullWriteBarrier};
return access;
}
@@ -533,7 +545,10 @@ class AccessTester : public HandleAndZoneScope {
int offset = field * sizeof(E);
FieldAccess access = {tagged ? kTaggedBase : kUntaggedBase,
offset + (tagged ? FixedArrayBase::kHeaderSize : 0),
- Handle<Name>(), Type::Any(), rep};
+ Handle<Name>(),
+ Type::Any(),
+ rep,
+ kFullWriteBarrier};
return access;
}
@@ -1312,8 +1327,9 @@ const MachineType kMachineReps[] = {
TEST(LowerLoadField_to_load) {
for (size_t i = 0; i < arraysize(kMachineReps); i++) {
TestingGraph t(Type::Any(), Type::Signed32());
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(), kMachineReps[i]};
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
+ Handle<Name>::null(), Type::Any(),
+ kMachineReps[i], kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);
@@ -1335,9 +1351,9 @@ 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,
+ Handle<Name>::null(), Type::Any(),
+ kMachineReps[i], kNoWriteBarrier};
Node* val = t.ExampleWithOutput(kMachineReps[i]);
Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0,
@@ -1360,9 +1376,9 @@ 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, Handle<Name>::null(),
+ Type::Any(), MachineType::AnyTagged(), kNoWriteBarrier};
Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0,
t.p1, t.start, t.start);
t.Effect(store);
@@ -1379,7 +1395,7 @@ TEST(LowerLoadElement_to_load) {
for (size_t i = 0; i < arraysize(kMachineReps); i++) {
TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Type::Any(), kMachineReps[i]};
+ Type::Any(), kMachineReps[i], kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadElement(access), t.p0,
t.p1, t.start, t.start);
@@ -1402,7 +1418,7 @@ TEST(LowerStoreElement_to_store) {
TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Type::Any(), kMachineReps[i]};
+ Type::Any(), kMachineReps[i], kNoWriteBarrier};
Node* val = t.ExampleWithOutput(kMachineReps[i]);
Node* store = t.graph()->NewNode(t.simplified()->StoreElement(access),
@@ -1427,7 +1443,8 @@ TEST(LowerStoreElement_to_store) {
Type::Any(), Type::Signed32(),
Type::Intersect(Type::SignedSmall(), Type::TaggedSigned(), z));
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Type::Any(), MachineType::AnyTagged()};
+ Type::Any(), MachineType::AnyTagged(),
+ kNoWriteBarrier};
Node* store = t.graph()->NewNode(t.simplified()->StoreElement(access), t.p0,
t.p1, t.p2, t.start, t.start);
t.Effect(store);
@@ -1445,7 +1462,7 @@ TEST(InsertChangeForLoadElementIndex) {
// Load(obj, Int32Add(Int32Mul(ChangeTaggedToInt32(index), #k), #k))
TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadElement(access), t.p0,
t.p1, t.start, t.start);
@@ -1462,7 +1479,7 @@ TEST(InsertChangeForStoreElementIndex) {
// Store(obj, Int32Add(Int32Mul(ChangeTaggedToInt32(index), #k), #k), val)
TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kFullWriteBarrier};
Node* store =
t.graph()->NewNode(t.simplified()->StoreElement(access), t.p0, t.p1,
@@ -1479,7 +1496,7 @@ TEST(InsertChangeForLoadElement) {
// TODO(titzer): test all load/store representation change insertions.
TestingGraph t(Type::Any(), Type::Signed32(), Type::Any());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::Float64()};
+ MachineType::Float64(), kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadElement(access), t.p0,
t.p1, t.start, t.start);
@@ -1494,9 +1511,9 @@ 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, Handle<Name>::null(),
+ Type::Any(), MachineType::Float64(), kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);
@@ -1512,7 +1529,7 @@ TEST(InsertChangeForStoreElement) {
// TODO(titzer): test all load/store representation change insertions.
TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::Float64()};
+ MachineType::Float64(), kFullWriteBarrier};
Node* store =
t.graph()->NewNode(t.simplified()->StoreElement(access), t.p0,
@@ -1529,9 +1546,9 @@ 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, Handle<Name>::null(),
+ Type::Any(), MachineType::Float64(), kNoWriteBarrier};
Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0,
t.p1, t.start, t.start);
@@ -1551,8 +1568,9 @@ 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,
+ Handle<Name>::null(), kTypes[i],
+ kMachineTypes[i], kFullWriteBarrier};
Node* load0 = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);

Powered by Google App Engine
This is Rietveld 408576698