OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/memory-optimizer.h" | 5 #include "src/compiler/memory-optimizer.h" |
6 | 6 |
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-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 CallDescriptor* descriptor = | 275 CallDescriptor* descriptor = |
276 Linkage::GetAllocateCallDescriptor(graph()->zone()); | 276 Linkage::GetAllocateCallDescriptor(graph()->zone()); |
277 allocate_operator_.set(common()->Call(descriptor)); | 277 allocate_operator_.set(common()->Call(descriptor)); |
278 } | 278 } |
279 vfalse = efalse = graph()->NewNode(allocate_operator_.get(), target, size, | 279 vfalse = efalse = graph()->NewNode(allocate_operator_.get(), target, size, |
280 efalse, if_false); | 280 efalse, if_false); |
281 } | 281 } |
282 | 282 |
283 control = graph()->NewNode(common()->Merge(2), if_true, if_false); | 283 control = graph()->NewNode(common()->Merge(2), if_true, if_false); |
284 effect = graph()->NewNode(common()->EffectPhi(2), etrue, efalse, control); | 284 effect = graph()->NewNode(common()->EffectPhi(2), etrue, efalse, control); |
285 value = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), | 285 value = graph()->NewNode( |
286 vtrue, vfalse, control); | 286 common()->Phi(MachineRepresentation::kTaggedPointer, 2), vtrue, vfalse, |
| 287 control); |
287 | 288 |
288 // Create an unfoldable allocation group. | 289 // Create an unfoldable allocation group. |
289 AllocationGroup* group = | 290 AllocationGroup* group = |
290 new (zone()) AllocationGroup(value, pretenure, zone()); | 291 new (zone()) AllocationGroup(value, pretenure, zone()); |
291 state = AllocationState::Closed(group, zone()); | 292 state = AllocationState::Closed(group, zone()); |
292 } | 293 } |
293 | 294 |
294 // Replace all effect uses of {node} with the {effect}, enqueue the | 295 // Replace all effect uses of {node} with the {effect}, enqueue the |
295 // effect uses for further processing, and replace all value uses of | 296 // effect uses for further processing, and replace all value uses of |
296 // {node} with the {value}. | 297 // {node} with the {value}. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 return jsgraph()->common(); | 495 return jsgraph()->common(); |
495 } | 496 } |
496 | 497 |
497 MachineOperatorBuilder* MemoryOptimizer::machine() const { | 498 MachineOperatorBuilder* MemoryOptimizer::machine() const { |
498 return jsgraph()->machine(); | 499 return jsgraph()->machine(); |
499 } | 500 } |
500 | 501 |
501 } // namespace compiler | 502 } // namespace compiler |
502 } // namespace internal | 503 } // namespace internal |
503 } // namespace v8 | 504 } // namespace v8 |
OLD | NEW |