Index: src/compiler/common-operator.cc |
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc |
index 12a06530e39fdc8a46b5fdbbe3f1659532e6c385..736a961e40336c477e7b1d33aac3bee27023281b 100644 |
--- a/src/compiler/common-operator.cc |
+++ b/src/compiler/common-operator.cc |
@@ -235,6 +235,12 @@ OsrGuardType OsrGuardTypeOf(Operator const* op) { |
return OpParameter<OsrGuardType>(op); |
} |
+ZoneVector<MachineType> const* MachineTypesOf(Operator const* op) { |
+ DCHECK(op->opcode() == IrOpcode::kTypedObjectState || |
+ op->opcode() == IrOpcode::kTypedStateValues); |
+ return OpParameter<const ZoneVector<MachineType>*>(op); |
+} |
+ |
#define CACHED_OP_LIST(V) \ |
V(Dead, Operator::kFoldable, 0, 0, 0, 1, 1, 1) \ |
V(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
@@ -1004,24 +1010,32 @@ const Operator* CommonOperatorBuilder::StateValues(int arguments) { |
arguments, 0, 0, 1, 0, 0); // counts |
} |
+const Operator* CommonOperatorBuilder::TypedStateValues( |
+ const ZoneVector<MachineType>* types) { |
+ return new (zone()) Operator1<const ZoneVector<MachineType>*>( // -- |
+ IrOpcode::kTypedStateValues, Operator::kPure, // opcode |
+ "TypedStateValues", // name |
+ static_cast<int>(types->size()), 0, 0, 1, 0, 0, // counts |
+ types); // parameter |
+} |
-const Operator* CommonOperatorBuilder::ObjectState(int pointer_slots, int id) { |
+const Operator* CommonOperatorBuilder::ObjectState(int pointer_slots) { |
return new (zone()) Operator1<int>( // -- |
IrOpcode::kObjectState, Operator::kPure, // opcode |
"ObjectState", // name |
- pointer_slots, 0, 0, 1, 0, 0, id); // counts |
+ pointer_slots, 0, 0, 1, 0, 0, // counts |
+ pointer_slots); // parameter |
Tobias Tebbi
2016/11/08 13:41:40
Why put pointer_slots in this apparently unused pa
Benedikt Meurer
2016/11/08 13:42:43
We need to distinguish the operators for hashing a
|
} |
- |
-const Operator* CommonOperatorBuilder::TypedStateValues( |
+const Operator* CommonOperatorBuilder::TypedObjectState( |
const ZoneVector<MachineType>* types) { |
return new (zone()) Operator1<const ZoneVector<MachineType>*>( // -- |
- IrOpcode::kTypedStateValues, Operator::kPure, // opcode |
- "TypedStateValues", // name |
- static_cast<int>(types->size()), 0, 0, 1, 0, 0, types); // counts |
+ IrOpcode::kTypedObjectState, Operator::kPure, // opcode |
+ "TypedObjectState", // name |
+ static_cast<int>(types->size()), 0, 0, 1, 0, 0, // counts |
+ types); // parameter |
} |
- |
const Operator* CommonOperatorBuilder::FrameState( |
BailoutId bailout_id, OutputFrameStateCombine state_combine, |
const FrameStateFunctionInfo* function_info) { |