From be773fc3cfb3c1adc6591d4de9f36942a9ae2688 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Sat, 14 Sep 2019 09:20:31 +0530 Subject: [PATCH] deps: patch V8 to run on older XCode versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch V8 (compiler/js-heap-broker.cc) to remove the use of an optional property, which is a fairly new C++ feature, since that requires a newer XCode version than the minimum requirement in BUILDING.md and thus breaks CI. Backport-PR-URL: https://github.com/nodejs/node/pull/33376 PR-URL: https://github.com/nodejs/node/pull/32831 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig --- common.gypi | 2 +- deps/v8/src/compiler/js-heap-broker.cc | 1 + deps/v8/src/interpreter/interpreter.cc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 1f0ece40398aeb..355590cfcd69ac 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.2', + 'v8_embedder_string': '-node.3', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/compiler/js-heap-broker.cc b/deps/v8/src/compiler/js-heap-broker.cc index 6acc77cdcc1e20..2c46b3460842aa 100644 --- a/deps/v8/src/compiler/js-heap-broker.cc +++ b/deps/v8/src/compiler/js-heap-broker.cc @@ -4490,6 +4490,7 @@ GlobalAccessFeedback::GlobalAccessFeedback(PropertyCellRef cell, GlobalAccessFeedback::GlobalAccessFeedback(FeedbackSlotKind slot_kind) : ProcessedFeedback(kGlobalAccess, slot_kind), + cell_or_context_(base::nullopt), index_and_immutable_(0 /* doesn't matter */) { DCHECK(IsGlobalICKind(slot_kind)); } diff --git a/deps/v8/src/interpreter/interpreter.cc b/deps/v8/src/interpreter/interpreter.cc index 54f4a3caa3c911..805b6773578a0f 100644 --- a/deps/v8/src/interpreter/interpreter.cc +++ b/deps/v8/src/interpreter/interpreter.cc @@ -286,7 +286,7 @@ Interpreter::NewSourcePositionCollectionJob( auto job = std::make_unique(parse_info, literal, allocator, nullptr); job->compilation_info()->SetBytecodeArray(existing_bytecode); - return job; + return std::unique_ptr { static_cast(job.release()) }; } void Interpreter::ForEachBytecode(