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

Side by Side Diff: src/arm64/simulator-arm64.cc

Issue 1473683004: Lazily initialize fast_sqrt() and pass an Isolate parameter to it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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/arm64/codegen-arm64.cc ('k') | src/assembler.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <cmath> 6 #include <cmath>
7 #include <cstdarg> 7 #include <cstdarg>
8 8
9 #if V8_TARGET_ARCH_ARM64 9 #if V8_TARGET_ARCH_ARM64
10 10
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 } 3098 }
3099 3099
3100 3100
3101 template <typename T> 3101 template <typename T>
3102 T Simulator::FPSqrt(T op) { 3102 T Simulator::FPSqrt(T op) {
3103 if (std::isnan(op)) { 3103 if (std::isnan(op)) {
3104 return FPProcessNaN(op); 3104 return FPProcessNaN(op);
3105 } else if (op < 0.0) { 3105 } else if (op < 0.0) {
3106 return FPDefaultNaN<T>(); 3106 return FPDefaultNaN<T>();
3107 } else { 3107 } else {
3108 return fast_sqrt(op); 3108 lazily_initialize_fast_sqrt(isolate_);
3109 return fast_sqrt(op, isolate_);
3109 } 3110 }
3110 } 3111 }
3111 3112
3112 3113
3113 template <typename T> 3114 template <typename T>
3114 T Simulator::FPSub(T op1, T op2) { 3115 T Simulator::FPSub(T op1, T op2) {
3115 // NaNs should be handled elsewhere. 3116 // NaNs should be handled elsewhere.
3116 DCHECK(!std::isnan(op1) && !std::isnan(op2)); 3117 DCHECK(!std::isnan(op1) && !std::isnan(op2));
3117 3118
3118 if (std::isinf(op1) && std::isinf(op2) && (op1 == op2)) { 3119 if (std::isinf(op1) && std::isinf(op2) && (op1 == op2)) {
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
3836 delete[] format; 3837 delete[] format;
3837 } 3838 }
3838 3839
3839 3840
3840 #endif // USE_SIMULATOR 3841 #endif // USE_SIMULATOR
3841 3842
3842 } // namespace internal 3843 } // namespace internal
3843 } // namespace v8 3844 } // namespace v8
3844 3845
3845 #endif // V8_TARGET_ARCH_ARM64 3846 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/codegen-arm64.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698