| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/change-lowering.h" | 5 #include "src/compiler/change-lowering.h" |
| 6 | 6 |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 value = graph()->NewNode(machine()->WordSar(), value, SmiShiftBitsConstant()); | 90 value = graph()->NewNode(machine()->WordSar(), value, SmiShiftBitsConstant()); |
| 91 if (machine()->Is64()) { | 91 if (machine()->Is64()) { |
| 92 value = graph()->NewNode(machine()->TruncateInt64ToInt32(), value); | 92 value = graph()->NewNode(machine()->TruncateInt64ToInt32(), value); |
| 93 } | 93 } |
| 94 return value; | 94 return value; |
| 95 } | 95 } |
| 96 | 96 |
| 97 | 97 |
| 98 Node* ChangeLowering::LoadHeapNumberValue(Node* value, Node* control) { | 98 Node* ChangeLowering::LoadHeapNumberValue(Node* value, Node* control) { |
| 99 return graph()->NewNode(machine()->Load(kMachFloat64), value, | 99 return graph()->NewNode(machine()->Load(kMachFloat64), value, |
| 100 HeapNumberValueIndexConstant(), | 100 HeapNumberValueIndexConstant(), graph()->start(), |
| 101 graph()->NewNode(common()->ControlEffect(), control)); | 101 control); |
| 102 } | 102 } |
| 103 | 103 |
| 104 | 104 |
| 105 Reduction ChangeLowering::ChangeBitToBool(Node* val, Node* control) { | 105 Reduction ChangeLowering::ChangeBitToBool(Node* val, Node* control) { |
| 106 Node* branch = graph()->NewNode(common()->Branch(), val, control); | 106 Node* branch = graph()->NewNode(common()->Branch(), val, control); |
| 107 | 107 |
| 108 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); | 108 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); |
| 109 Node* true_value = jsgraph()->TrueConstant(); | 109 Node* true_value = jsgraph()->TrueConstant(); |
| 110 | 110 |
| 111 Node* if_false = graph()->NewNode(common()->IfFalse(), branch); | 111 Node* if_false = graph()->NewNode(common()->IfFalse(), branch); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 } | 248 } |
| 249 | 249 |
| 250 | 250 |
| 251 MachineOperatorBuilder* ChangeLowering::machine() const { | 251 MachineOperatorBuilder* ChangeLowering::machine() const { |
| 252 return jsgraph()->machine(); | 252 return jsgraph()->machine(); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace compiler | 255 } // namespace compiler |
| 256 } // namespace internal | 256 } // namespace internal |
| 257 } // namespace v8 | 257 } // namespace v8 |
| OLD | NEW |