Skip to content

Commit

Permalink
deps: backport 0f1dfae from V8 upstream
Browse files Browse the repository at this point in the history
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//pull/15362#issue-257007421
    Change-Id: I7d099ff5a1a2fd5b19c11112ddef8fe824e509f7
    Reviewed-on: https://chromium-review.googlesource.com/707008
    Commit-Queue: Tobias Tebbi <[email protected]>
    Commit-Queue: Benedikt Meurer <[email protected]>
    Reviewed-by: Benedikt Meurer <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#48445}

Refs: v8/v8@0f1dfae
PR-URL: #15362
Backport-PR-URL: #16413
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
tebbi authored and gibfahn committed Feb 18, 2018
1 parent ebee8ed commit b71a33c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions deps/v8/src/compiler/common-operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ bool IsRestOf(Operator const* op) {
return OpParameter<bool>(op);
}

const Operator* CommonOperatorBuilder::ObjectState(int object_id,
const Operator* CommonOperatorBuilder::ObjectState(uint32_t object_id,
int pointer_slots) {
return new (zone()) Operator1<ObjectStateInfo>( // --
IrOpcode::kObjectState, Operator::kPure, // opcode
Expand All @@ -1265,7 +1265,7 @@ const Operator* CommonOperatorBuilder::ObjectState(int object_id,
}

const Operator* CommonOperatorBuilder::TypedObjectState(
int object_id, const ZoneVector<MachineType>* types) {
uint32_t object_id, const ZoneVector<MachineType>* types) {
return new (zone()) Operator1<TypedObjectStateInfo>( // --
IrOpcode::kTypedObjectState, Operator::kPure, // opcode
"TypedObjectState", // name
Expand Down
12 changes: 8 additions & 4 deletions deps/v8/src/compiler/common-operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ V8_EXPORT_PRIVATE int ParameterIndexOf(const Operator* const);
const ParameterInfo& ParameterInfoOf(const Operator* const);

struct ObjectStateInfo final : std::pair<uint32_t, int> {
using std::pair<uint32_t, int>::pair;
ObjectStateInfo(uint32_t object_id, int size)
: std::pair<uint32_t, int>(object_id, size) {}
uint32_t object_id() const { return first; }
int size() const { return second; }
};
Expand All @@ -134,7 +135,10 @@ size_t hash_value(ObjectStateInfo const& p);

struct TypedObjectStateInfo final
: std::pair<uint32_t, const ZoneVector<MachineType>*> {
using std::pair<uint32_t, const ZoneVector<MachineType>*>::pair;
TypedObjectStateInfo(uint32_t object_id,
const ZoneVector<MachineType>* machine_types)
: std::pair<uint32_t, const ZoneVector<MachineType>*>(object_id,
machine_types) {}
uint32_t object_id() const { return first; }
const ZoneVector<MachineType>* machine_types() const { return second; }
};
Expand Down Expand Up @@ -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<MachineType>* types);
const Operator* FrameState(BailoutId bailout_id,
OutputFrameStateCombine state_combine,
Expand Down

0 comments on commit b71a33c

Please sign in to comment.