diff options
author | isaacs <i@izs.me> | 2013-02-08 17:18:37 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-02-08 17:18:41 -0800 |
commit | e4a856e0ba815fca99a8e9ba7b626ff50a20feae (patch) | |
tree | eea2b73e0dcba6132f52c25ea0b0df7cb2009c55 /deps | |
parent | 0c2e5ec840e2dc64585ea75f7539d87e5af4269e (diff) | |
download | node-new-e4a856e0ba815fca99a8e9ba7b626ff50a20feae.tar.gz |
V8: Reapply floating patches
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/build/common.gypi | 11 | ||||
-rw-r--r-- | deps/v8/src/log-utils.cc | 3 | ||||
-rw-r--r-- | deps/v8/src/platform-posix.cc | 17 | ||||
-rw-r--r-- | deps/v8/src/v8utils.h | 2 |
4 files changed, 19 insertions, 14 deletions
diff --git a/deps/v8/build/common.gypi b/deps/v8/build/common.gypi index e68ee15fde..44bebae935 100644 --- a/deps/v8/build/common.gypi +++ b/deps/v8/build/common.gypi @@ -160,7 +160,7 @@ [ 'v8_use_arm_eabi_hardfloat=="true"', { 'defines': [ 'USE_EABI_HARDFLOAT=1', - 'CAN_USE_VFP3_INSTRUCTIONS', + 'CAN_USE_VFP2_INSTRUCTIONS', ], 'target_conditions': [ ['_toolset=="target"', { @@ -399,15 +399,6 @@ }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \ or OS=="android"', { - 'cflags!': [ - '-O2', - '-Os', - ], - 'cflags': [ - '-fdata-sections', - '-ffunction-sections', - '-O3', - ], 'conditions': [ [ 'gcc_version==44 and clang==0', { 'cflags': [ diff --git a/deps/v8/src/log-utils.cc b/deps/v8/src/log-utils.cc index d8d92cbe21..a66db3d931 100644 --- a/deps/v8/src/log-utils.cc +++ b/deps/v8/src/log-utils.cc @@ -107,6 +107,9 @@ void Log::Initialize() { // one character so we can escape the loop properly. p--; break; + case 'p': + stream.Add("%d", OS::GetCurrentProcessId()); + break; case 't': { // %t expands to the current time in milliseconds. double time = OS::TimeCurrentMillis(); diff --git a/deps/v8/src/platform-posix.cc b/deps/v8/src/platform-posix.cc index 0016d59d3a..e652a083cd 100644 --- a/deps/v8/src/platform-posix.cc +++ b/deps/v8/src/platform-posix.cc @@ -109,11 +109,20 @@ void* OS::GetRandomMmapAddr() { raw_addr &= V8_UINT64_C(0x3ffffffff000); #else uint32_t raw_addr = V8::RandomPrivate(isolate); - // The range 0x20000000 - 0x60000000 is relatively unpopulated across a - // variety of ASLR modes (PAE kernel, NX compat mode, etc) and on macos - // 10.6 and 10.7. + + // For our 32-bit mmap() hint, we pick a random address in the bottom + // half of the top half of the address space (that is, the third quarter). + // Because we do not MAP_FIXED, this will be treated only as a hint -- the + // system will not fail to mmap() because something else happens to already + // be mapped at our random address. We deliberately set the hint high enough + // to get well above the system's break (that is, the heap); systems will + // either try the hint and if that fails move higher (MacOS and other BSD + // derivatives) or try the hint and if that fails allocate as if there were + // no hint at all (Linux, Solaris, illumos and derivatives). The high hint + // prevents the break from getting hemmed in at low values, ceding half of + // the address space to the system heap. raw_addr &= 0x3ffff000; - raw_addr += 0x20000000; + raw_addr += 0x80000000; #endif return reinterpret_cast<void*>(raw_addr); } diff --git a/deps/v8/src/v8utils.h b/deps/v8/src/v8utils.h index 9072b4e285..111abdf8b8 100644 --- a/deps/v8/src/v8utils.h +++ b/deps/v8/src/v8utils.h @@ -209,6 +209,8 @@ INLINE(void CopyChars(sinkchar* dest, const sourcechar* src, int chars)); template <typename sourcechar, typename sinkchar> void CopyChars(sinkchar* dest, const sourcechar* src, int chars) { + ASSERT(chars >= 0); + if (chars == 0) return; sinkchar* limit = dest + chars; #ifdef V8_HOST_CAN_READ_UNALIGNED if (sizeof(*dest) == sizeof(*src)) { |