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

Unified Diff: runtime/vm/compiler_stats.cc

Issue 1420103006: Shared token objects (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: catch up Created 5 years, 2 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 | « runtime/vm/compiler_stats.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler_stats.cc
diff --git a/runtime/vm/compiler_stats.cc b/runtime/vm/compiler_stats.cc
index d3e4b02689e40d69ecb9a534b0d27ada4160ccbd..7e497c1e2fc31cf7a3a64e767280b348e66bb875 100644
--- a/runtime/vm/compiler_stats.cc
+++ b/runtime/vm/compiler_stats.cc
@@ -37,11 +37,6 @@ class TokenStreamVisitor : public ObjectVisitor {
Token::Kind kind = tkit.CurrentTokenKind();
while (kind != Token::kEOS) {
++stats_->num_tokens_total;
- if (kind == Token::kIDENT) {
- ++stats_->num_ident_tokens_total;
- } else if (Token::NeedsLiteralToken(kind)) {
- ++stats_->num_literal_tokens_total;
- }
tkit.Advance();
kind = tkit.CurrentTokenKind();
}
@@ -71,8 +66,6 @@ CompilerStats::CompilerStats(Isolate* isolate)
graphcompiler_timer(true, "flow graph compiler timer"),
codefinalizer_timer(true, "code finalization timer"),
num_tokens_total(0),
- num_literal_tokens_total(0),
- num_ident_tokens_total(0),
num_tokens_scanned(0),
num_tokens_consumed(0),
num_cached_consts(0),
@@ -117,8 +110,6 @@ void CompilerStats::Update() {
// Traverse the heap and compute number of tokens in all
// TokenStream objects.
num_tokens_total = 0;
- num_literal_tokens_total = 0;
- num_ident_tokens_total = 0;
TokenStreamVisitor visitor(isolate_, this);
isolate_->heap()->IterateObjects(&visitor);
Dart::vm_isolate()->heap()->IterateObjects(&visitor);
@@ -199,8 +190,6 @@ char* CompilerStats::PrintToZone() {
log.Print("==== Compiler Stats for isolate '%s' ====\n",
isolate_->debugger_name());
log.Print("Number of tokens: %" Pd64 "\n", num_tokens_total);
- log.Print(" Literal tokens: %" Pd64 "\n", num_literal_tokens_total);
- log.Print(" Ident tokens: %" Pd64 "\n", num_ident_tokens_total);
log.Print("Source length: %" Pd64 " characters\n", src_length);
log.Print("Number of source tokens: %" Pd64 "\n", num_tokens_scanned);
« no previous file with comments | « runtime/vm/compiler_stats.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698