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

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

Issue 1835633002: Precompilation: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 8 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/dart.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 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after
3333 3333
3334 3334
3335 TokenPosition Class::ComputeEndTokenPos() const { 3335 TokenPosition Class::ComputeEndTokenPos() const {
3336 // Return the begin token for synthetic classes. 3336 // Return the begin token for synthetic classes.
3337 if (is_synthesized_class() || IsMixinApplication() || IsTopLevel()) { 3337 if (is_synthesized_class() || IsMixinApplication() || IsTopLevel()) {
3338 return token_pos(); 3338 return token_pos();
3339 } 3339 }
3340 const Script& scr = Script::Handle(script()); 3340 const Script& scr = Script::Handle(script());
3341 ASSERT(!scr.IsNull()); 3341 ASSERT(!scr.IsNull());
3342 const TokenStream& tkns = TokenStream::Handle(scr.tokens()); 3342 const TokenStream& tkns = TokenStream::Handle(scr.tokens());
3343 if (tkns.IsNull()) {
3344 ASSERT(Dart::IsRunningPrecompiledCode());
3345 return TokenPosition::kNoSource;
3346 }
3343 TokenStream::Iterator tkit(tkns, 3347 TokenStream::Iterator tkit(tkns,
3344 token_pos(), 3348 token_pos(),
3345 TokenStream::Iterator::kNoNewlines); 3349 TokenStream::Iterator::kNoNewlines);
3346 intptr_t level = 0; 3350 intptr_t level = 0;
3347 while (tkit.CurrentTokenKind() != Token::kEOS) { 3351 while (tkit.CurrentTokenKind() != Token::kEOS) {
3348 if (tkit.CurrentTokenKind() == Token::kLBRACE) { 3352 if (tkit.CurrentTokenKind() == Token::kLBRACE) {
3349 level++; 3353 level++;
3350 } else if (tkit.CurrentTokenKind() == Token::kRBRACE) { 3354 } else if (tkit.CurrentTokenKind() == Token::kRBRACE) {
3351 if (--level == 0) { 3355 if (--level == 0) {
3352 return tkit.CurrentPosition(); 3356 return tkit.CurrentPosition();
(...skipping 18425 matching lines...) Expand 10 before | Expand all | Expand 10 after
21778 return UserTag::null(); 21782 return UserTag::null();
21779 } 21783 }
21780 21784
21781 21785
21782 const char* UserTag::ToCString() const { 21786 const char* UserTag::ToCString() const {
21783 const String& tag_label = String::Handle(label()); 21787 const String& tag_label = String::Handle(label());
21784 return tag_label.ToCString(); 21788 return tag_label.ToCString();
21785 } 21789 }
21786 21790
21787 } // namespace dart 21791 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698