| 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/js-native-context-specialization.h" | 5 #include "src/compiler/js-native-context-specialization.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
| 10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 Node* exit_control = | 411 Node* exit_control = |
| 412 (exit_control_count == 1) | 412 (exit_control_count == 1) |
| 413 ? exit_controls.front() | 413 ? exit_controls.front() |
| 414 : graph()->NewNode(common()->Merge(exit_control_count), | 414 : graph()->NewNode(common()->Merge(exit_control_count), |
| 415 exit_control_count, &exit_controls.front()); | 415 exit_control_count, &exit_controls.front()); |
| 416 Node* deoptimize = | 416 Node* deoptimize = |
| 417 graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), | 417 graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), |
| 418 frame_state, exit_effect, exit_control); | 418 frame_state, exit_effect, exit_control); |
| 419 // TODO(bmeurer): This should be on the AdvancedReducer somehow. | 419 // TODO(bmeurer): This should be on the AdvancedReducer somehow. |
| 420 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); | 420 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
| 421 Revisit(graph()->end()); |
| 421 | 422 |
| 422 // Generate the final merge point for all (polymorphic) branches. | 423 // Generate the final merge point for all (polymorphic) branches. |
| 423 int const control_count = static_cast<int>(controls.size()); | 424 int const control_count = static_cast<int>(controls.size()); |
| 424 if (control_count == 0) { | 425 if (control_count == 0) { |
| 425 value = effect = control = jsgraph()->Dead(); | 426 value = effect = control = jsgraph()->Dead(); |
| 426 } else if (control_count == 1) { | 427 } else if (control_count == 1) { |
| 427 value = values.front(); | 428 value = values.front(); |
| 428 effect = effects.front(); | 429 effect = effects.front(); |
| 429 control = controls.front(); | 430 control = controls.front(); |
| 430 } else { | 431 } else { |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 Node* exit_control = | 844 Node* exit_control = |
| 844 (exit_control_count == 1) | 845 (exit_control_count == 1) |
| 845 ? exit_controls.front() | 846 ? exit_controls.front() |
| 846 : graph()->NewNode(common()->Merge(exit_control_count), | 847 : graph()->NewNode(common()->Merge(exit_control_count), |
| 847 exit_control_count, &exit_controls.front()); | 848 exit_control_count, &exit_controls.front()); |
| 848 Node* deoptimize = | 849 Node* deoptimize = |
| 849 graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), | 850 graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), |
| 850 frame_state, exit_effect, exit_control); | 851 frame_state, exit_effect, exit_control); |
| 851 // TODO(bmeurer): This should be on the AdvancedReducer somehow. | 852 // TODO(bmeurer): This should be on the AdvancedReducer somehow. |
| 852 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); | 853 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); |
| 854 Revisit(graph()->end()); |
| 853 | 855 |
| 854 // Generate the final merge point for all (polymorphic) branches. | 856 // Generate the final merge point for all (polymorphic) branches. |
| 855 int const control_count = static_cast<int>(controls.size()); | 857 int const control_count = static_cast<int>(controls.size()); |
| 856 if (control_count == 0) { | 858 if (control_count == 0) { |
| 857 value = effect = control = jsgraph()->Dead(); | 859 value = effect = control = jsgraph()->Dead(); |
| 858 } else if (control_count == 1) { | 860 } else if (control_count == 1) { |
| 859 value = values.front(); | 861 value = values.front(); |
| 860 effect = effects.front(); | 862 effect = effects.front(); |
| 861 control = controls.front(); | 863 control = controls.front(); |
| 862 } else { | 864 } else { |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1024 } | 1026 } |
| 1025 | 1027 |
| 1026 | 1028 |
| 1027 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { | 1029 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { |
| 1028 return jsgraph()->simplified(); | 1030 return jsgraph()->simplified(); |
| 1029 } | 1031 } |
| 1030 | 1032 |
| 1031 } // namespace compiler | 1033 } // namespace compiler |
| 1032 } // namespace internal | 1034 } // namespace internal |
| 1033 } // namespace v8 | 1035 } // namespace v8 |
| OLD | NEW |