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

Side by Side Diff: runtime/vm/parser.h

Issue 23819018: Fix data races caused by compiler stats counters in the parser. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/parser.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) 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 #ifndef VM_PARSER_H_ 5 #ifndef VM_PARSER_H_
6 #define VM_PARSER_H_ 6 #define VM_PARSER_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 RawDouble* CurrentDoubleLiteral() const; 263 RawDouble* CurrentDoubleLiteral() const;
264 RawInteger* CurrentIntegerLiteral() const; 264 RawInteger* CurrentIntegerLiteral() const;
265 265
266 // Sets parser to given token position in the stream. 266 // Sets parser to given token position in the stream.
267 void SetPosition(intptr_t position); 267 void SetPosition(intptr_t position);
268 268
269 void ConsumeToken() { 269 void ConsumeToken() {
270 // Reset cache and advance the token. 270 // Reset cache and advance the token.
271 token_kind_ = Token::kILLEGAL; 271 token_kind_ = Token::kILLEGAL;
272 tokens_iterator_.Advance(); 272 tokens_iterator_.Advance();
273 CompilerStats::num_tokens_consumed++; 273 if (FLAG_compiler_stats) CompilerStats::num_tokens_consumed++;
274 } 274 }
275 void ConsumeRightAngleBracket(); 275 void ConsumeRightAngleBracket();
276 void ExpectToken(Token::Kind token_expected); 276 void ExpectToken(Token::Kind token_expected);
277 void ExpectSemicolon(); 277 void ExpectSemicolon();
278 void UnexpectedToken(); 278 void UnexpectedToken();
279 String* ExpectUserDefinedTypeIdentifier(const char* msg); 279 String* ExpectUserDefinedTypeIdentifier(const char* msg);
280 String* ExpectIdentifier(const char* msg); 280 String* ExpectIdentifier(const char* msg);
281 bool IsLiteral(const char* literal); 281 bool IsLiteral(const char* literal);
282 282
283 void SkipIf(Token::Kind); 283 void SkipIf(Token::Kind);
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 intptr_t last_used_try_index_; 718 intptr_t last_used_try_index_;
719 719
720 bool unregister_pending_function_; 720 bool unregister_pending_function_;
721 721
722 DISALLOW_COPY_AND_ASSIGN(Parser); 722 DISALLOW_COPY_AND_ASSIGN(Parser);
723 }; 723 };
724 724
725 } // namespace dart 725 } // namespace dart
726 726
727 #endif // VM_PARSER_H_ 727 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698