Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(924)

Side by Side Diff: src/crankshaft/hydrogen-instructions.cc

Issue 2053893003: [builtins] Introduce proper base::ieee754::log. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: BUILD.gn Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "src/crankshaft/hydrogen-instructions.h" 5 #include "src/crankshaft/hydrogen-instructions.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/ieee754.h"
8 #include "src/base/safe_math.h" 9 #include "src/base/safe_math.h"
9 #include "src/crankshaft/hydrogen-infer-representation.h" 10 #include "src/crankshaft/hydrogen-infer-representation.h"
10 #include "src/double.h" 11 #include "src/double.h"
11 #include "src/elements.h" 12 #include "src/elements.h"
12 #include "src/factory.h" 13 #include "src/factory.h"
13 14
14 #if V8_TARGET_ARCH_IA32 15 #if V8_TARGET_ARCH_IA32
15 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT 16 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT
16 #elif V8_TARGET_ARCH_X64 17 #elif V8_TARGET_ARCH_X64
17 #include "src/crankshaft/x64/lithium-x64.h" // NOLINT 18 #include "src/crankshaft/x64/lithium-x64.h" // NOLINT
(...skipping 3400 matching lines...) Expand 10 before | Expand all | Expand 10 after
3418 default: 3419 default:
3419 UNREACHABLE(); 3420 UNREACHABLE();
3420 break; 3421 break;
3421 } 3422 }
3422 } 3423 }
3423 switch (op) { 3424 switch (op) {
3424 case kMathExp: 3425 case kMathExp:
3425 lazily_initialize_fast_exp(isolate); 3426 lazily_initialize_fast_exp(isolate);
3426 return H_CONSTANT_DOUBLE(fast_exp(d, isolate)); 3427 return H_CONSTANT_DOUBLE(fast_exp(d, isolate));
3427 case kMathLog: 3428 case kMathLog:
3428 return H_CONSTANT_DOUBLE(std::log(d)); 3429 return H_CONSTANT_DOUBLE(base::ieee754::log(d));
3429 case kMathSqrt: 3430 case kMathSqrt:
3430 lazily_initialize_fast_sqrt(isolate); 3431 lazily_initialize_fast_sqrt(isolate);
3431 return H_CONSTANT_DOUBLE(fast_sqrt(d, isolate)); 3432 return H_CONSTANT_DOUBLE(fast_sqrt(d, isolate));
3432 case kMathPowHalf: 3433 case kMathPowHalf:
3433 return H_CONSTANT_DOUBLE(power_double_double(d, 0.5)); 3434 return H_CONSTANT_DOUBLE(power_double_double(d, 0.5));
3434 case kMathAbs: 3435 case kMathAbs:
3435 return H_CONSTANT_DOUBLE((d >= 0.0) ? d + 0.0 : -d); 3436 return H_CONSTANT_DOUBLE((d >= 0.0) ? d + 0.0 : -d);
3436 case kMathRound: 3437 case kMathRound:
3437 // -0.5 .. -0.0 round to -0.0. 3438 // -0.5 .. -0.0 round to -0.0.
3438 if ((d >= -0.5 && Double(d).Sign() < 0)) return H_CONSTANT_DOUBLE(-0.0); 3439 if ((d >= -0.5 && Double(d).Sign() < 0)) return H_CONSTANT_DOUBLE(-0.0);
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
4031 case HObjectAccess::kExternalMemory: 4032 case HObjectAccess::kExternalMemory:
4032 os << "[external-memory]"; 4033 os << "[external-memory]";
4033 break; 4034 break;
4034 } 4035 }
4035 4036
4036 return os << "@" << access.offset(); 4037 return os << "@" << access.offset();
4037 } 4038 }
4038 4039
4039 } // namespace internal 4040 } // namespace internal
4040 } // namespace v8 4041 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698