| Index: src/runtime/runtime-maths.cc
|
| diff --git a/src/runtime/runtime-maths.cc b/src/runtime/runtime-maths.cc
|
| index 427d2b868a639df4f52a47cb384eb6fa49cdf862..547fc776a16ae5040db4b961928a1c5d74079cfa 100644
|
| --- a/src/runtime/runtime-maths.cc
|
| +++ b/src/runtime/runtime-maths.cc
|
| @@ -14,13 +14,13 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -#define RUNTIME_UNARY_MATH(Name, name) \
|
| - RUNTIME_FUNCTION(Runtime_Math##Name) { \
|
| - HandleScope scope(isolate); \
|
| - DCHECK(args.length() == 1); \
|
| - isolate->counters()->math_##name()->Increment(); \
|
| - CONVERT_DOUBLE_ARG_CHECKED(x, 0); \
|
| - return *isolate->factory()->NewHeapNumber(std::name(x)); \
|
| +#define RUNTIME_UNARY_MATH(Name, name) \
|
| + RUNTIME_FUNCTION(Runtime_Math##Name) { \
|
| + HandleScope scope(isolate); \
|
| + DCHECK(args.length() == 1); \
|
| + isolate->counters()->math_##name##_runtime()->Increment(); \
|
| + CONVERT_DOUBLE_ARG_CHECKED(x, 0); \
|
| + return *isolate->factory()->NewHeapNumber(std::name(x)); \
|
| }
|
|
|
| RUNTIME_UNARY_MATH(Acos, acos)
|
| @@ -81,8 +81,7 @@ static const double kPiDividedBy4 = 0.78539816339744830962;
|
| RUNTIME_FUNCTION(Runtime_MathAtan2) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 2);
|
| - isolate->counters()->math_atan2()->Increment();
|
| -
|
| + isolate->counters()->math_atan2_runtime()->Increment();
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| CONVERT_DOUBLE_ARG_CHECKED(y, 1);
|
| double result;
|
| @@ -104,7 +103,7 @@ RUNTIME_FUNCTION(Runtime_MathAtan2) {
|
| RUNTIME_FUNCTION(Runtime_MathExpRT) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 1);
|
| - isolate->counters()->math_exp()->Increment();
|
| + isolate->counters()->math_exp_runtime()->Increment();
|
|
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| lazily_initialize_fast_exp(isolate);
|
| @@ -115,7 +114,7 @@ RUNTIME_FUNCTION(Runtime_MathExpRT) {
|
| RUNTIME_FUNCTION(Runtime_MathClz32) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 1);
|
| - isolate->counters()->math_clz32()->Increment();
|
| + isolate->counters()->math_clz32_runtime()->Increment();
|
|
|
| CONVERT_NUMBER_CHECKED(uint32_t, x, Uint32, args[0]);
|
| return *isolate->factory()->NewNumberFromUint(
|
| @@ -126,7 +125,7 @@ RUNTIME_FUNCTION(Runtime_MathClz32) {
|
| RUNTIME_FUNCTION(Runtime_MathFloor) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 1);
|
| - isolate->counters()->math_floor()->Increment();
|
| + isolate->counters()->math_floor_runtime()->Increment();
|
|
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| return *isolate->factory()->NewNumber(Floor(x));
|
| @@ -138,7 +137,7 @@ RUNTIME_FUNCTION(Runtime_MathFloor) {
|
| RUNTIME_FUNCTION(Runtime_MathPow) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 2);
|
| - isolate->counters()->math_pow()->Increment();
|
| + isolate->counters()->math_pow_runtime()->Increment();
|
|
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
|
|
| @@ -161,7 +160,7 @@ RUNTIME_FUNCTION(Runtime_MathPow) {
|
| RUNTIME_FUNCTION(Runtime_MathPowRT) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 2);
|
| - isolate->counters()->math_pow()->Increment();
|
| + isolate->counters()->math_pow_runtime()->Increment();
|
|
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| CONVERT_DOUBLE_ARG_CHECKED(y, 1);
|
| @@ -179,7 +178,7 @@ RUNTIME_FUNCTION(Runtime_RoundNumber) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 1);
|
| CONVERT_NUMBER_ARG_HANDLE_CHECKED(input, 0);
|
| - isolate->counters()->math_round()->Increment();
|
| + isolate->counters()->math_round_runtime()->Increment();
|
|
|
| if (!input->IsHeapNumber()) {
|
| DCHECK(input->IsSmi());
|
| @@ -221,7 +220,7 @@ RUNTIME_FUNCTION(Runtime_RoundNumber) {
|
| RUNTIME_FUNCTION(Runtime_MathSqrt) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 1);
|
| - isolate->counters()->math_sqrt()->Increment();
|
| + isolate->counters()->math_sqrt_runtime()->Increment();
|
|
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| lazily_initialize_fast_sqrt(isolate);
|
|
|