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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 2707873002: Collect type profile for DevTools. (Closed)
Patch Set: Fix typo. Created 3 years, 9 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
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 10ded107ed718071dc64b51a60b1cdbd1a378da5..0f496ddc0f2bdc94fab7223e5bc516beb3c3d487 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -802,6 +802,21 @@ void BytecodeGraphBuilder::VisitStaDataPropertyInLiteral() {
environment()->RecordAfterState(node, Environment::kAttachFrameState);
}
+void BytecodeGraphBuilder::VisitCollectTypeProfile() {
+ PrepareEagerCheckpoint();
+
+ Node* name =
+ environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
+ Node* value = environment()->LookupAccumulator();
+ VectorSlotPair feedback =
+ CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(1));
+
+ const Operator* op = javascript()->CollectTypeProfile(feedback);
+
+ Node* node = NewNode(op, name, value);
+ environment()->RecordAfterState(node, Environment::kAttachFrameState);
+}
+
void BytecodeGraphBuilder::VisitLdaContextSlot() {
const Operator* op = javascript()->LoadContext(
bytecode_iterator().GetUnsignedImmediateOperand(2),
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | src/feedback-vector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698