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

Side by Side Diff: runtime/platform/floating_point_win.cc

Issue 2750843003: Rename TARGET_OS_* to HOST_OS_*. (Closed)
Patch Set: DEPS Created 3 years, 9 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
« no previous file with comments | « runtime/lib/uri.cc ('k') | runtime/platform/globals.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(HOST_OS_WINDOWS)
7 7
8 #include "platform/floating_point_win.h" 8 #include "platform/floating_point_win.h"
9 9
10 #include <limits> // NOLINT 10 #include <limits> // NOLINT
11 11
12 // Taken from third_party/v8/src/platform-win32.cc 12 // Taken from third_party/v8/src/platform-win32.cc
13 double fmod_ieee(double x, double y) { 13 double fmod_ieee(double x, double y) {
14 // x is dividend, y is divisor. 14 // x is dividend, y is divisor.
15 // Work around MS fmod bugs. ISO Standard says: 15 // Work around MS fmod bugs. ISO Standard says:
16 // If dividend is finite and divisor is an infinity or 16 // If dividend is finite and divisor is an infinity or
(...skipping 22 matching lines...) Expand all
39 int index_x = (cls_x & _FPCLASS_PINF) != 0 ? 0 : 1; 39 int index_x = (cls_x & _FPCLASS_PINF) != 0 ? 0 : 1;
40 int index_y = (cls_y & _FPCLASS_PINF) != 0 ? 0 : 1; 40 int index_y = (cls_y & _FPCLASS_PINF) != 0 ? 0 : 1;
41 static double atans_at_infinities[2][2] = { 41 static double atans_at_infinities[2][2] = {
42 {atan2(1., 1.), atan2(1., -1.)}, {atan2(-1., 1.), atan2(-1., -1.)}}; 42 {atan2(1., 1.), atan2(1., -1.)}, {atan2(-1., 1.), atan2(-1., -1.)}};
43 return atans_at_infinities[index_x][index_y]; 43 return atans_at_infinities[index_x][index_y];
44 } else { 44 } else {
45 return atan2(x, y); 45 return atan2(x, y);
46 } 46 }
47 } 47 }
48 48
49 #endif // defined(TARGET_OS_WINDOWS) 49 #endif // defined(HOST_OS_WINDOWS)
OLDNEW
« no previous file with comments | « runtime/lib/uri.cc ('k') | runtime/platform/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698