| OLD | NEW | 
|    1  |    1  | 
|    2 // Copyright 2015 the V8 project authors. All rights reserved. |    2 // Copyright 2015 the V8 project authors. All rights reserved. | 
|    3 // Use of this source code is governed by a BSD-style license that can be |    3 // Use of this source code is governed by a BSD-style license that can be | 
|    4 // found in the LICENSE file. |    4 // found in the LICENSE file. | 
|    5  |    5  | 
|    6 #include "src/compiler/js-intrinsic-lowering.h" |    6 #include "src/compiler/js-intrinsic-lowering.h" | 
|    7  |    7  | 
|    8 #include "src/compiler/access-builder.h" |    8 #include "src/compiler/access-builder.h" | 
|    9 #include "src/compiler/js-graph.h" |    9 #include "src/compiler/js-graph.h" | 
|   10 #include "src/compiler/node-properties.h" |   10 #include "src/compiler/node-properties.h" | 
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  104   Node* if_false = graph()->NewNode(common()->IfFalse(), branch); |  104   Node* if_false = graph()->NewNode(common()->IfFalse(), branch); | 
|  105   NodeProperties::ReplaceWithValue(node, jsgraph()->UndefinedConstant(), effect, |  105   NodeProperties::ReplaceWithValue(node, jsgraph()->UndefinedConstant(), effect, | 
|  106                                    if_false); |  106                                    if_false); | 
|  107  |  107  | 
|  108   // True branch: deopt. |  108   // True branch: deopt. | 
|  109   Node* if_true = graph()->NewNode(common()->IfTrue(), branch); |  109   Node* if_true = graph()->NewNode(common()->IfTrue(), branch); | 
|  110   Node* deopt = |  110   Node* deopt = | 
|  111       graph()->NewNode(common()->Deoptimize(), frame_state, effect, if_true); |  111       graph()->NewNode(common()->Deoptimize(), frame_state, effect, if_true); | 
|  112  |  112  | 
|  113   // Connect the deopt to the merge exiting the graph. |  113   // Connect the deopt to the merge exiting the graph. | 
|  114   Node* end_pred = NodeProperties::GetControlInput(graph()->end()); |  114   NodeProperties::MergeControlToEnd(graph(), common(), deopt); | 
|  115   if (end_pred->opcode() == IrOpcode::kMerge) { |  | 
|  116     int inputs = end_pred->op()->ControlInputCount() + 1; |  | 
|  117     end_pred->AppendInput(graph()->zone(), deopt); |  | 
|  118     end_pred->set_op(common()->Merge(inputs)); |  | 
|  119   } else { |  | 
|  120     Node* merge = graph()->NewNode(common()->Merge(2), end_pred, deopt); |  | 
|  121     NodeProperties::ReplaceControlInput(graph()->end(), merge); |  | 
|  122   } |  | 
|  123  |  115  | 
|  124   return Changed(deopt); |  116   return Changed(deopt); | 
|  125 } |  117 } | 
|  126  |  118  | 
|  127  |  119  | 
|  128 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) { |  120 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) { | 
|  129   return Change(node, machine()->Float64ExtractHighWord32()); |  121   return Change(node, machine()->Float64ExtractHighWord32()); | 
|  130 } |  122 } | 
|  131  |  123  | 
|  132  |  124  | 
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  368 } |  360 } | 
|  369  |  361  | 
|  370  |  362  | 
|  371 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { |  363 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { | 
|  372   return jsgraph()->machine(); |  364   return jsgraph()->machine(); | 
|  373 } |  365 } | 
|  374  |  366  | 
|  375 }  // namespace compiler |  367 }  // namespace compiler | 
|  376 }  // namespace internal |  368 }  // namespace internal | 
|  377 }  // namespace v8 |  369 }  // namespace v8 | 
| OLD | NEW |