summaryrefslogtreecommitdiff
path: root/deps/v8/src/rewriter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/rewriter.cc')
-rw-r--r--deps/v8/src/rewriter.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/v8/src/rewriter.cc b/deps/v8/src/rewriter.cc
index 4e3676b7da..e0a0226ec8 100644
--- a/deps/v8/src/rewriter.cc
+++ b/deps/v8/src/rewriter.cc
@@ -32,7 +32,8 @@
#include "scopes.h"
#include "rewriter.h"
-namespace v8 { namespace internal {
+namespace v8 {
+namespace internal {
class AstOptimizer: public AstVisitor {
@@ -803,6 +804,7 @@ void Processor::VisitThisFunction(ThisFunction* node) {
bool Rewriter::Process(FunctionLiteral* function) {
+ HistogramTimerScope timer(&Counters::rewriting);
Scope* scope = function->scope();
if (scope->is_function_scope()) return true;
@@ -823,6 +825,7 @@ bool Rewriter::Optimize(FunctionLiteral* function) {
ZoneList<Statement*>* body = function->body();
if (FLAG_optimize_ast && !body->is_empty()) {
+ HistogramTimerScope timer(&Counters::ast_optimization);
AstOptimizer optimizer(function->name());
optimizer.Optimize(body);
if (optimizer.HasStackOverflow()) {