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

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

Issue 10006040: Add a test to check correct references to a global variable that initially throws (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/language/language.status » ('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 #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 6667 matching lines...) Expand 10 before | Expand all | Expand 10 after
6678 kNoArgumentNames, 6678 kNoArgumentNames,
6679 Resolver::kIsQualified)); 6679 Resolver::kIsQualified));
6680 ASSERT(!func.IsNull()); 6680 ASSERT(!func.IsNull());
6681 ASSERT(func.kind() == RawFunction::kConstImplicitGetter); 6681 ASSERT(func.kind() == RawFunction::kConstImplicitGetter);
6682 Object& const_value = Object::Handle( 6682 Object& const_value = Object::Handle(
6683 DartEntry::InvokeStatic(func, arguments, kNoArgumentNames)); 6683 DartEntry::InvokeStatic(func, arguments, kNoArgumentNames));
6684 if (const_value.IsError()) { 6684 if (const_value.IsError()) {
6685 Error& error = Error::Handle(); 6685 Error& error = Error::Handle();
6686 error ^= const_value.raw(); 6686 error ^= const_value.raw();
6687 if (const_value.IsUnhandledException()) { 6687 if (const_value.IsUnhandledException()) {
6688 field.set_value(Instance::Handle());
6688 // It is a compile-time error if evaluation of a compile-time constant 6689 // It is a compile-time error if evaluation of a compile-time constant
6689 // would raise an exception. 6690 // would raise an exception.
6690 if (field.is_final()) { 6691 if (field.is_final()) {
6691 AppendErrorMsg(error, token_index_, 6692 AppendErrorMsg(error, token_index_,
6692 "error initializing final field '%s'", 6693 "error initializing final field '%s'",
6693 String::Handle(field.name()).ToCString()); 6694 String::Handle(field.name()).ToCString());
6694 } else { 6695 } else {
6695 return GenerateRethrow(token_index_, const_value); 6696 return GenerateRethrow(token_index_, const_value);
6696 } 6697 }
6697 } else { 6698 } else {
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
8278 void Parser::SkipQualIdent() { 8279 void Parser::SkipQualIdent() {
8279 ASSERT(IsIdentifier()); 8280 ASSERT(IsIdentifier());
8280 ConsumeToken(); 8281 ConsumeToken();
8281 if (CurrentToken() == Token::kPERIOD) { 8282 if (CurrentToken() == Token::kPERIOD) {
8282 ConsumeToken(); // Consume the kPERIOD token. 8283 ConsumeToken(); // Consume the kPERIOD token.
8283 ExpectIdentifier("identifier expected after '.'"); 8284 ExpectIdentifier("identifier expected after '.'");
8284 } 8285 }
8285 } 8286 }
8286 8287
8287 } // namespace dart 8288 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698