Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: src/compiler/js-intrinsic-lowering.cc

Issue 2161543002: [turbofan] Add support for eager/soft deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do the ports properly Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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-intrinsic-lowering.h" 5 #include "src/compiler/js-intrinsic-lowering.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 99
100 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { 100 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) {
101 if (mode() != kDeoptimizationEnabled) return NoChange(); 101 if (mode() != kDeoptimizationEnabled) return NoChange();
102 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 0); 102 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 0);
103 Node* const effect = NodeProperties::GetEffectInput(node); 103 Node* const effect = NodeProperties::GetEffectInput(node);
104 Node* const control = NodeProperties::GetControlInput(node); 104 Node* const control = NodeProperties::GetControlInput(node);
105 105
106 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer. 106 // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer.
107 Node* deoptimize = 107 Node* deoptimize = graph()->NewNode(
108 graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager), 108 common()->Deoptimize(DeoptimizeKind::kEager, DeoptimizeReason::kNoReason),
109 frame_state, effect, control); 109 frame_state, effect, control);
110 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize); 110 NodeProperties::MergeControlToEnd(graph(), common(), deoptimize);
111 Revisit(graph()->end()); 111 Revisit(graph()->end());
112 112
113 node->TrimInputCount(0); 113 node->TrimInputCount(0);
114 NodeProperties::ChangeOp(node, common()->Dead()); 114 NodeProperties::ChangeOp(node, common()->Dead());
115 return Changed(node); 115 return Changed(node);
116 } 116 }
117 117
118 Reduction JSIntrinsicLowering::ReduceGeneratorClose(Node* node) { 118 Reduction JSIntrinsicLowering::ReduceGeneratorClose(Node* node) {
119 Node* const generator = NodeProperties::GetValueInput(node, 0); 119 Node* const generator = NodeProperties::GetValueInput(node, 0);
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 393
394 394
395 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { 395 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const {
396 return jsgraph()->simplified(); 396 return jsgraph()->simplified();
397 } 397 }
398 398
399 } // namespace compiler 399 } // namespace compiler
400 } // namespace internal 400 } // namespace internal
401 } // namespace v8 401 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/js-native-context-specialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698