| 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/escape-analysis-reducer.h" | 5 #include "src/compiler/escape-analysis-reducer.h" |
| 6 | 6 |
| 7 #include "src/compiler/all-nodes.h" | 7 #include "src/compiler/all-nodes.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
| 9 #include "src/counters.h" | 9 #include "src/counters.h" |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 return ReduceObjectIsSmi(node); | 54 return ReduceObjectIsSmi(node); |
| 55 // FrameStates and Value nodes are preprocessed here, | 55 // FrameStates and Value nodes are preprocessed here, |
| 56 // and visited via ReduceFrameStateUses from their user nodes. | 56 // and visited via ReduceFrameStateUses from their user nodes. |
| 57 case IrOpcode::kFrameState: | 57 case IrOpcode::kFrameState: |
| 58 case IrOpcode::kStateValues: { | 58 case IrOpcode::kStateValues: { |
| 59 if (node->id() >= static_cast<NodeId>(fully_reduced_.length()) || | 59 if (node->id() >= static_cast<NodeId>(fully_reduced_.length()) || |
| 60 fully_reduced_.Contains(node->id())) { | 60 fully_reduced_.Contains(node->id())) { |
| 61 break; | 61 break; |
| 62 } | 62 } |
| 63 bool depends_on_object_state = false; | 63 bool depends_on_object_state = false; |
| 64 for (int i = 0; i < node->InputCount(); i++) { | 64 for (Node* input : node->inputs()) { |
| 65 Node* input = node->InputAt(i); | |
| 66 switch (input->opcode()) { | 65 switch (input->opcode()) { |
| 67 case IrOpcode::kAllocate: | 66 case IrOpcode::kAllocate: |
| 68 case IrOpcode::kFinishRegion: | 67 case IrOpcode::kFinishRegion: |
| 69 depends_on_object_state = | 68 depends_on_object_state = |
| 70 depends_on_object_state || escape_analysis()->IsVirtual(input); | 69 depends_on_object_state || escape_analysis()->IsVirtual(input); |
| 71 break; | 70 break; |
| 72 case IrOpcode::kFrameState: | 71 case IrOpcode::kFrameState: |
| 73 case IrOpcode::kStateValues: | 72 case IrOpcode::kStateValues: |
| 74 depends_on_object_state = | 73 depends_on_object_state = |
| 75 depends_on_object_state || | 74 depends_on_object_state || |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 369 } |
| 371 } | 370 } |
| 372 #endif // DEBUG | 371 #endif // DEBUG |
| 373 } | 372 } |
| 374 | 373 |
| 375 Isolate* EscapeAnalysisReducer::isolate() const { return jsgraph_->isolate(); } | 374 Isolate* EscapeAnalysisReducer::isolate() const { return jsgraph_->isolate(); } |
| 376 | 375 |
| 377 } // namespace compiler | 376 } // namespace compiler |
| 378 } // namespace internal | 377 } // namespace internal |
| 379 } // namespace v8 | 378 } // namespace v8 |
| OLD | NEW |