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

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

Issue 1352483002: Add benchmark output to compiler stats. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: mmmmmmerge Created 5 years, 3 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/isolate.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 8566 matching lines...) Expand 10 before | Expand all | Expand 10 after
8577 const TokenStream& tkns = TokenStream::Handle(zone, tokens()); 8577 const TokenStream& tkns = TokenStream::Handle(zone, tokens());
8578 if (!tkns.IsNull()) { 8578 if (!tkns.IsNull()) {
8579 // Already tokenized. 8579 // Already tokenized.
8580 return; 8580 return;
8581 } 8581 }
8582 // Get the source, scan and allocate the token stream. 8582 // Get the source, scan and allocate the token stream.
8583 VMTagScope tagScope(thread, VMTag::kCompileScannerTagId); 8583 VMTagScope tagScope(thread, VMTag::kCompileScannerTagId);
8584 CSTAT_TIMER_SCOPE(thread, scanner_timer); 8584 CSTAT_TIMER_SCOPE(thread, scanner_timer);
8585 const String& src = String::Handle(zone, Source()); 8585 const String& src = String::Handle(zone, Source());
8586 Scanner scanner(src, private_key); 8586 Scanner scanner(src, private_key);
8587 set_tokens(TokenStream::Handle(zone, 8587 const Scanner::GrowableTokenStream& ts = scanner.GetStream();
8588 TokenStream::New(scanner.GetStream(), 8588 INC_STAT(thread, num_tokens_scanned, ts.length());
8589 private_key))); 8589 set_tokens(TokenStream::Handle(zone, TokenStream::New(ts, private_key)));
8590 INC_STAT(thread, src_length, src.Length()); 8590 INC_STAT(thread, src_length, src.Length());
8591 } 8591 }
8592 8592
8593 8593
8594 void Script::SetLocationOffset(intptr_t line_offset, 8594 void Script::SetLocationOffset(intptr_t line_offset,
8595 intptr_t col_offset) const { 8595 intptr_t col_offset) const {
8596 ASSERT(line_offset >= 0); 8596 ASSERT(line_offset >= 0);
8597 ASSERT(col_offset >= 0); 8597 ASSERT(col_offset >= 0);
8598 StoreNonPointer(&raw_ptr()->line_offset_, line_offset); 8598 StoreNonPointer(&raw_ptr()->line_offset_, line_offset);
8599 StoreNonPointer(&raw_ptr()->col_offset_, col_offset); 8599 StoreNonPointer(&raw_ptr()->col_offset_, col_offset);
(...skipping 12836 matching lines...) Expand 10 before | Expand all | Expand 10 after
21436 return tag_label.ToCString(); 21436 return tag_label.ToCString();
21437 } 21437 }
21438 21438
21439 21439
21440 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21440 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21441 Instance::PrintJSONImpl(stream, ref); 21441 Instance::PrintJSONImpl(stream, ref);
21442 } 21442 }
21443 21443
21444 21444
21445 } // namespace dart 21445 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698