Skip to content

Commit 0f1dfae

Browse files
tebbiCommit Bot
authored andcommitted
[turbofan] 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 <tebbi@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#48445}
1 parent 28c25b5 commit 0f1dfae

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎src/compiler/common-operator.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ ArgumentsStateType ArgumentsStateTypeOf(Operator const* op) {
12581258
return OpParameter<ArgumentsStateType>(op);
12591259
}
12601260

1261-
const Operator* CommonOperatorBuilder::ObjectState(int object_id,
1261+
const Operator* CommonOperatorBuilder::ObjectState(uint32_t object_id,
12621262
int pointer_slots) {
12631263
return new (zone()) Operator1<ObjectStateInfo>( // --
12641264
IrOpcode::kObjectState, Operator::kPure, // opcode
@@ -1268,7 +1268,7 @@ const Operator* CommonOperatorBuilder::ObjectState(int object_id,
12681268
}
12691269

12701270
const Operator* CommonOperatorBuilder::TypedObjectState(
1271-
int object_id, const ZoneVector<MachineType>* types) {
1271+
uint32_t object_id, const ZoneVector<MachineType>* types) {
12721272
return new (zone()) Operator1<TypedObjectStateInfo>( // --
12731273
IrOpcode::kTypedObjectState, Operator::kPure, // opcode
12741274
"TypedObjectState", // name

‎src/compiler/common-operator.h‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ V8_EXPORT_PRIVATE int ParameterIndexOf(const Operator* const);
125125
const ParameterInfo& ParameterInfoOf(const Operator* const);
126126

127127
struct ObjectStateInfo final : std::pair<uint32_t, int> {
128-
using std::pair<uint32_t, int>::pair;
128+
ObjectStateInfo(uint32_t object_id, int size)
129+
: std::pair<uint32_t, int>(object_id, size) {}
129130
uint32_t object_id() const { return first; }
130131
int size() const { return second; }
131132
};
@@ -134,7 +135,10 @@ size_t hash_value(ObjectStateInfo const& p);
134135

135136
struct TypedObjectStateInfo final
136137
: std::pair<uint32_t, const ZoneVector<MachineType>*> {
137-
using std::pair<uint32_t, const ZoneVector<MachineType>*>::pair;
138+
TypedObjectStateInfo(uint32_t object_id,
139+
const ZoneVector<MachineType>* machine_types)
140+
: std::pair<uint32_t, const ZoneVector<MachineType>*>(object_id,
141+
machine_types) {}
138142
uint32_t object_id() const { return first; }
139143
const ZoneVector<MachineType>* machine_types() const { return second; }
140144
};
@@ -403,8 +407,8 @@ class V8_EXPORT_PRIVATE CommonOperatorBuilder final
403407
SparseInputMask bitmask);
404408
const Operator* ArgumentsElementsState(ArgumentsStateType type);
405409
const Operator* ArgumentsLengthState(ArgumentsStateType type);
406-
const Operator* ObjectState(int object_id, int pointer_slots);
407-
const Operator* TypedObjectState(int object_id,
410+
const Operator* ObjectState(uint32_t object_id, int pointer_slots);
411+
const Operator* TypedObjectState(uint32_t object_id,
408412
const ZoneVector<MachineType>* types);
409413
const Operator* FrameState(BailoutId bailout_id,
410414
OutputFrameStateCombine state_combine,

0 commit comments

Comments
 (0)