Move fdlibm from v8::internal to v8::fdlibm.

R=akos.palfi@imgtec.com

Review URL: https://codereview.chromium.org/446863002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2014-08-06 13:45:59 +00:00
parent 5894a48d37
commit 30c563bcc0
4 changed files with 9 additions and 8 deletions

View File

@ -2651,11 +2651,12 @@ Genesis::Genesis(Isolate* isolate,
NONE).Assert();
// Initialize trigonometric lookup tables and constants.
const int constants_size = ARRAY_SIZE(TrigonometricConstants::constants);
const int constants_size =
ARRAY_SIZE(fdlibm::TrigonometricConstants::constants);
const int table_num_bytes = constants_size * kDoubleSize;
v8::Local<v8::ArrayBuffer> trig_buffer = v8::ArrayBuffer::New(
reinterpret_cast<v8::Isolate*>(isolate),
const_cast<double*>(TrigonometricConstants::constants),
const_cast<double*>(fdlibm::TrigonometricConstants::constants),
table_num_bytes);
v8::Local<v8::Float64Array> trig_table =
v8::Float64Array::New(trig_buffer, 0, constants_size);

View File

@ -7690,7 +7690,7 @@ RUNTIME_FUNCTION(Runtime_RemPiO2) {
CONVERT_DOUBLE_ARG_CHECKED(x, 0);
Factory* factory = isolate->factory();
double y[2];
int n = rempio2(x, y);
int n = fdlibm::rempio2(x, y);
Handle<FixedArray> array = factory->NewFixedArray(3);
Handle<HeapNumber> y0 = factory->NewHeapNumber(y[0]);
Handle<HeapNumber> y1 = factory->NewHeapNumber(y[1]);

View File

@ -20,7 +20,7 @@
namespace v8 {
namespace internal {
namespace fdlibm {
#ifdef _MSC_VER
inline double scalbn(double x, int y) { return _scalb(x, y); }
@ -228,7 +228,7 @@ recompute:
int rempio2(double x, double* y) {
int32_t hx = static_cast<int32_t>(double_to_uint64(x) >> 32);
int32_t hx = static_cast<int32_t>(internal::double_to_uint64(x) >> 32);
int32_t ix = hx & 0x7fffffff;
if (ix >= 0x7ff00000) {
@ -237,9 +237,9 @@ int rempio2(double x, double* y) {
}
int32_t e0 = (ix >> 20) - 1046;
uint64_t zi = double_to_uint64(x) & 0xFFFFFFFFu;
uint64_t zi = internal::double_to_uint64(x) & 0xFFFFFFFFu;
zi |= static_cast<uint64_t>(ix - (e0 << 20)) << 32;
double z = uint64_to_double(zi);
double z = internal::uint64_to_double(zi);
double tx[3];
for (int i = 0; i < 2; i++) {

View File

@ -17,7 +17,7 @@
#define V8_FDLIBM_H_
namespace v8 {
namespace internal {
namespace fdlibm {
int rempio2(double x, double* y);