OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 "src/compiler/effect-control-linearizer.h" | 5 #include "src/compiler/effect-control-linearizer.h" |
6 #include "src/compiler/access-builder.h" | 6 #include "src/compiler/access-builder.h" |
7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 #include "src/compiler/schedule.h" | 10 #include "src/compiler/schedule.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // +-------+------+ | 167 // +-------+------+ |
168 // | | | 168 // | | |
169 // BLOCK 4: BLOCK 5: | 169 // BLOCK 4: BLOCK 5: |
170 // t2: IfTrue(b2) f2:IfFalse(b2) | 170 // t2: IfTrue(b2) f2:IfFalse(b2) |
171 // | | | 171 // | | |
172 // +-------+------+ | 172 // +-------+------+ |
173 // | | 173 // | |
174 // BLOCK 6: | 174 // BLOCK 6: |
175 // m2: Merge(t2, f2) | 175 // m2: Merge(t2, f2) |
176 // r1: Return(c1, c2) | 176 // r1: Return(c1, c2) |
177 MachineType kMachineSignature[] = {MachineType::AnyTagged(), | 177 LinkageLocation kLocationSignature[] = { |
178 MachineType::AnyTagged()}; | 178 LinkageLocation::ForRegister(0, MachineType::Pointer()), |
179 LinkageLocation kLocationSignature[] = {LinkageLocation::ForRegister(0), | 179 LinkageLocation::ForRegister(1, MachineType::Pointer())}; |
180 LinkageLocation::ForRegister(1)}; | |
181 const CallDescriptor* kCallDescriptor = new (zone()) CallDescriptor( | 180 const CallDescriptor* kCallDescriptor = new (zone()) CallDescriptor( |
182 CallDescriptor::kCallCodeObject, MachineType::AnyTagged(), | 181 CallDescriptor::kCallCodeObject, MachineType::AnyTagged(), |
183 LinkageLocation::ForRegister(0), | 182 LinkageLocation::ForRegister(0, MachineType::Pointer()), |
184 new (zone()) MachineSignature(1, 1, kMachineSignature), | |
185 new (zone()) LocationSignature(1, 1, kLocationSignature), 0, | 183 new (zone()) LocationSignature(1, 1, kLocationSignature), 0, |
186 Operator::kNoProperties, 0, 0, CallDescriptor::kNoFlags); | 184 Operator::kNoProperties, 0, 0, CallDescriptor::kNoFlags); |
187 Node* p0 = Parameter(0); | 185 Node* p0 = Parameter(0); |
188 Node* p1 = Parameter(1); | 186 Node* p1 = Parameter(1); |
189 Node* const0 = Int32Constant(0); | 187 Node* const0 = Int32Constant(0); |
190 Node* call = graph()->NewNode(common()->Call(kCallDescriptor), p0, p1, | 188 Node* call = graph()->NewNode(common()->Call(kCallDescriptor), p0, p1, |
191 graph()->start(), graph()->start()); | 189 graph()->start(), graph()->start()); |
192 Node* if_success = graph()->NewNode(common()->IfSuccess(), call); | 190 Node* if_success = graph()->NewNode(common()->IfSuccess(), call); |
193 | 191 |
194 // First Floating diamond. | 192 // First Floating diamond. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 introducer.Run(); | 319 introducer.Run(); |
322 | 320 |
323 ASSERT_THAT(ret, IsReturn(load, load, if_true)); | 321 ASSERT_THAT(ret, IsReturn(load, load, if_true)); |
324 EXPECT_THAT(load, IsLoadField(AccessBuilder::ForHeapNumberValue(), | 322 EXPECT_THAT(load, IsLoadField(AccessBuilder::ForHeapNumberValue(), |
325 heap_number, effect_phi, loop)); | 323 heap_number, effect_phi, loop)); |
326 } | 324 } |
327 | 325 |
328 } // namespace compiler | 326 } // namespace compiler |
329 } // namespace internal | 327 } // namespace internal |
330 } // namespace v8 | 328 } // namespace v8 |
OLD | NEW |