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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 7953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7964 CONVERT_DOUBLE_ARG_CHECKED(x, 0); | 7964 CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
7965 return *isolate->factory()->NewNumber(fast_sqrt(x)); | 7965 return *isolate->factory()->NewNumber(fast_sqrt(x)); |
7966 } | 7966 } |
7967 | 7967 |
7968 | 7968 |
7969 RUNTIME_FUNCTION(Runtime_MathFround) { | 7969 RUNTIME_FUNCTION(Runtime_MathFround) { |
7970 HandleScope scope(isolate); | 7970 HandleScope scope(isolate); |
7971 DCHECK(args.length() == 1); | 7971 DCHECK(args.length() == 1); |
7972 | 7972 |
7973 CONVERT_DOUBLE_ARG_CHECKED(x, 0); | 7973 CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
7974 float xf = static_cast<float>(x); | 7974 float xf = DoubleToFloat32(x); |
7975 return *isolate->factory()->NewNumber(xf); | 7975 return *isolate->factory()->NewNumber(xf); |
7976 } | 7976 } |
7977 | 7977 |
7978 | 7978 |
7979 RUNTIME_FUNCTION(Runtime_DateMakeDay) { | 7979 RUNTIME_FUNCTION(Runtime_DateMakeDay) { |
7980 SealHandleScope shs(isolate); | 7980 SealHandleScope shs(isolate); |
7981 DCHECK(args.length() == 2); | 7981 DCHECK(args.length() == 2); |
7982 | 7982 |
7983 CONVERT_SMI_ARG_CHECKED(year, 0); | 7983 CONVERT_SMI_ARG_CHECKED(year, 0); |
7984 CONVERT_SMI_ARG_CHECKED(month, 1); | 7984 CONVERT_SMI_ARG_CHECKED(month, 1); |
(...skipping 7754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15739 } | 15739 } |
15740 return NULL; | 15740 return NULL; |
15741 } | 15741 } |
15742 | 15742 |
15743 | 15743 |
15744 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15744 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15745 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15745 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15746 } | 15746 } |
15747 | 15747 |
15748 } } // namespace v8::internal | 15748 } } // namespace v8::internal |
OLD | NEW |