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

Side by Side Diff: runtime/vm/compiler_stats.cc

Issue 1644793002: Replace intptr_t with TokenDescriptor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/coverage.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler_stats.h" 5 #include "vm/compiler_stats.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/log.h" 8 #include "vm/log.h"
9 #include "vm/object_graph.h" 9 #include "vm/object_graph.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 15 matching lines...) Expand all
26 stats_(compiler_stats) { 26 stats_(compiler_stats) {
27 } 27 }
28 28
29 void VisitObject(RawObject* raw_obj) { 29 void VisitObject(RawObject* raw_obj) {
30 if (raw_obj->IsFreeListElement()) { 30 if (raw_obj->IsFreeListElement()) {
31 return; 31 return;
32 } 32 }
33 obj_ = raw_obj; 33 obj_ = raw_obj;
34 if (obj_.GetClassId() == TokenStream::kClassId) { 34 if (obj_.GetClassId() == TokenStream::kClassId) {
35 TokenStream::Iterator tkit(TokenStream::Cast(obj_), 35 TokenStream::Iterator tkit(TokenStream::Cast(obj_),
36 0, 36 TokenPosition::kMinSource,
37 TokenStream::Iterator::kNoNewlines); 37 TokenStream::Iterator::kNoNewlines);
38 Token::Kind kind = tkit.CurrentTokenKind(); 38 Token::Kind kind = tkit.CurrentTokenKind();
39 while (kind != Token::kEOS) { 39 while (kind != Token::kEOS) {
40 ++stats_->num_tokens_total; 40 ++stats_->num_tokens_total;
41 tkit.Advance(); 41 tkit.Advance();
42 kind = tkit.CurrentTokenKind(); 42 kind = tkit.CurrentTokenKind();
43 } 43 }
44 } 44 }
45 } 45 }
46 46
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 total_instr_size / 1024); 280 total_instr_size / 1024);
281 log.Print(" Pc Desc size: %" Pd64 " KB\n", pc_desc_size / 1024); 281 log.Print(" Pc Desc size: %" Pd64 " KB\n", pc_desc_size / 1024);
282 log.Print(" VarDesc size: %" Pd64 " KB\n", vardesc_size / 1024); 282 log.Print(" VarDesc size: %" Pd64 " KB\n", vardesc_size / 1024);
283 log.Flush(); 283 log.Flush();
284 char* stats_text = text; 284 char* stats_text = text;
285 text = NULL; 285 text = NULL;
286 return stats_text; 286 return stats_text;
287 } 287 }
288 288
289 } // namespace dart 289 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/coverage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698