Skip to content

Commit

Permalink
deps: workaround clang-3.4 ICE
Browse files Browse the repository at this point in the history
PR-URL: #8343
Fixes: #8323
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
  • Loading branch information
ofrobots authored and Fishrock123 committed Sep 9, 2016
1 parent 39cf7bf commit c8bcf1b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
14 changes: 12 additions & 2 deletions deps/v8/src/heap/mark-compact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3496,10 +3496,20 @@ int NumberOfPointerUpdateTasks(int pages) {

template <PointerDirection direction>
void UpdatePointersInParallel(Heap* heap, base::Semaphore* semaphore) {
// Work-around bug in clang-3.4
// https://github.com/nodejs/node/issues/8323
struct MemoryChunkVisitor {
PageParallelJob<PointerUpdateJobTraits<direction> >& job_;
MemoryChunkVisitor(PageParallelJob<PointerUpdateJobTraits<direction> >& job)
: job_(job) {}
void operator()(MemoryChunk* chunk) {
job_.AddPage(chunk, 0);
}
};

PageParallelJob<PointerUpdateJobTraits<direction> > job(
heap, heap->isolate()->cancelable_task_manager(), semaphore);
RememberedSet<direction>::IterateMemoryChunks(
heap, [&job](MemoryChunk* chunk) { job.AddPage(chunk, 0); });
RememberedSet<direction>::IterateMemoryChunks(heap, MemoryChunkVisitor(job));
PointersUpdatingVisitor visitor(heap);
int num_pages = job.NumberOfPages();
int num_tasks = NumberOfPointerUpdateTasks(num_pages);
Expand Down

0 comments on commit c8bcf1b

Please sign in to comment.