Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: src/compiler/common-operator.cc

Issue 2488623002: [turbofan] Introduce TypedObjectState common operator. (Closed)
Patch Set: Make MSVC happy. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/escape-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/escape-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698