aboutsummaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2016-09-12 11:50:56 +0200
committerMichaël Zasso <targos@protonmail.com>2016-09-22 09:55:46 +0200
commit91b40944a41f8ab1e499ed5bebeed520a215b9a5 (patch)
tree1c663de93fc697fed580011a13423e1203aeaa13 /deps
parent75242a26140c23c88eaf15d2770b20e7cf78c480 (diff)
downloadandroid-node-v8-91b40944a41f8ab1e499ed5bebeed520a215b9a5.tar.gz
android-node-v8-91b40944a41f8ab1e499ed5bebeed520a215b9a5.tar.bz2
android-node-v8-91b40944a41f8ab1e499ed5bebeed520a215b9a5.zip
deps: cherry-pick workaround for clang-3.4 ICE
Ref: https://github.com/nodejs/node/pull/8343 Fixes: https://github.com/nodejs/node/issues/8323 PR-URL: https://github.com/nodejs/node/pull/8317 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/src/heap/mark-compact.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/deps/v8/src/heap/mark-compact.cc b/deps/v8/src/heap/mark-compact.cc
index ae7b4676ae..78b4ea8f0e 100644
--- a/deps/v8/src/heap/mark-compact.cc
+++ b/deps/v8/src/heap/mark-compact.cc
@@ -3700,10 +3700,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));
int num_pages = job.NumberOfPages();
int num_tasks = NumberOfPointerUpdateTasks(num_pages);
job.Run(num_tasks, [](int i) { return 0; });