| 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 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2445 | 2445 |
| 2446 assembler->Bind(&do_clz32); | 2446 assembler->Bind(&do_clz32); |
| 2447 { | 2447 { |
| 2448 Node* x_value = var_clz32_x.value(); | 2448 Node* x_value = var_clz32_x.value(); |
| 2449 Node* value = assembler->Word32Clz(x_value); | 2449 Node* value = assembler->Word32Clz(x_value); |
| 2450 Node* result = assembler->ChangeInt32ToTagged(value); | 2450 Node* result = assembler->ChangeInt32ToTagged(value); |
| 2451 assembler->Return(result); | 2451 assembler->Return(result); |
| 2452 } | 2452 } |
| 2453 } | 2453 } |
| 2454 | 2454 |
| 2455 // ES6 section 20.2.2.14 Math.exp ( x ) | |
| 2456 void Builtins::Generate_MathExp(CodeStubAssembler* assembler) { | |
| 2457 using compiler::Node; | |
| 2458 | |
| 2459 Node* x = assembler->Parameter(1); | |
| 2460 Node* context = assembler->Parameter(4); | |
| 2461 Node* x_value = assembler->TruncateTaggedToFloat64(context, x); | |
| 2462 Node* value = assembler->Float64Exp(x_value); | |
| 2463 Node* result = assembler->ChangeFloat64ToTagged(value); | |
| 2464 assembler->Return(result); | |
| 2465 } | |
| 2466 | |
| 2467 // ES6 section 20.2.2.16 Math.floor ( x ) | 2455 // ES6 section 20.2.2.16 Math.floor ( x ) |
| 2468 void Builtins::Generate_MathFloor(CodeStubAssembler* assembler) { | 2456 void Builtins::Generate_MathFloor(CodeStubAssembler* assembler) { |
| 2469 Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Floor); | 2457 Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Floor); |
| 2470 } | 2458 } |
| 2471 | 2459 |
| 2472 // ES6 section 20.2.2.17 Math.fround ( x ) | 2460 // ES6 section 20.2.2.17 Math.fround ( x ) |
| 2473 BUILTIN(MathFround) { | 2461 BUILTIN(MathFround) { |
| 2474 HandleScope scope(isolate); | 2462 HandleScope scope(isolate); |
| 2475 DCHECK_EQ(2, args.length()); | 2463 DCHECK_EQ(2, args.length()); |
| 2476 Handle<Object> x = args.at<Object>(1); | 2464 Handle<Object> x = args.at<Object>(1); |
| (...skipping 3588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6065 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 6053 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 6066 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 6054 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 6067 #undef DEFINE_BUILTIN_ACCESSOR_C | 6055 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 6068 #undef DEFINE_BUILTIN_ACCESSOR_A | 6056 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 6069 #undef DEFINE_BUILTIN_ACCESSOR_T | 6057 #undef DEFINE_BUILTIN_ACCESSOR_T |
| 6070 #undef DEFINE_BUILTIN_ACCESSOR_S | 6058 #undef DEFINE_BUILTIN_ACCESSOR_S |
| 6071 #undef DEFINE_BUILTIN_ACCESSOR_H | 6059 #undef DEFINE_BUILTIN_ACCESSOR_H |
| 6072 | 6060 |
| 6073 } // namespace internal | 6061 } // namespace internal |
| 6074 } // namespace v8 | 6062 } // namespace v8 |
| OLD | NEW |