| 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 7672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7683 return *isolate->factory()->NewNumber(uint64_to_double(result)); | 7683 return *isolate->factory()->NewNumber(uint64_to_double(result)); |
| 7684 } | 7684 } |
| 7685 | 7685 |
| 7686 | 7686 |
| 7687 RUNTIME_FUNCTION(Runtime_RemPiO2) { | 7687 RUNTIME_FUNCTION(Runtime_RemPiO2) { |
| 7688 HandleScope handle_scope(isolate); | 7688 HandleScope handle_scope(isolate); |
| 7689 DCHECK(args.length() == 1); | 7689 DCHECK(args.length() == 1); |
| 7690 CONVERT_DOUBLE_ARG_CHECKED(x, 0); | 7690 CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
| 7691 Factory* factory = isolate->factory(); | 7691 Factory* factory = isolate->factory(); |
| 7692 double y[2]; | 7692 double y[2]; |
| 7693 int n = rempio2(x, y); | 7693 int n = fdlibm::rempio2(x, y); |
| 7694 Handle<FixedArray> array = factory->NewFixedArray(3); | 7694 Handle<FixedArray> array = factory->NewFixedArray(3); |
| 7695 Handle<HeapNumber> y0 = factory->NewHeapNumber(y[0]); | 7695 Handle<HeapNumber> y0 = factory->NewHeapNumber(y[0]); |
| 7696 Handle<HeapNumber> y1 = factory->NewHeapNumber(y[1]); | 7696 Handle<HeapNumber> y1 = factory->NewHeapNumber(y[1]); |
| 7697 array->set(0, Smi::FromInt(n)); | 7697 array->set(0, Smi::FromInt(n)); |
| 7698 array->set(1, *y0); | 7698 array->set(1, *y0); |
| 7699 array->set(2, *y1); | 7699 array->set(2, *y1); |
| 7700 return *factory->NewJSArrayWithElements(array); | 7700 return *factory->NewJSArrayWithElements(array); |
| 7701 } | 7701 } |
| 7702 | 7702 |
| 7703 | 7703 |
| (...skipping 7901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15605 } | 15605 } |
| 15606 return NULL; | 15606 return NULL; |
| 15607 } | 15607 } |
| 15608 | 15608 |
| 15609 | 15609 |
| 15610 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15610 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15611 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15611 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15612 } | 15612 } |
| 15613 | 15613 |
| 15614 } } // namespace v8::internal | 15614 } } // namespace v8::internal |
| OLD | NEW |