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

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

Issue 2677163003: WIP: type profiling. (Closed)
Patch Set: Rebaseline. Created 3 years, 10 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/compiler/opcodes.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 b3d118130e533a39df5b0620fcd13d01cf3fb152..243afb2d775ddd2adf98dfb59db16383fe0de601 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -293,7 +293,8 @@ std::ostream& operator<<(std::ostream& os, DataPropertyParameters const& p) {
}
DataPropertyParameters const& DataPropertyParametersOf(const Operator* op) {
- DCHECK(op->opcode() == IrOpcode::kJSStoreDataPropertyInLiteral);
+ DCHECK(op->opcode() == IrOpcode::kJSStoreDataPropertyInLiteral ||
+ op->opcode() == IrOpcode::kJSCollectTypeProfile);
return OpParameter<DataPropertyParameters>(op);
}
@@ -708,6 +709,17 @@ const Operator* JSOperatorBuilder::StoreDataPropertyInLiteral(
parameters); // parameter
}
+const Operator* JSOperatorBuilder::CollectTypeProfile(
+ const VectorSlotPair& feedback) {
+ DataPropertyParameters parameters(feedback);
+ return new (zone()) Operator1<DataPropertyParameters>( // --
+ IrOpcode::kJSCollectTypeProfile,
+ Operator::kNoThrow, // opcode
+ "JSCollectTypeProfile", // name
+ 2, 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/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698