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

Unified Diff: src/ast/ast-numbering.cc

Issue 2707873002: Collect type profile for DevTools. (Closed)
Patch Set: Explain why throw is needed in message test. 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
« no previous file with comments | « src/ast/ast-numbering.h ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast-numbering.cc
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc
index 499760de147efc18fde6bff67458d3a9d8814f1f..1730308d86af7bab45d4bb1900b3af607ee61398 100644
--- a/src/ast/ast-numbering.cc
+++ b/src/ast/ast-numbering.cc
@@ -15,7 +15,8 @@ namespace internal {
class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> {
public:
AstNumberingVisitor(uintptr_t stack_limit, Zone* zone,
- Compiler::EagerInnerFunctionLiterals* eager_literals)
+ Compiler::EagerInnerFunctionLiterals* eager_literals,
+ bool collect_type_profile = false)
: zone_(zone),
eager_literals_(eager_literals),
next_id_(BailoutId::FirstUsable().ToInt()),
@@ -25,7 +26,8 @@ class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> {
slot_cache_(zone),
disable_crankshaft_reason_(kNoReason),
dont_optimize_reason_(kNoReason),
- catch_prediction_(HandlerTable::UNCAUGHT) {
+ catch_prediction_(HandlerTable::UNCAUGHT),
+ collect_type_profile_(collect_type_profile) {
InitializeAstVisitor(stack_limit);
}
@@ -101,6 +103,7 @@ class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> {
BailoutReason disable_crankshaft_reason_;
BailoutReason dont_optimize_reason_;
HandlerTable::CatchPrediction catch_prediction_;
+ bool collect_type_profile_;
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
DISALLOW_COPY_AND_ASSIGN(AstNumberingVisitor);
@@ -422,7 +425,8 @@ void AstNumberingVisitor::VisitAssignment(Assignment* node) {
if (node->is_compound()) VisitBinaryOperation(node->binary_operation());
VisitReference(node->target());
Visit(node->value());
- ReserveFeedbackSlots(node);
+ node->AssignFeedbackSlots(properties_.get_spec(), language_mode_,
+ &slot_cache_, collect_type_profile_);
}
@@ -714,12 +718,14 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
bool AstNumbering::Renumber(
uintptr_t stack_limit, Zone* zone, FunctionLiteral* function,
- Compiler::EagerInnerFunctionLiterals* eager_literals) {
+ Compiler::EagerInnerFunctionLiterals* eager_literals,
+ bool collect_type_profile) {
DisallowHeapAllocation no_allocation;
DisallowHandleAllocation no_handles;
DisallowHandleDereference no_deref;
- AstNumberingVisitor visitor(stack_limit, zone, eager_literals);
+ AstNumberingVisitor visitor(stack_limit, zone, eager_literals,
+ collect_type_profile);
return visitor.Renumber(function);
}
} // namespace internal
« no previous file with comments | « src/ast/ast-numbering.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698