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

Side by Side Diff: src/builtins.cc

Issue 2103733003: [turbofan] Introduce Float64Pow and NumberPow operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE on ARM64 bug fix. Created 4 years, 5 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/builtins.h ('k') | src/code-factory.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api-arguments.h" 7 #include "src/api-arguments.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/base/ieee754.h" 10 #include "src/base/ieee754.h"
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2554 Node* value = assembler->Float64Expm1(x_value); 2554 Node* value = assembler->Float64Expm1(x_value);
2555 Node* result = assembler->ChangeFloat64ToTagged(value); 2555 Node* result = assembler->ChangeFloat64ToTagged(value);
2556 assembler->Return(result); 2556 assembler->Return(result);
2557 } 2557 }
2558 2558
2559 // ES6 section 20.2.2.28 Math.round ( x ) 2559 // ES6 section 20.2.2.28 Math.round ( x )
2560 void Builtins::Generate_MathRound(CodeStubAssembler* assembler) { 2560 void Builtins::Generate_MathRound(CodeStubAssembler* assembler) {
2561 Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Round); 2561 Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Round);
2562 } 2562 }
2563 2563
2564 // ES6 section 20.2.2.26 Math.pow ( x, y )
2565 void Builtins::Generate_MathPow(CodeStubAssembler* assembler) {
2566 using compiler::Node;
2567
2568 Node* x = assembler->Parameter(1);
2569 Node* y = assembler->Parameter(2);
2570 Node* context = assembler->Parameter(5);
2571 Node* x_value = assembler->TruncateTaggedToFloat64(context, x);
2572 Node* y_value = assembler->TruncateTaggedToFloat64(context, y);
2573 Node* value = assembler->Float64Pow(x_value, y_value);
2574 Node* result = assembler->ChangeFloat64ToTagged(value);
2575 assembler->Return(result);
2576 }
2577
2564 // ES6 section 20.2.2.30 Math.sin ( x ) 2578 // ES6 section 20.2.2.30 Math.sin ( x )
2565 void Builtins::Generate_MathSin(CodeStubAssembler* assembler) { 2579 void Builtins::Generate_MathSin(CodeStubAssembler* assembler) {
2566 using compiler::Node; 2580 using compiler::Node;
2567 2581
2568 Node* x = assembler->Parameter(1); 2582 Node* x = assembler->Parameter(1);
2569 Node* context = assembler->Parameter(4); 2583 Node* context = assembler->Parameter(4);
2570 Node* x_value = assembler->TruncateTaggedToFloat64(context, x); 2584 Node* x_value = assembler->TruncateTaggedToFloat64(context, x);
2571 Node* value = assembler->Float64Sin(x_value); 2585 Node* value = assembler->Float64Sin(x_value);
2572 Node* result = assembler->ChangeFloat64ToTagged(value); 2586 Node* result = assembler->ChangeFloat64ToTagged(value);
2573 assembler->Return(result); 2587 assembler->Return(result);
(...skipping 3662 matching lines...) Expand 10 before | Expand all | Expand 10 after
6236 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 6250 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
6237 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 6251 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
6238 #undef DEFINE_BUILTIN_ACCESSOR_C 6252 #undef DEFINE_BUILTIN_ACCESSOR_C
6239 #undef DEFINE_BUILTIN_ACCESSOR_A 6253 #undef DEFINE_BUILTIN_ACCESSOR_A
6240 #undef DEFINE_BUILTIN_ACCESSOR_T 6254 #undef DEFINE_BUILTIN_ACCESSOR_T
6241 #undef DEFINE_BUILTIN_ACCESSOR_S 6255 #undef DEFINE_BUILTIN_ACCESSOR_S
6242 #undef DEFINE_BUILTIN_ACCESSOR_H 6256 #undef DEFINE_BUILTIN_ACCESSOR_H
6243 6257
6244 } // namespace internal 6258 } // namespace internal
6245 } // namespace v8 6259 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/code-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698