OLD | NEW |
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 Loading... |
2554 using compiler::Node; | 2554 using compiler::Node; |
2555 | 2555 |
2556 Node* x = assembler->Parameter(1); | 2556 Node* x = assembler->Parameter(1); |
2557 Node* context = assembler->Parameter(4); | 2557 Node* context = assembler->Parameter(4); |
2558 Node* x_value = assembler->TruncateTaggedToFloat64(context, x); | 2558 Node* x_value = assembler->TruncateTaggedToFloat64(context, x); |
2559 Node* value = assembler->Float64Sqrt(x_value); | 2559 Node* value = assembler->Float64Sqrt(x_value); |
2560 Node* result = assembler->ChangeFloat64ToTagged(value); | 2560 Node* result = assembler->ChangeFloat64ToTagged(value); |
2561 assembler->Return(result); | 2561 assembler->Return(result); |
2562 } | 2562 } |
2563 | 2563 |
| 2564 // ES6 section 20.2.2.33 Math.tan ( x ) |
| 2565 void Builtins::Generate_MathTan(CodeStubAssembler* assembler) { |
| 2566 using compiler::Node; |
| 2567 |
| 2568 Node* x = assembler->Parameter(1); |
| 2569 Node* context = assembler->Parameter(4); |
| 2570 Node* x_value = assembler->TruncateTaggedToFloat64(context, x); |
| 2571 Node* value = assembler->Float64Tan(x_value); |
| 2572 Node* result = assembler->ChangeFloat64ToTagged(value); |
| 2573 assembler->Return(result); |
| 2574 } |
| 2575 |
2564 // ES6 section 20.2.2.35 Math.trunc ( x ) | 2576 // ES6 section 20.2.2.35 Math.trunc ( x ) |
2565 void Builtins::Generate_MathTrunc(CodeStubAssembler* assembler) { | 2577 void Builtins::Generate_MathTrunc(CodeStubAssembler* assembler) { |
2566 Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Trunc); | 2578 Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Trunc); |
2567 } | 2579 } |
2568 | 2580 |
2569 // ----------------------------------------------------------------------------- | 2581 // ----------------------------------------------------------------------------- |
2570 // ES6 section 19.2 Function Objects | 2582 // ES6 section 19.2 Function Objects |
2571 | 2583 |
2572 // ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V ) | 2584 // ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V ) |
2573 void Builtins::Generate_FunctionPrototypeHasInstance( | 2585 void Builtins::Generate_FunctionPrototypeHasInstance( |
(...skipping 3479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6053 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 6065 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
6054 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 6066 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
6055 #undef DEFINE_BUILTIN_ACCESSOR_C | 6067 #undef DEFINE_BUILTIN_ACCESSOR_C |
6056 #undef DEFINE_BUILTIN_ACCESSOR_A | 6068 #undef DEFINE_BUILTIN_ACCESSOR_A |
6057 #undef DEFINE_BUILTIN_ACCESSOR_T | 6069 #undef DEFINE_BUILTIN_ACCESSOR_T |
6058 #undef DEFINE_BUILTIN_ACCESSOR_S | 6070 #undef DEFINE_BUILTIN_ACCESSOR_S |
6059 #undef DEFINE_BUILTIN_ACCESSOR_H | 6071 #undef DEFINE_BUILTIN_ACCESSOR_H |
6060 | 6072 |
6061 } // namespace internal | 6073 } // namespace internal |
6062 } // namespace v8 | 6074 } // namespace v8 |
OLD | NEW |