[vm] Drop support for MSVC older than 2013

Google has required MSVC 2013 since Q2 2015, and Chromium has required
MSVC 2015 since Dec 2016. It seems safe for Dart to assume MSVC 2013.

Change-Id: I2ad2549d70b0a96085aa96e90ef15ad4c7b7acb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107062
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Matthew Dempsky 2019-07-01 23:38:10 +00:00 committed by commit-bot@chromium.org
parent bbb027aa2a
commit f4824d332d
3 changed files with 0 additions and 81 deletions

View file

@ -1,79 +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 RUNTIME_PLATFORM_C99_SUPPORT_WIN_H_
#define RUNTIME_PLATFORM_C99_SUPPORT_WIN_H_
#if defined(_MSC_VER) && (_MSC_VER < 1800)
// Before Visual Studio 2013 Visual C++ was missing a bunch of C99 math macros
// and functions. Define them here.
#include <float.h>
#include <string.h>
#include <cmath>
static const unsigned __int64 kQuietNaNMask =
static_cast<unsigned __int64>(0xfff) << 51;
#ifndef va_copy
#define va_copy(dst, src) (memmove(&(dst), &(src), sizeof(dst)))
#endif /* va_copy */
#define NAN *reinterpret_cast<const double*>(&kQuietNaNMask)
namespace std {
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;
}
}
} // namespace std
static inline double trunc(double x) {
if (x < 0) {
return ceil(x);
} else {
return floor(x);
}
}
static inline double round(double x) {
if (!_finite(x)) {
return x;
}
double intpart;
double fractpart = modf(x, &intpart);
if (fractpart >= 0.5) {
return intpart + 1;
} else if (fractpart > -0.5) {
return intpart;
} else {
return intpart - 1;
}
}
// Windows does not have strtoll defined.
#if defined(_MSC_VER)
#define strtoll _strtoi64
#endif
#endif
#endif // RUNTIME_PLATFORM_C99_SUPPORT_WIN_H_

View file

@ -77,7 +77,6 @@
#include <sys/types.h>
#if defined(_WIN32)
#include "platform/c99_support_win.h"
#include "platform/floating_point_win.h"
#include "platform/inttypes_support_win.h"
#endif // defined(_WIN32)

View file

@ -15,7 +15,6 @@ platform_sources = [
"atomic_linux.h",
"atomic_macos.h",
"atomic_win.h",
"c99_support_win.h",
"floating_point.h",
"floating_point_win.cc",
"floating_point_win.h",