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/parser.cc

Issue 185553015: Minor VM performance improvements based on profiling. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.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/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 374
375 Token::Kind Parser::LookaheadToken(int num_tokens) { 375 Token::Kind Parser::LookaheadToken(int num_tokens) {
376 CompilerStats::num_tokens_lookahead++; 376 CompilerStats::num_tokens_lookahead++;
377 CompilerStats::num_token_checks++; 377 CompilerStats::num_token_checks++;
378 return tokens_iterator_.LookaheadTokenKind(num_tokens); 378 return tokens_iterator_.LookaheadTokenKind(num_tokens);
379 } 379 }
380 380
381 381
382 String* Parser::CurrentLiteral() const { 382 String* Parser::CurrentLiteral() const {
383 String& result = String::ZoneHandle(); 383 String& result = String::ZoneHandle(isolate_, String::null());
384 result = tokens_iterator_.CurrentLiteral(); 384 result = tokens_iterator_.CurrentLiteral();
Ivan Posva 2014/03/06 10:32:45 Why don't you merge these two lines?
srdjan 2014/03/06 17:52:02 Done in a following CL.
385 return &result; 385 return &result;
386 } 386 }
387 387
388 388
389 RawDouble* Parser::CurrentDoubleLiteral() const { 389 RawDouble* Parser::CurrentDoubleLiteral() const {
390 literal_token_ ^= tokens_iterator_.CurrentToken(); 390 literal_token_ ^= tokens_iterator_.CurrentToken();
391 ASSERT(literal_token_.kind() == Token::kDOUBLE); 391 ASSERT(literal_token_.kind() == Token::kDOUBLE);
392 return Double::RawCast(literal_token_.value()); 392 return Double::RawCast(literal_token_.value());
393 } 393 }
394 394
(...skipping 10393 matching lines...) Expand 10 before | Expand all | Expand 10 after
10788 void Parser::SkipQualIdent() { 10788 void Parser::SkipQualIdent() {
10789 ASSERT(IsIdentifier()); 10789 ASSERT(IsIdentifier());
10790 ConsumeToken(); 10790 ConsumeToken();
10791 if (CurrentToken() == Token::kPERIOD) { 10791 if (CurrentToken() == Token::kPERIOD) {
10792 ConsumeToken(); // Consume the kPERIOD token. 10792 ConsumeToken(); // Consume the kPERIOD token.
10793 ExpectIdentifier("identifier expected after '.'"); 10793 ExpectIdentifier("identifier expected after '.'");
10794 } 10794 }
10795 } 10795 }
10796 10796
10797 } // namespace dart 10797 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698