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

Unified Diff: runtime/vm/c99_support_win.h

Issue 9114008: Introduce runtime/platform directory for code shared between vm (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/c99_support_win.h
diff --git a/runtime/vm/c99_support_win.h b/runtime/vm/c99_support_win.h
deleted file mode 100644
index 96d4a3a773d1e8f9ae9709590afddbd7f1cd0639..0000000000000000000000000000000000000000
--- a/runtime/vm/c99_support_win.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#ifndef VM_C99_SUPPORT_WIN_H_
-#define VM_C99_SUPPORT_WIN_H_
-
-// Visual C++ is missing a bunch of C99 math macros and
-// functions. Define them here.
-
-#include <float.h>
-
-static const unsigned __int64 kQuietNaNMask =
- static_cast<unsigned __int64>(0xfff) << 51;
-
-#define INFINITY HUGE_VAL
-#define NAN \
- *reinterpret_cast<const double*>(&kQuietNaNMask)
-
-static inline int isinf(double x) {
- return (_fpclass(x) & (_FPCLASS_PINF | _FPCLASS_NINF)) != 0;
-}
-
-static inline int isnan(double x) {
- return _isnan(x);
-}
-
-static inline int signbit(double x) {
- if (x == 0) {
- return _fpclass(x) & _FPCLASS_NZ;
- } else {
- return x < 0;
- }
-}
-
-static inline double trunc(double x) {
- if (x < 0) {
- return ceil(x);
- } else {
- return floor(x);
- }
-}
-
-static inline double round(double x) {
- if (x < 0) {
- return ceil(x - 0.5);
- } else {
- return floor(x + 0.5);
- }
-}
-
-#endif // VM_C99_SUPPORT_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698