diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2015-08-23 06:09:40 -0700 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-09-06 21:38:01 +1000 |
commit | 9fddd83cf9adf505bce2e2373881df0c4d41b261 (patch) | |
tree | 4272ce14c10fea496af2e78fc6debb187d613451 /deps/v8/src/base | |
parent | 46b7d151674d138e7ea4342d5f3ada1208b87ff2 (diff) | |
download | android-node-v8-9fddd83cf9adf505bce2e2373881df0c4d41b261.tar.gz android-node-v8-9fddd83cf9adf505bce2e2373881df0c4d41b261.tar.bz2 android-node-v8-9fddd83cf9adf505bce2e2373881df0c4d41b261.zip |
deps: upgrade V8 to 4.5.103.24
Upgrade to the latest branch-head for V8 4.5. For the full commit log see
https://github.com/v8/v8-git-mirror/commits/4.5.103.24
PR-URL: https://github.com/nodejs/node/pull/2509
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/src/base')
-rw-r--r-- | deps/v8/src/base/atomicops_internals_arm_gcc.h | 6 | ||||
-rw-r--r-- | deps/v8/src/base/bits.h | 24 | ||||
-rw-r--r-- | deps/v8/src/base/macros.h | 9 | ||||
-rw-r--r-- | deps/v8/src/base/safe_math_impl.h | 4 | ||||
-rw-r--r-- | deps/v8/src/base/sys-info.cc | 2 |
5 files changed, 33 insertions, 12 deletions
diff --git a/deps/v8/src/base/atomicops_internals_arm_gcc.h b/deps/v8/src/base/atomicops_internals_arm_gcc.h index 069b1ffa88..e399657e13 100644 --- a/deps/v8/src/base/atomicops_internals_arm_gcc.h +++ b/deps/v8/src/base/atomicops_internals_arm_gcc.h @@ -59,11 +59,11 @@ inline void MemoryBarrier() { // variant of the target architecture is being used. This tests against // any known ARMv6 or ARMv7 variant, where it is possible to directly // use ldrex/strex instructions to implement fast atomic operations. -#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ +#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \ - defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ + defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ - defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) + defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, Atomic32 old_value, diff --git a/deps/v8/src/base/bits.h b/deps/v8/src/base/bits.h index 5c7cd74c61..abcfd9a9ed 100644 --- a/deps/v8/src/base/bits.h +++ b/deps/v8/src/base/bits.h @@ -44,6 +44,17 @@ inline unsigned CountPopulation64(uint64_t value) { } +// Overloaded versions of CountPopulation32/64. +inline unsigned CountPopulation(uint32_t value) { + return CountPopulation32(value); +} + + +inline unsigned CountPopulation(uint64_t value) { + return CountPopulation64(value); +} + + // CountLeadingZeros32(value) returns the number of zero bits following the most // significant 1 bit in |value| if |value| is non-zero, otherwise it returns 32. inline unsigned CountLeadingZeros32(uint32_t value) { @@ -225,6 +236,19 @@ int32_t SignedDiv32(int32_t lhs, int32_t rhs); int32_t SignedMod32(int32_t lhs, int32_t rhs); +// UnsignedAddOverflow32(lhs,rhs,val) performs an unsigned summation of |lhs| +// and |rhs| and stores the result into the variable pointed to by |val| and +// returns true if the unsigned summation resulted in an overflow. +inline bool UnsignedAddOverflow32(uint32_t lhs, uint32_t rhs, uint32_t* val) { +#if V8_HAS_BUILTIN_SADD_OVERFLOW + return __builtin_uadd_overflow(lhs, rhs, val); +#else + *val = lhs + rhs; + return *val < (lhs | rhs); +#endif +} + + // UnsignedDiv32(lhs, rhs) divides |lhs| by |rhs| and returns the quotient // truncated to uint32. If |rhs| is zero, then zero is returned. inline uint32_t UnsignedDiv32(uint32_t lhs, uint32_t rhs) { diff --git a/deps/v8/src/base/macros.h b/deps/v8/src/base/macros.h index e98b4f569f..6dc96f4f3b 100644 --- a/deps/v8/src/base/macros.h +++ b/deps/v8/src/base/macros.h @@ -15,12 +15,9 @@ #include "src/base/logging.h" -// The expression OFFSET_OF(type, field) computes the byte-offset -// of the specified field relative to the containing type. This -// corresponds to 'offsetof' (in stddef.h), except that it doesn't -// use 0 or NULL, which causes a problem with the compiler warnings -// we have enabled (which is also why 'offsetof' doesn't seem to work). -// Here we simply use the aligned, non-zero value 16. +// TODO(all) Replace all uses of this macro with C++'s offsetof. To do that, we +// have to make sure that only standard-layout types and simple field +// designators are used. #define OFFSET_OF(type, field) \ (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(16)->field)) - 16) diff --git a/deps/v8/src/base/safe_math_impl.h b/deps/v8/src/base/safe_math_impl.h index 055e2a0275..eb2a151191 100644 --- a/deps/v8/src/base/safe_math_impl.h +++ b/deps/v8/src/base/safe_math_impl.h @@ -208,8 +208,8 @@ typename enable_if<std::numeric_limits<T>::is_integer && (sizeof(T) * 2 > sizeof(uintmax_t)), T>::type CheckedMul(T x, T y, RangeConstraint* validity) { - // if either side is zero then the result will be zero. - if (!(x || y)) { + // If either side is zero then the result will be zero. + if (!x || !y) { return RANGE_VALID; } else if (x > 0) { diff --git a/deps/v8/src/base/sys-info.cc b/deps/v8/src/base/sys-info.cc index 617a88ea81..a2dc6ab27f 100644 --- a/deps/v8/src/base/sys-info.cc +++ b/deps/v8/src/base/sys-info.cc @@ -44,7 +44,7 @@ int SysInfo::NumberOfProcessors() { } return static_cast<int>(result); #elif V8_OS_WIN - SYSTEM_INFO system_info = {0}; + SYSTEM_INFO system_info = {}; ::GetNativeSystemInfo(&system_info); return static_cast<int>(system_info.dwNumberOfProcessors); #endif |