| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <limits> | 5 #include <limits> |
| 6 | 6 |
| 7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
| 8 #include "src/compiler/change-lowering.h" | 8 #include "src/compiler/change-lowering.h" |
| 9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
| 10 #include "src/compiler/graph-reducer.h" | 10 #include "src/compiler/graph-reducer.h" |
| (...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1456 CHECK_EQ(IrOpcode::kStore, store->opcode()); | 1456 CHECK_EQ(IrOpcode::kStore, store->opcode()); |
| 1457 CHECK_EQ(val, store->InputAt(2)); | 1457 CHECK_EQ(val, store->InputAt(2)); |
| 1458 CheckFieldAccessArithmetic(access, store); | 1458 CheckFieldAccessArithmetic(access, store); |
| 1459 | 1459 |
| 1460 StoreRepresentation rep = OpParameter<StoreRepresentation>(store); | 1460 StoreRepresentation rep = OpParameter<StoreRepresentation>(store); |
| 1461 if (kMachineReps[i] & kRepTagged) { | 1461 if (kMachineReps[i] & kRepTagged) { |
| 1462 CHECK_EQ(kFullWriteBarrier, rep.write_barrier_kind()); | 1462 CHECK_EQ(kFullWriteBarrier, rep.write_barrier_kind()); |
| 1463 } | 1463 } |
| 1464 CHECK_EQ(kMachineReps[i], rep.machine_type()); | 1464 CHECK_EQ(kMachineReps[i], rep.machine_type()); |
| 1465 } | 1465 } |
| 1466 |
| 1467 if (t.machine()->Is64()) { |
| 1468 FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, |
| 1469 Handle<Name>::null(), Type::Any(), kMachAnyTagged}; |
| 1470 Node* val = t.graph()->NewNode(t.simplified()->ChangeInt32ToTagged(), t.p0); |
| 1471 Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0, |
| 1472 val, t.start, t.start); |
| 1473 t.Effect(store); |
| 1474 t.Lower(); |
| 1475 CHECK_EQ(IrOpcode::kStore, store->opcode()); |
| 1476 CHECK_EQ(val, store->InputAt(2)); |
| 1477 StoreRepresentation rep = OpParameter<StoreRepresentation>(store); |
| 1478 CHECK_EQ(kNoWriteBarrier, rep.write_barrier_kind()); |
| 1479 } |
| 1466 } | 1480 } |
| 1467 | 1481 |
| 1468 | 1482 |
| 1469 TEST(LowerLoadElement_to_load) { | 1483 TEST(LowerLoadElement_to_load) { |
| 1470 TestingGraph t(Type::Any(), Type::Signed32()); | 1484 TestingGraph t(Type::Any(), Type::Signed32()); |
| 1471 | 1485 |
| 1472 for (size_t i = 0; i < arraysize(kMachineReps); i++) { | 1486 for (size_t i = 0; i < arraysize(kMachineReps); i++) { |
| 1473 ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, | 1487 ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, |
| 1474 Type::Any(), kMachineReps[i]}; | 1488 Type::Any(), kMachineReps[i]}; |
| 1475 | 1489 |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2040 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); | 2054 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); |
| 2041 NodeProperties::SetBounds(phi, phi_bounds); | 2055 NodeProperties::SetBounds(phi, phi_bounds); |
| 2042 | 2056 |
| 2043 Node* use = t.Use(phi, d.use); | 2057 Node* use = t.Use(phi, d.use); |
| 2044 t.Return(use); | 2058 t.Return(use); |
| 2045 t.Lower(); | 2059 t.Lower(); |
| 2046 | 2060 |
| 2047 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); | 2061 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); |
| 2048 } | 2062 } |
| 2049 } | 2063 } |
| OLD | NEW |