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

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

Issue 10689099: Add --trace_type_check_elimination flag for debugging purposes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
« runtime/vm/flow_graph_builder.cc ('K') | « runtime/vm/parser.h ('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 "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 5747 matching lines...) Expand 10 before | Expand all | Expand 10 after
5758 // Script is unknown. 5758 // Script is unknown.
5759 // Append the formatted error or warning message. 5759 // Append the formatted error or warning message.
5760 msg_len += OS::VSNPrint(message_buffer + msg_len, 5760 msg_len += OS::VSNPrint(message_buffer + msg_len,
5761 message_buffer_size - msg_len, 5761 message_buffer_size - msg_len,
5762 format, 5762 format,
5763 args); 5763 args);
5764 } 5764 }
5765 } 5765 }
5766 5766
5767 5767
5768 void Parser::PrintMessage(const Script& script,
5769 intptr_t token_pos,
5770 const char* message_header,
5771 const char* format, ...) {
5772 va_list args;
5773 va_start(args, format);
5774 const intptr_t kMessageBufferSize = 512;
5775 char message_buffer[kMessageBufferSize];
5776 FormatMessage(script, token_pos, message_header,
5777 message_buffer, kMessageBufferSize,
5778 format, args);
5779 va_end(args);
5780 OS::Print("%s", message_buffer);
5781 }
5782
5783
5768 void Parser::ErrorMsg(intptr_t token_pos, const char* format, ...) { 5784 void Parser::ErrorMsg(intptr_t token_pos, const char* format, ...) {
5769 va_list args; 5785 va_list args;
5770 va_start(args, format); 5786 va_start(args, format);
5771 const Error& error = Error::Handle( 5787 const Error& error = Error::Handle(
5772 FormatError(script_, token_pos, "Error", format, args)); 5788 FormatError(script_, token_pos, "Error", format, args));
5773 va_end(args); 5789 va_end(args);
5774 Isolate::Current()->long_jump_base()->Jump(1, error); 5790 Isolate::Current()->long_jump_base()->Jump(1, error);
5775 UNREACHABLE(); 5791 UNREACHABLE();
5776 } 5792 }
5777 5793
(...skipping 2856 matching lines...) Expand 10 before | Expand all | Expand 10 after
8634 void Parser::SkipQualIdent() { 8650 void Parser::SkipQualIdent() {
8635 ASSERT(IsIdentifier()); 8651 ASSERT(IsIdentifier());
8636 ConsumeToken(); 8652 ConsumeToken();
8637 if (CurrentToken() == Token::kPERIOD) { 8653 if (CurrentToken() == Token::kPERIOD) {
8638 ConsumeToken(); // Consume the kPERIOD token. 8654 ConsumeToken(); // Consume the kPERIOD token.
8639 ExpectIdentifier("identifier expected after '.'"); 8655 ExpectIdentifier("identifier expected after '.'");
8640 } 8656 }
8641 } 8657 }
8642 8658
8643 } // namespace dart 8659 } // namespace dart
OLDNEW
« runtime/vm/flow_graph_builder.cc ('K') | « runtime/vm/parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698