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

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

Issue 2077533002: [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Import tests from Raymond. 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/ieee754.h"
9 #include "src/base/safe_math.h" 9 #include "src/base/safe_math.h"
10 #include "src/crankshaft/hydrogen-infer-representation.h" 10 #include "src/crankshaft/hydrogen-infer-representation.h"
(...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 return H_CONSTANT_DOUBLE(d); 3416 return H_CONSTANT_DOUBLE(d);
3417 case kMathClz32: 3417 case kMathClz32:
3418 return H_CONSTANT_INT(32); 3418 return H_CONSTANT_INT(32);
3419 default: 3419 default:
3420 UNREACHABLE(); 3420 UNREACHABLE();
3421 break; 3421 break;
3422 } 3422 }
3423 } 3423 }
3424 switch (op) { 3424 switch (op) {
3425 case kMathExp: 3425 case kMathExp:
3426 lazily_initialize_fast_exp(isolate); 3426 return H_CONSTANT_DOUBLE(base::ieee754::exp(d));
3427 return H_CONSTANT_DOUBLE(fast_exp(d, isolate));
3428 case kMathLog: 3427 case kMathLog:
3429 return H_CONSTANT_DOUBLE(base::ieee754::log(d)); 3428 return H_CONSTANT_DOUBLE(base::ieee754::log(d));
3430 case kMathSqrt: 3429 case kMathSqrt:
3431 lazily_initialize_fast_sqrt(isolate); 3430 lazily_initialize_fast_sqrt(isolate);
3432 return H_CONSTANT_DOUBLE(fast_sqrt(d, isolate)); 3431 return H_CONSTANT_DOUBLE(fast_sqrt(d, isolate));
3433 case kMathPowHalf: 3432 case kMathPowHalf:
3434 return H_CONSTANT_DOUBLE(power_double_double(d, 0.5)); 3433 return H_CONSTANT_DOUBLE(power_double_double(d, 0.5));
3435 case kMathAbs: 3434 case kMathAbs:
3436 return H_CONSTANT_DOUBLE((d >= 0.0) ? d + 0.0 : -d); 3435 return H_CONSTANT_DOUBLE((d >= 0.0) ? d + 0.0 : -d);
3437 case kMathRound: 3436 case kMathRound:
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
4032 case HObjectAccess::kExternalMemory: 4031 case HObjectAccess::kExternalMemory:
4033 os << "[external-memory]"; 4032 os << "[external-memory]";
4034 break; 4033 break;
4035 } 4034 }
4036 4035
4037 return os << "@" << access.offset(); 4036 return os << "@" << access.offset();
4038 } 4037 }
4039 4038
4040 } // namespace internal 4039 } // namespace internal
4041 } // namespace v8 4040 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698