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

Side by Side Diff: src/compiler/machine-operator-reducer.cc

Issue 2073123002: [builtins] Introduce proper Float64Cos and Float64Sin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 if (m.IsFoldable()) { 393 if (m.IsFoldable()) {
394 return ReplaceFloat64( 394 return ReplaceFloat64(
395 base::ieee754::atan2(m.left().Value(), m.right().Value())); 395 base::ieee754::atan2(m.left().Value(), m.right().Value()));
396 } 396 }
397 break; 397 break;
398 } 398 }
399 case IrOpcode::kFloat64Atanh: { 399 case IrOpcode::kFloat64Atanh: {
400 Float64Matcher m(node->InputAt(0)); 400 Float64Matcher m(node->InputAt(0));
401 if (m.HasValue()) return ReplaceFloat64(base::ieee754::atanh(m.Value())); 401 if (m.HasValue()) return ReplaceFloat64(base::ieee754::atanh(m.Value()));
402 }
mvstanton 2016/06/17 13:51:19 Missing break
403 case IrOpcode::kFloat64Cos: {
404 Float64Matcher m(node->InputAt(0));
405 if (m.HasValue()) return ReplaceFloat64(base::ieee754::cos(m.Value()));
402 break; 406 break;
403 } 407 }
404 case IrOpcode::kFloat64Exp: { 408 case IrOpcode::kFloat64Exp: {
405 Float64Matcher m(node->InputAt(0)); 409 Float64Matcher m(node->InputAt(0));
406 if (m.HasValue()) return ReplaceFloat64(base::ieee754::exp(m.Value())); 410 if (m.HasValue()) return ReplaceFloat64(base::ieee754::exp(m.Value()));
407 break; 411 break;
408 } 412 }
409 case IrOpcode::kFloat64Expm1: { 413 case IrOpcode::kFloat64Expm1: {
410 Float64Matcher m(node->InputAt(0)); 414 Float64Matcher m(node->InputAt(0));
411 if (m.HasValue()) return ReplaceFloat64(base::ieee754::expm1(m.Value())); 415 if (m.HasValue()) return ReplaceFloat64(base::ieee754::expm1(m.Value()));
(...skipping 15 matching lines...) Expand all
427 break; 431 break;
428 } 432 }
429 case IrOpcode::kFloat64Log10: { 433 case IrOpcode::kFloat64Log10: {
430 Float64Matcher m(node->InputAt(0)); 434 Float64Matcher m(node->InputAt(0));
431 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log10(m.Value())); 435 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log10(m.Value()));
432 break; 436 break;
433 } 437 }
434 case IrOpcode::kFloat64Cbrt: { 438 case IrOpcode::kFloat64Cbrt: {
435 Float64Matcher m(node->InputAt(0)); 439 Float64Matcher m(node->InputAt(0));
436 if (m.HasValue()) return ReplaceFloat64(base::ieee754::cbrt(m.Value())); 440 if (m.HasValue()) return ReplaceFloat64(base::ieee754::cbrt(m.Value()));
441 }
442 case IrOpcode::kFloat64Sin: {
443 Float64Matcher m(node->InputAt(0));
444 if (m.HasValue()) return ReplaceFloat64(base::ieee754::sin(m.Value()));
437 break; 445 break;
438 } 446 }
439 case IrOpcode::kChangeFloat32ToFloat64: { 447 case IrOpcode::kChangeFloat32ToFloat64: {
440 Float32Matcher m(node->InputAt(0)); 448 Float32Matcher m(node->InputAt(0));
441 if (m.HasValue()) return ReplaceFloat64(m.Value()); 449 if (m.HasValue()) return ReplaceFloat64(m.Value());
442 break; 450 break;
443 } 451 }
444 case IrOpcode::kChangeFloat64ToInt32: { 452 case IrOpcode::kChangeFloat64ToInt32: {
445 Float64Matcher m(node->InputAt(0)); 453 Float64Matcher m(node->InputAt(0));
446 if (m.HasValue()) return ReplaceInt32(FastD2I(m.Value())); 454 if (m.HasValue()) return ReplaceInt32(FastD2I(m.Value()));
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 MachineOperatorBuilder* MachineOperatorReducer::machine() const { 1153 MachineOperatorBuilder* MachineOperatorReducer::machine() const {
1146 return jsgraph()->machine(); 1154 return jsgraph()->machine();
1147 } 1155 }
1148 1156
1149 1157
1150 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } 1158 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); }
1151 1159
1152 } // namespace compiler 1160 } // namespace compiler
1153 } // namespace internal 1161 } // namespace internal
1154 } // namespace v8 1162 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698