From c8bcf1b591f63f61216309d3c69c8dc2c8897b21 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 30 Aug 2016 10:43:57 -0700 Subject: [PATCH] deps: workaround clang-3.4 ICE PR-URL: https://github.com/nodejs/node/pull/8343 Fixes: https://github.com/nodejs/node/issues/8323 Reviewed-By: rvagg - Rod Vagg --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/heap/mark-compact.cc | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 52125445b4..9f61de8293 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 5 #define V8_MINOR_VERSION 1 #define V8_BUILD_NUMBER 281 -#define V8_PATCH_LEVEL 81 +#define V8_PATCH_LEVEL 82 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/heap/mark-compact.cc b/deps/v8/src/heap/mark-compact.cc index de40fa0519..78ee33f530 100644 --- a/deps/v8/src/heap/mark-compact.cc +++ b/deps/v8/src/heap/mark-compact.cc @@ -3496,10 +3496,20 @@ int NumberOfPointerUpdateTasks(int pages) { template void UpdatePointersInParallel(Heap* heap, base::Semaphore* semaphore) { + // Work-around bug in clang-3.4 + // https://github.com/nodejs/node/issues/8323 + struct MemoryChunkVisitor { + PageParallelJob >& job_; + MemoryChunkVisitor(PageParallelJob >& job) + : job_(job) {} + void operator()(MemoryChunk* chunk) { + job_.AddPage(chunk, 0); + } + }; + PageParallelJob > job( heap, heap->isolate()->cancelable_task_manager(), semaphore); - RememberedSet::IterateMemoryChunks( - heap, [&job](MemoryChunk* chunk) { job.AddPage(chunk, 0); }); + RememberedSet::IterateMemoryChunks(heap, MemoryChunkVisitor(job)); PointersUpdatingVisitor visitor(heap); int num_pages = job.NumberOfPages(); int num_tasks = NumberOfPointerUpdateTasks(num_pages);