| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index c5b60e91d2aec12f1ac3ba354bb9982938967aec..e14b99a1e9c7a0366ce1c67f19892aa8e004674b 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -35,6 +35,7 @@
|
| #include "parser.h"
|
| #include "platform.h"
|
| #include "runtime-profiler.h"
|
| +#include "rempio2.h"
|
| #include "runtime.h"
|
| #include "scopeinfo.h"
|
| #include "smart-pointers.h"
|
| @@ -7773,6 +7774,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;
|
|
|
|
|
|
|