Browse Source

deps: backport 883637bd from latest v8

Original commit message:

  VS2013 contains a number of improvements, most notably the addition
  of all C99 math functions.

  I'm a little bit concerned about the change I had to make in
  cpu-profiler.cc, but I spent quite a bit of time looking at it and was
  unable to figure out any rational explanation for the warning. It's
  possible it's spurious. Since it seems like a useful warning in
  general   though, I chose not to disable globally at the gyp level.

  I do think someone with expertise here should probably try to
  determine if this is a legitimate warning.

  BUG=288948
  R=dslomov@chromium.org

  Review URL: https://codereview.chromium.org/23449035

NOTE: Path applied without `cpu-profiler.cc` changes because in our
version it was looking totally different.
v0.10.26-release
Fedor Indutny 11 years ago
parent
commit
fac8f396cc
  1. 3
      deps/v8/src/platform.h
  2. 4
      deps/v8/src/preparser.cc
  3. 2
      deps/v8/src/win32-math.cc
  4. 4
      deps/v8/src/win32-math.h

3
deps/v8/src/platform.h

@ -71,6 +71,8 @@ int signbit(double x);
int strncasecmp(const char* s1, const char* s2, int n);
// Visual C++ 2013 and higher implement this function.
#if (_MSC_VER < 1800)
inline int lrint(double flt) {
int intgr;
#if defined(V8_TARGET_ARCH_IA32)
@ -88,6 +90,7 @@ inline int lrint(double flt) {
return intgr;
}
#endif // _MSC_VER < 1800
#endif // _MSC_VER

4
deps/v8/src/preparser.cc

@ -44,8 +44,8 @@
namespace v8 {
#ifdef _MSC_VER
// Usually defined in math.h, but not in MSVC.
#if defined(_MSC_VER) && (_MSC_VER < 1800)
// Usually defined in math.h, but not in MSVC until VS2013+.
// Abstracted to work
int isfinite(double value);
#endif

2
deps/v8/src/win32-math.cc

@ -29,7 +29,7 @@
// refer to The Open Group Base Specification for specification of the correct
// semantics for these functions.
// (http://www.opengroup.org/onlinepubs/000095399/)
#ifdef _MSC_VER
#if defined(_MSC_VER) && (_MSC_VER < 1800)
#undef V8_WIN32_LEAN_AND_MEAN
#define V8_WIN32_HEADERS_FULL

4
deps/v8/src/win32-math.h

@ -37,6 +37,8 @@
#error Wrong environment, expected MSVC.
#endif // _MSC_VER
// MSVC 2013+ provides implementations of all standard math functions.
#if (_MSC_VER < 1800)
enum {
FP_NAN,
FP_INFINITE,
@ -58,4 +60,6 @@ int isgreater(double x, double y);
int fpclassify(double x);
int signbit(double x);
#endif // _MSC_VER < 1800
#endif // V8_WIN32_MATH_H_

Loading…
Cancel
Save