| 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/machine-operator-reducer.h" | 5 #include "src/compiler/machine-operator-reducer.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
| 9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 } | 395 } |
| 396 if (m.left().IsNaN()) { | 396 if (m.left().IsNaN()) { |
| 397 return Replace(m.left().node()); | 397 return Replace(m.left().node()); |
| 398 } | 398 } |
| 399 if (m.IsFoldable()) { | 399 if (m.IsFoldable()) { |
| 400 return ReplaceFloat64( | 400 return ReplaceFloat64( |
| 401 base::ieee754::atan2(m.left().Value(), m.right().Value())); | 401 base::ieee754::atan2(m.left().Value(), m.right().Value())); |
| 402 } | 402 } |
| 403 break; | 403 break; |
| 404 } | 404 } |
| 405 case IrOpcode::kFloat64Exp: { | |
| 406 Float64Matcher m(node->InputAt(0)); | |
| 407 if (m.HasValue()) return ReplaceFloat64(base::ieee754::exp(m.Value())); | |
| 408 break; | |
| 409 } | |
| 410 case IrOpcode::kFloat64Log: { | 405 case IrOpcode::kFloat64Log: { |
| 411 Float64Matcher m(node->InputAt(0)); | 406 Float64Matcher m(node->InputAt(0)); |
| 412 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log(m.Value())); | 407 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log(m.Value())); |
| 413 break; | 408 break; |
| 414 } | 409 } |
| 415 case IrOpcode::kFloat64Log1p: { | 410 case IrOpcode::kFloat64Log1p: { |
| 416 Float64Matcher m(node->InputAt(0)); | 411 Float64Matcher m(node->InputAt(0)); |
| 417 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log1p(m.Value())); | 412 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log1p(m.Value())); |
| 418 break; | 413 break; |
| 419 } | 414 } |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 MachineOperatorBuilder* MachineOperatorReducer::machine() const { | 1112 MachineOperatorBuilder* MachineOperatorReducer::machine() const { |
| 1118 return jsgraph()->machine(); | 1113 return jsgraph()->machine(); |
| 1119 } | 1114 } |
| 1120 | 1115 |
| 1121 | 1116 |
| 1122 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } | 1117 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } |
| 1123 | 1118 |
| 1124 } // namespace compiler | 1119 } // namespace compiler |
| 1125 } // namespace internal | 1120 } // namespace internal |
| 1126 } // namespace v8 | 1121 } // namespace v8 |
| OLD | NEW |