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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 9395017: Simplify type resolution in parser. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 4232)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -260,18 +260,19 @@
// Resolve unresolved_class in the library of cls.
RawClass* ClassFinalizer::ResolveClass(
const Class& cls, const UnresolvedClass& unresolved_class) {
+ const String& class_name = String::Handle(unresolved_class.ident());
Library& lib = Library::Handle();
+ Class& resolved_class = Class::Handle();
if (unresolved_class.library_prefix() == LibraryPrefix::null()) {
lib = cls.library();
+ resolved_class = lib.LookupClass(class_name);
} else {
LibraryPrefix& lib_prefix = LibraryPrefix::Handle();
lib_prefix = unresolved_class.library_prefix();
ASSERT(!lib_prefix.IsNull());
lib = lib_prefix.library();
+ resolved_class = lib.LookupLocalClass(class_name);
}
- ASSERT(!lib.IsNull());
- const String& class_name = String::Handle(unresolved_class.ident());
- const Class& resolved_class = Class::Handle(lib.LookupClass(class_name));
if (resolved_class.IsNull()) {
const Script& script = Script::Handle(cls.script());
ReportError(script, unresolved_class.token_index(),
« no previous file with comments | « no previous file | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698