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

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

Issue 1021713005: [turbofan]: Integrate basic type feedback for property accesses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 Node* if_false = graph()->NewNode(common()->IfFalse(), branch); 76 Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
77 NodeProperties::ReplaceWithValue(node, jsgraph()->UndefinedConstant(), effect, 77 NodeProperties::ReplaceWithValue(node, jsgraph()->UndefinedConstant(), effect,
78 if_false); 78 if_false);
79 79
80 // True branch: deopt. 80 // True branch: deopt.
81 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); 81 Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
82 Node* deopt = 82 Node* deopt =
83 graph()->NewNode(common()->Deoptimize(), frame_state, effect, if_true); 83 graph()->NewNode(common()->Deoptimize(), frame_state, effect, if_true);
84 84
85 // Connect the deopt to the merge exiting the graph. 85 // Connect the deopt to the merge exiting the graph.
86 Node* end_pred = NodeProperties::GetControlInput(graph()->end()); 86 NodeProperties::MergeControlToEnd(graph(), common(), deopt);
87 if (end_pred->opcode() == IrOpcode::kMerge) {
88 int inputs = end_pred->op()->ControlInputCount() + 1;
89 end_pred->AppendInput(graph()->zone(), deopt);
90 end_pred->set_op(common()->Merge(inputs));
91 } else {
92 Node* merge = graph()->NewNode(common()->Merge(2), end_pred, deopt);
93 NodeProperties::ReplaceControlInput(graph()->end(), merge);
94 }
95 87
96 return Changed(deopt); 88 return Changed(deopt);
97 } 89 }
98 90
99 91
100 Reduction JSIntrinsicLowering::ReduceInlineIsSmi(Node* node) { 92 Reduction JSIntrinsicLowering::ReduceInlineIsSmi(Node* node) {
101 return Change(node, simplified()->ObjectIsSmi()); 93 return Change(node, simplified()->ObjectIsSmi());
102 } 94 }
103 95
104 96
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 285 }
294 286
295 287
296 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { 288 MachineOperatorBuilder* JSIntrinsicLowering::machine() const {
297 return jsgraph()->machine(); 289 return jsgraph()->machine();
298 } 290 }
299 291
300 } // namespace compiler 292 } // namespace compiler
301 } // namespace internal 293 } // namespace internal
302 } // namespace v8 294 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698