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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 9233039: Store resolved library prefix in unresolved class object in order not to repeat (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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/class_finalizer_test.cc » ('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 3699)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -261,19 +261,12 @@
RawClass* ClassFinalizer::ResolveClass(
const Class& cls, const UnresolvedClass& unresolved_class) {
Library& lib = Library::Handle();
- if (unresolved_class.qualifier() == String::null()) {
+ if (unresolved_class.library_prefix() == LibraryPrefix::null()) {
lib = cls.library();
} else {
- const String& qualifier = String::Handle(unresolved_class.qualifier());
LibraryPrefix& lib_prefix = LibraryPrefix::Handle();
- lib_prefix = cls.LookupLibraryPrefix(qualifier);
- if (lib_prefix.IsNull()) {
- const Script& script = Script::Handle(cls.script());
- ReportError(script, unresolved_class.token_index(),
- "cannot resolve library prefix '%s' from '%s'.\n",
- qualifier.ToCString(),
- String::Handle(cls.Name()).ToCString());
- }
+ lib_prefix = unresolved_class.library_prefix();
+ ASSERT(!lib_prefix.IsNull());
lib = lib_prefix.library();
}
ASSERT(!lib.IsNull());
« no previous file with comments | « no previous file | runtime/vm/class_finalizer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698