| 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/bytecode-graph-builder.h" | 5 #include "src/compiler/bytecode-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler/bytecode-branch-analysis.h" | 7 #include "src/compiler/bytecode-branch-analysis.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/operator-properties.h" | 9 #include "src/compiler/operator-properties.h" |
| 10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 return false; | 356 return false; |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 return true; | 360 return true; |
| 361 } | 361 } |
| 362 | 362 |
| 363 | 363 |
| 364 bool BytecodeGraphBuilder::Environment::StateValuesAreUpToDate( | 364 bool BytecodeGraphBuilder::Environment::StateValuesAreUpToDate( |
| 365 int output_poke_offset, int output_poke_count) { | 365 int output_poke_offset, int output_poke_count) { |
| 366 if (!builder()->info()->is_deoptimization_enabled()) return true; |
| 366 // Poke offset is relative to the top of the stack (i.e., the accumulator). | 367 // Poke offset is relative to the top of the stack (i.e., the accumulator). |
| 367 int output_poke_start = accumulator_base() - output_poke_offset; | 368 int output_poke_start = accumulator_base() - output_poke_offset; |
| 368 int output_poke_end = output_poke_start + output_poke_count; | 369 int output_poke_end = output_poke_start + output_poke_count; |
| 369 return StateValuesAreUpToDate(¶meters_state_values_, 0, parameter_count(), | 370 return StateValuesAreUpToDate(¶meters_state_values_, 0, parameter_count(), |
| 370 output_poke_start, output_poke_end) && | 371 output_poke_start, output_poke_end) && |
| 371 StateValuesAreUpToDate(®isters_state_values_, register_base(), | 372 StateValuesAreUpToDate(®isters_state_values_, register_base(), |
| 372 register_count(), output_poke_start, | 373 register_count(), output_poke_start, |
| 373 output_poke_end) && | 374 output_poke_end) && |
| 374 StateValuesAreUpToDate(&accumulator_state_values_, accumulator_base(), | 375 StateValuesAreUpToDate(&accumulator_state_values_, accumulator_base(), |
| 375 1, output_poke_start, output_poke_end); | 376 1, output_poke_start, output_poke_end); |
| (...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2100 | 2101 |
| 2101 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 2102 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 2102 if (environment()->IsMarkedAsUnreachable()) return; | 2103 if (environment()->IsMarkedAsUnreachable()) return; |
| 2103 environment()->MarkAsUnreachable(); | 2104 environment()->MarkAsUnreachable(); |
| 2104 exit_controls_.push_back(exit); | 2105 exit_controls_.push_back(exit); |
| 2105 } | 2106 } |
| 2106 | 2107 |
| 2107 } // namespace compiler | 2108 } // namespace compiler |
| 2108 } // namespace internal | 2109 } // namespace internal |
| 2109 } // namespace v8 | 2110 } // namespace v8 |
| OLD | NEW |