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

Side by Side Diff: src/assembler.cc

Issue 10116001: Fix typo in power_double_double (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 #ifdef __MINGW64_VERSION_MAJOR 1156 #ifdef __MINGW64_VERSION_MAJOR
1157 // MinGW64 has a custom implementation for pow. This handles certain 1157 // MinGW64 has a custom implementation for pow. This handles certain
1158 // special cases that are different. 1158 // special cases that are different.
1159 if ((x == 0.0 || isinf(x)) && isfinite(y)) { 1159 if ((x == 0.0 || isinf(x)) && isfinite(y)) {
1160 double f; 1160 double f;
1161 if (modf(y, &f) != 0.0) return ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0; 1161 if (modf(y, &f) != 0.0) return ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0;
1162 } 1162 }
1163 1163
1164 if (x == 2.0) { 1164 if (x == 2.0) {
1165 int y_int = static_cast<int>(y); 1165 int y_int = static_cast<int>(y);
1166 if (y == y_int) return ldexp(1.0, y); 1166 if (y == y_int) return ldexp(1.0, y_int);
1167 } 1167 }
1168 #endif 1168 #endif
1169 1169
1170 // The checks for special cases can be dropped in ia32 because it has already 1170 // The checks for special cases can be dropped in ia32 because it has already
1171 // been done in generated code before bailing out here. 1171 // been done in generated code before bailing out here.
1172 if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) return OS::nan_value(); 1172 if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) return OS::nan_value();
1173 return pow(x, y); 1173 return pow(x, y);
1174 } 1174 }
1175 1175
1176 1176
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1307 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1308 state_.written_position = state_.current_position; 1308 state_.written_position = state_.current_position;
1309 written = true; 1309 written = true;
1310 } 1310 }
1311 1311
1312 // Return whether something was written. 1312 // Return whether something was written.
1313 return written; 1313 return written;
1314 } 1314 }
1315 1315
1316 } } // namespace v8::internal 1316 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698