| 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-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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 Revisit(graph()->end()); | 130 Revisit(graph()->end()); |
| 131 | 131 |
| 132 node->TrimInputCount(0); | 132 node->TrimInputCount(0); |
| 133 NodeProperties::ChangeOp(node, common()->Dead()); | 133 NodeProperties::ChangeOp(node, common()->Dead()); |
| 134 return Changed(node); | 134 return Changed(node); |
| 135 } | 135 } |
| 136 | 136 |
| 137 | 137 |
| 138 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) { | 138 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) { |
| 139 // Tell the compiler to assume number input. | 139 // Tell the compiler to assume number input. |
| 140 Node* renamed = graph()->NewNode(common()->Guard(Type::Number()), | 140 Node* renamed = graph()->NewNode(simplified()->TypeGuard(Type::Number()), |
| 141 node->InputAt(0), graph()->start()); | 141 node->InputAt(0), graph()->start()); |
| 142 node->ReplaceInput(0, renamed); | 142 node->ReplaceInput(0, renamed); |
| 143 return Change(node, machine()->Float64ExtractHighWord32()); | 143 return Change(node, machine()->Float64ExtractHighWord32()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 | 146 |
| 147 Reduction JSIntrinsicLowering::ReduceDoubleLo(Node* node) { | 147 Reduction JSIntrinsicLowering::ReduceDoubleLo(Node* node) { |
| 148 // Tell the compiler to assume number input. | 148 // Tell the compiler to assume number input. |
| 149 Node* renamed = graph()->NewNode(common()->Guard(Type::Number()), | 149 Node* renamed = graph()->NewNode(simplified()->TypeGuard(Type::Number()), |
| 150 node->InputAt(0), graph()->start()); | 150 node->InputAt(0), graph()->start()); |
| 151 node->ReplaceInput(0, renamed); | 151 node->ReplaceInput(0, renamed); |
| 152 return Change(node, machine()->Float64ExtractLowWord32()); | 152 return Change(node, machine()->Float64ExtractLowWord32()); |
| 153 } | 153 } |
| 154 | 154 |
| 155 | 155 |
| 156 Reduction JSIntrinsicLowering::ReduceIsInstanceType( | 156 Reduction JSIntrinsicLowering::ReduceIsInstanceType( |
| 157 Node* node, InstanceType instance_type) { | 157 Node* node, InstanceType instance_type) { |
| 158 // if (%_IsSmi(value)) { | 158 // if (%_IsSmi(value)) { |
| 159 // return false; | 159 // return false; |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 } | 477 } |
| 478 | 478 |
| 479 | 479 |
| 480 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { | 480 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { |
| 481 return jsgraph()->simplified(); | 481 return jsgraph()->simplified(); |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace compiler | 484 } // namespace compiler |
| 485 } // namespace internal | 485 } // namespace internal |
| 486 } // namespace v8 | 486 } // namespace v8 |
| OLD | NEW |