|
| 1 | +From dae2970a6e2f4ac30a1deee21562ac00cce3794a Mon Sep 17 00:00:00 2001 |
| 2 | +From: Tobias Tebbi <tebbi@chromium.org> |
| 3 | +Date: Tue, 10 Oct 2017 22:39:41 +0200 |
| 4 | +Subject: [PATCH 5/5] avoid constructor inheritance due to compilation issues |
| 5 | + |
| 6 | +Constructor inheritance of a templated constructor is causing compilation issues for node.js: |
| 7 | + |
| 8 | +https: //github.com/nodejs/node/pull/15362#issue-257007421 |
| 9 | +Change-Id: I7d099ff5a1a2fd5b19c11112ddef8fe824e509f7 |
| 10 | +Reviewed-on: https://chromium-review.googlesource.com/707008 |
| 11 | +Commit-Queue: Tobias Tebbi <tebbi@chromium.org> |
| 12 | +Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> |
| 13 | +Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> |
| 14 | +Cr-Commit-Position: refs/heads/master@{#48445} |
| 15 | +--- |
| 16 | + src/compiler/common-operator.cc | 4 ++-- |
| 17 | + src/compiler/common-operator.h | 12 ++++++++---- |
| 18 | + 2 files changed, 10 insertions(+), 6 deletions(-) |
| 19 | + |
| 20 | +diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc |
| 21 | +index c48773920d..d92722f701 100644 |
| 22 | +--- a/src/compiler/common-operator.cc |
| 23 | ++++ b/src/compiler/common-operator.cc |
| 24 | +@@ -1255,7 +1255,7 @@ bool IsRestOf(Operator const* op) { |
| 25 | + return OpParameter<bool>(op); |
| 26 | + } |
| 27 | + |
| 28 | +-const Operator* CommonOperatorBuilder::ObjectState(int object_id, |
| 29 | ++const Operator* CommonOperatorBuilder::ObjectState(uint32_t object_id, |
| 30 | + int pointer_slots) { |
| 31 | + return new (zone()) Operator1<ObjectStateInfo>( // -- |
| 32 | + IrOpcode::kObjectState, Operator::kPure, // opcode |
| 33 | +@@ -1265,7 +1265,7 @@ const Operator* CommonOperatorBuilder::ObjectState(int object_id, |
| 34 | + } |
| 35 | + |
| 36 | + const Operator* CommonOperatorBuilder::TypedObjectState( |
| 37 | +- int object_id, const ZoneVector<MachineType>* types) { |
| 38 | ++ uint32_t object_id, const ZoneVector<MachineType>* types) { |
| 39 | + return new (zone()) Operator1<TypedObjectStateInfo>( // -- |
| 40 | + IrOpcode::kTypedObjectState, Operator::kPure, // opcode |
| 41 | + "TypedObjectState", // name |
| 42 | +diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h |
| 43 | +index f7638a3cca..9dfb059518 100644 |
| 44 | +--- a/src/compiler/common-operator.h |
| 45 | ++++ b/src/compiler/common-operator.h |
| 46 | +@@ -125,7 +125,8 @@ V8_EXPORT_PRIVATE int ParameterIndexOf(const Operator* const); |
| 47 | + const ParameterInfo& ParameterInfoOf(const Operator* const); |
| 48 | + |
| 49 | + struct ObjectStateInfo final : std::pair<uint32_t, int> { |
| 50 | +- using std::pair<uint32_t, int>::pair; |
| 51 | ++ ObjectStateInfo(uint32_t object_id, int size) |
| 52 | ++ : std::pair<uint32_t, int>(object_id, size) {} |
| 53 | + uint32_t object_id() const { return first; } |
| 54 | + int size() const { return second; } |
| 55 | + }; |
| 56 | +@@ -134,7 +135,10 @@ size_t hash_value(ObjectStateInfo const& p); |
| 57 | + |
| 58 | + struct TypedObjectStateInfo final |
| 59 | + : std::pair<uint32_t, const ZoneVector<MachineType>*> { |
| 60 | +- using std::pair<uint32_t, const ZoneVector<MachineType>*>::pair; |
| 61 | ++ TypedObjectStateInfo(uint32_t object_id, |
| 62 | ++ const ZoneVector<MachineType>* machine_types) |
| 63 | ++ : std::pair<uint32_t, const ZoneVector<MachineType>*>(object_id, |
| 64 | ++ machine_types) {} |
| 65 | + uint32_t object_id() const { return first; } |
| 66 | + const ZoneVector<MachineType>* machine_types() const { return second; } |
| 67 | + }; |
| 68 | +@@ -385,8 +389,8 @@ class V8_EXPORT_PRIVATE CommonOperatorBuilder final |
| 69 | + SparseInputMask bitmask); |
| 70 | + const Operator* ArgumentsElementsState(bool is_rest); |
| 71 | + const Operator* ArgumentsLengthState(bool is_rest); |
| 72 | +- const Operator* ObjectState(int object_id, int pointer_slots); |
| 73 | +- const Operator* TypedObjectState(int object_id, |
| 74 | ++ const Operator* ObjectState(uint32_t object_id, int pointer_slots); |
| 75 | ++ const Operator* TypedObjectState(uint32_t object_id, |
| 76 | + const ZoneVector<MachineType>* types); |
| 77 | + const Operator* FrameState(BailoutId bailout_id, |
| 78 | + OutputFrameStateCombine state_combine, |
| 79 | +-- |
| 80 | +2.14.3 |
| 81 | + |
0 commit comments