| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 7eb753ab1c9d36f6848efb21f6d7b4f83ae05fa6..30dd724224499cbba7fde69b8b9bf586f249806f 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -34,6 +34,7 @@
|
| #include "src/misc-intrinsics.h"
|
| #include "src/parser.h"
|
| #include "src/platform.h"
|
| +#include "src/rempio2.h"
|
| #include "src/runtime-profiler.h"
|
| #include "src/runtime.h"
|
| #include "src/scopeinfo.h"
|
| @@ -7792,6 +7793,21 @@ RUNTIME_FUNCTION(Runtime_ConstructDouble) {
|
| }
|
|
|
|
|
| +RUNTIME_FUNCTION(Runtime_RemPiO2) {
|
| + HandleScope handle_scope(isolate);
|
| + ASSERT(args.length() == 1);
|
| + CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| + Factory* factory = isolate->factory();
|
| + double y[2];
|
| + int n = rempio2(x, y);
|
| + Handle<FixedArray> array = factory->NewFixedArray(3);
|
| + array->set(0, Smi::FromInt(n));
|
| + array->set(1, *factory->NewHeapNumber(y[0]));
|
| + array->set(2, *factory->NewHeapNumber(y[1]));
|
| + return *factory->NewJSArrayWithElements(array);
|
| +}
|
| +
|
| +
|
| static const double kPiDividedBy4 = 0.78539816339744830962;
|
|
|
|
|
|
|