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

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

Issue 15930003: - Allocate symbols for 'get:' and 'set:' (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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') | runtime/vm/symbols.h » ('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 "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 8329 matching lines...) Expand 10 before | Expand all | Expand 10 after
8340 Error* error) { 8340 Error* error) {
8341 TRACE_PARSER("ResolveNameInCurrentLibraryScope"); 8341 TRACE_PARSER("ResolveNameInCurrentLibraryScope");
8342 Object& obj = Object::Handle(LookupNameInLibrary(library_, name)); 8342 Object& obj = Object::Handle(LookupNameInLibrary(library_, name));
8343 if (obj.IsNull()) { 8343 if (obj.IsNull()) {
8344 // Name is not found in current library. Check scope of all 8344 // Name is not found in current library. Check scope of all
8345 // imported libraries. 8345 // imported libraries.
8346 String& first_lib_url = String::Handle(); 8346 String& first_lib_url = String::Handle();
8347 Namespace& import = Namespace::Handle(); 8347 Namespace& import = Namespace::Handle();
8348 intptr_t num_imports = library_.num_imports(); 8348 intptr_t num_imports = library_.num_imports();
8349 Object& imported_obj = Object::Handle(); 8349 Object& imported_obj = Object::Handle();
8350 Library& lib = Library::Handle();
8350 for (int i = 0; i < num_imports; i++) { 8351 for (int i = 0; i < num_imports; i++) {
8351 import = library_.ImportAt(i); 8352 import = library_.ImportAt(i);
8352 imported_obj = LookupNameInImport(import, name); 8353 imported_obj = LookupNameInImport(import, name);
8353 if (!imported_obj.IsNull()) { 8354 if (!imported_obj.IsNull()) {
8354 const Library& lib = Library::Handle(import.library()); 8355 lib ^= import.library();
8355 // TODO(8474): Remove the "Expect" special casing. 8356 // TODO(8474): Remove the "Expect" special casing.
8356 if (!first_lib_url.IsNull() 8357 if (!first_lib_url.IsNull()
8357 && (strcmp(name.ToCString(), "Expect") != 0) 8358 && (strcmp(name.ToCString(), "Expect") != 0)
8358 && (strcmp(name.ToCString(), "ExpectException") != 0)) { 8359 && (strcmp(name.ToCString(), "ExpectException") != 0)) {
8359 // Found duplicate definition. 8360 // Found duplicate definition.
8360 Error& ambiguous_ref_error = Error::Handle(); 8361 Error& ambiguous_ref_error = Error::Handle();
8361 if (first_lib_url.raw() == lib.url()) { 8362 if (first_lib_url.raw() == lib.url()) {
8362 ambiguous_ref_error = FormatErrorMsg( 8363 ambiguous_ref_error = FormatErrorMsg(
8363 script_, ident_pos, "Error", 8364 script_, ident_pos, "Error",
8364 "ambiguous reference: " 8365 "ambiguous reference: "
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
9955 void Parser::SkipQualIdent() { 9956 void Parser::SkipQualIdent() {
9956 ASSERT(IsIdentifier()); 9957 ASSERT(IsIdentifier());
9957 ConsumeToken(); 9958 ConsumeToken();
9958 if (CurrentToken() == Token::kPERIOD) { 9959 if (CurrentToken() == Token::kPERIOD) {
9959 ConsumeToken(); // Consume the kPERIOD token. 9960 ConsumeToken(); // Consume the kPERIOD token.
9960 ExpectIdentifier("identifier expected after '.'"); 9961 ExpectIdentifier("identifier expected after '.'");
9961 } 9962 }
9962 } 9963 }
9963 9964
9964 } // namespace dart 9965 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698