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

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

Issue 1468313004: Make fast_exp take an Isolate* paramter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « src/codegen.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/safe_math.h" 8 #include "src/base/safe_math.h"
9 #include "src/crankshaft/hydrogen-infer-representation.h" 9 #include "src/crankshaft/hydrogen-infer-representation.h"
10 #include "src/double.h" 10 #include "src/double.h"
(...skipping 4062 matching lines...) Expand 10 before | Expand all | Expand 10 after
4073 return H_CONSTANT_DOUBLE(d); 4073 return H_CONSTANT_DOUBLE(d);
4074 case kMathClz32: 4074 case kMathClz32:
4075 return H_CONSTANT_INT(32); 4075 return H_CONSTANT_INT(32);
4076 default: 4076 default:
4077 UNREACHABLE(); 4077 UNREACHABLE();
4078 break; 4078 break;
4079 } 4079 }
4080 } 4080 }
4081 switch (op) { 4081 switch (op) {
4082 case kMathExp: 4082 case kMathExp:
4083 return H_CONSTANT_DOUBLE(fast_exp(d)); 4083 lazily_initialize_fast_exp(isolate);
4084 return H_CONSTANT_DOUBLE(fast_exp(d, isolate));
4084 case kMathLog: 4085 case kMathLog:
4085 return H_CONSTANT_DOUBLE(std::log(d)); 4086 return H_CONSTANT_DOUBLE(std::log(d));
4086 case kMathSqrt: 4087 case kMathSqrt:
4087 return H_CONSTANT_DOUBLE(fast_sqrt(d)); 4088 return H_CONSTANT_DOUBLE(fast_sqrt(d));
4088 case kMathPowHalf: 4089 case kMathPowHalf:
4089 return H_CONSTANT_DOUBLE(power_double_double(d, 0.5)); 4090 return H_CONSTANT_DOUBLE(power_double_double(d, 0.5));
4090 case kMathAbs: 4091 case kMathAbs:
4091 return H_CONSTANT_DOUBLE((d >= 0.0) ? d + 0.0 : -d); 4092 return H_CONSTANT_DOUBLE((d >= 0.0) ? d + 0.0 : -d);
4092 case kMathRound: 4093 case kMathRound:
4093 // -0.5 .. -0.0 round to -0.0. 4094 // -0.5 .. -0.0 round to -0.0.
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
4694 case HObjectAccess::kExternalMemory: 4695 case HObjectAccess::kExternalMemory:
4695 os << "[external-memory]"; 4696 os << "[external-memory]";
4696 break; 4697 break;
4697 } 4698 }
4698 4699
4699 return os << "@" << access.offset(); 4700 return os << "@" << access.offset();
4700 } 4701 }
4701 4702
4702 } // namespace internal 4703 } // namespace internal
4703 } // namespace v8 4704 } // namespace v8
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698