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

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

Issue 2587393006: [runtime] Collect IC feedback in DefineDataPropertyInLiteral. (Closed)
Patch Set: Rebase. Created 3 years, 11 months 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/js-operator.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.cc
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc
index 26212ce3e522b7935765e14bc618596db194b2b9..ef9dc8808fa0048e9e0a50cb3229f53eb174a345 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -246,6 +246,29 @@ CreateFunctionContextParameters const& CreateFunctionContextParametersOf(
return OpParameter<CreateFunctionContextParameters>(op);
}
+bool operator==(DataPropertyParameters const& lhs,
+ DataPropertyParameters const& rhs) {
+ return lhs.feedback() == rhs.feedback();
+}
+
+bool operator!=(DataPropertyParameters const& lhs,
+ DataPropertyParameters const& rhs) {
+ return !(lhs == rhs);
+}
+
+size_t hash_value(DataPropertyParameters const& p) {
+ return base::hash_combine(p.feedback());
+}
+
+std::ostream& operator<<(std::ostream& os, DataPropertyParameters const& p) {
+ return os;
+}
+
+DataPropertyParameters const& DataPropertyParametersOf(const Operator* op) {
+ DCHECK(op->opcode() == IrOpcode::kJSStoreDataPropertyInLiteral);
+ return OpParameter<DataPropertyParameters>(op);
+}
+
bool operator==(NamedAccess const& lhs, NamedAccess const& rhs) {
return lhs.name().location() == rhs.name().location() &&
lhs.language_mode() == rhs.language_mode() &&
@@ -511,8 +534,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) {
V(StoreMessage, Operator::kNoThrow, 1, 0) \
V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \
V(StackCheck, Operator::kNoWrite, 0, 0) \
- V(GetSuperConstructor, Operator::kNoWrite, 1, 1) \
- V(StoreDataPropertyInLiteral, Operator::kNoProperties, 4, 0)
+ V(GetSuperConstructor, Operator::kNoWrite, 1, 1)
#define BINARY_OP_LIST(V) \
V(BitwiseOr) \
@@ -651,6 +673,17 @@ BINARY_OP_LIST(BINARY_OP)
COMPARE_OP_LIST(COMPARE_OP)
#undef COMPARE_OP
+const Operator* JSOperatorBuilder::StoreDataPropertyInLiteral(
+ const VectorSlotPair& feedback) {
+ DataPropertyParameters parameters(feedback);
+ return new (zone()) Operator1<DataPropertyParameters>( // --
+ IrOpcode::kJSStoreDataPropertyInLiteral,
+ Operator::kNoThrow, // opcode
+ "JSStoreDataPropertyInLiteral", // name
+ 4, 1, 1, 0, 1, 0, // counts
+ parameters); // parameter
+}
+
const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) {
// TODO(turbofan): Cache most important versions of this operator.
return new (zone()) Operator1<ToBooleanHints>( //--
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698