From 4ad5cd4cdbfc9ca7b33eb1b6db4890619a610b5e Mon Sep 17 00:00:00 2001 From: Tobias Tebbi Date: Tue, 10 Oct 2017 22:39:41 +0200 Subject: [PATCH] deps: backport 0f1dfae from V8 upstream Original commit message: avoid constructor inheritance due to compilation issues Constructor inheritance of a templated constructor is causing compilation issues for node.js: https: //github.com/nodejs/node/pull/15362#issue-257007421 Change-Id: I7d099ff5a1a2fd5b19c11112ddef8fe824e509f7 Reviewed-on: https://chromium-review.googlesource.com/707008 Commit-Queue: Tobias Tebbi Commit-Queue: Benedikt Meurer Reviewed-by: Benedikt Meurer Cr-Commit-Position: refs/heads/master@{#48445} Refs: https://github.com/v8/v8/commit/0f1dfae0501ffa5086c34412e0cb3b229bd570de PR-URL: https://github.com/nodejs/node/pull/15362 Backport-PR-URL: https://github.com/nodejs/node/pull/16413 Reviewed-By: Myles Borins Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina Reviewed-By: Ben Noordhuis --- deps/v8/src/compiler/common-operator.cc | 4 ++-- deps/v8/src/compiler/common-operator.h | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/deps/v8/src/compiler/common-operator.cc b/deps/v8/src/compiler/common-operator.cc index c48773920d8b87..d92722f7015f48 100644 --- a/deps/v8/src/compiler/common-operator.cc +++ b/deps/v8/src/compiler/common-operator.cc @@ -1255,7 +1255,7 @@ bool IsRestOf(Operator const* op) { return OpParameter(op); } -const Operator* CommonOperatorBuilder::ObjectState(int object_id, +const Operator* CommonOperatorBuilder::ObjectState(uint32_t object_id, int pointer_slots) { return new (zone()) Operator1( // -- IrOpcode::kObjectState, Operator::kPure, // opcode @@ -1265,7 +1265,7 @@ const Operator* CommonOperatorBuilder::ObjectState(int object_id, } const Operator* CommonOperatorBuilder::TypedObjectState( - int object_id, const ZoneVector* types) { + uint32_t object_id, const ZoneVector* types) { return new (zone()) Operator1( // -- IrOpcode::kTypedObjectState, Operator::kPure, // opcode "TypedObjectState", // name diff --git a/deps/v8/src/compiler/common-operator.h b/deps/v8/src/compiler/common-operator.h index f7638a3cca3e46..9dfb0595189973 100644 --- a/deps/v8/src/compiler/common-operator.h +++ b/deps/v8/src/compiler/common-operator.h @@ -125,7 +125,8 @@ V8_EXPORT_PRIVATE int ParameterIndexOf(const Operator* const); const ParameterInfo& ParameterInfoOf(const Operator* const); struct ObjectStateInfo final : std::pair { - using std::pair::pair; + ObjectStateInfo(uint32_t object_id, int size) + : std::pair(object_id, size) {} uint32_t object_id() const { return first; } int size() const { return second; } }; @@ -134,7 +135,10 @@ size_t hash_value(ObjectStateInfo const& p); struct TypedObjectStateInfo final : std::pair*> { - using std::pair*>::pair; + TypedObjectStateInfo(uint32_t object_id, + const ZoneVector* machine_types) + : std::pair*>(object_id, + machine_types) {} uint32_t object_id() const { return first; } const ZoneVector* machine_types() const { return second; } }; @@ -385,8 +389,8 @@ class V8_EXPORT_PRIVATE CommonOperatorBuilder final SparseInputMask bitmask); const Operator* ArgumentsElementsState(bool is_rest); const Operator* ArgumentsLengthState(bool is_rest); - const Operator* ObjectState(int object_id, int pointer_slots); - const Operator* TypedObjectState(int object_id, + const Operator* ObjectState(uint32_t object_id, int pointer_slots); + const Operator* TypedObjectState(uint32_t object_id, const ZoneVector* types); const Operator* FrameState(BailoutId bailout_id, OutputFrameStateCombine state_combine,