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/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/frame-elider.h" | 6 #include "src/compiler/frame-elider.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 15 matching lines...) Expand all Loading... |
26 InstructionAt(i)->opcode() == ArchOpcode::kArchDeoptimize) { | 26 InstructionAt(i)->opcode() == ArchOpcode::kArchDeoptimize) { |
27 block->mark_needs_frame(); | 27 block->mark_needs_frame(); |
28 break; | 28 break; |
29 } | 29 } |
30 } | 30 } |
31 } | 31 } |
32 } | 32 } |
33 | 33 |
34 | 34 |
35 void FrameElider::PropagateMarks() { | 35 void FrameElider::PropagateMarks() { |
36 while (PropagateInOrder() && PropagateReversed()) { | 36 while (PropagateInOrder() || PropagateReversed()) { |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 | 40 |
41 void FrameElider::MarkDeConstruction() { | 41 void FrameElider::MarkDeConstruction() { |
42 for (InstructionBlock* block : instruction_blocks()) { | 42 for (InstructionBlock* block : instruction_blocks()) { |
43 if (block->needs_frame()) { | 43 if (block->needs_frame()) { |
44 // Special case: The start block needs a frame. | 44 // Special case: The start block needs a frame. |
45 if (block->predecessors().empty()) { | 45 if (block->predecessors().empty()) { |
46 block->mark_must_construct_frame(); | 46 block->mark_must_construct_frame(); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 | 123 |
124 | 124 |
125 Instruction* FrameElider::InstructionAt(int index) const { | 125 Instruction* FrameElider::InstructionAt(int index) const { |
126 return code_->InstructionAt(index); | 126 return code_->InstructionAt(index); |
127 } | 127 } |
128 | 128 |
129 } // namespace compiler | 129 } // namespace compiler |
130 } // namespace internal | 130 } // namespace internal |
131 } // namespace v8 | 131 } // namespace v8 |
OLD | NEW |