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

Unified Diff: runtime/vm/resolver.cc

Issue 23484020: Update handling of ambiguous name references (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « runtime/vm/resolver.h ('k') | runtime/vm/resolver_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/resolver.cc
===================================================================
--- runtime/vm/resolver.cc (revision 27310)
+++ runtime/vm/resolver.cc (working copy)
@@ -143,14 +143,12 @@
const String& function_name,
intptr_t num_arguments,
const Array& argument_names,
- StaticResolveType resolve_type,
- String* ambiguity_error_msg) {
+ StaticResolveType resolve_type) {
ASSERT(!library.IsNull());
Function& function = Function::Handle();
if (class_name.IsNull() || (class_name.Length() == 0)) {
// Check if we are referring to a top level function.
- const Object& object = Object::Handle(
- library.LookupObject(function_name, ambiguity_error_msg));
+ const Object& object = Object::Handle(library.LookupObject(function_name));
if (!object.IsNull() && object.IsFunction()) {
function ^= object.raw();
if (!function.AreValidArguments(num_arguments, argument_names, NULL)) {
@@ -168,18 +166,15 @@
}
} else {
if (FLAG_trace_resolving) {
- OS::Print("ResolveStatic error '%s': %s.\n",
- function_name.ToCString(),
- ambiguity_error_msg->IsNull() ? "top level function not found"
- : ambiguity_error_msg->ToCString());
+ OS::Print("ResolveStatic error: function '%s' not found.\n",
+ function_name.ToCString());
}
}
} else {
// Lookup class_name in the library's class dictionary to get at
// the dart class object. If class_name is not found in the dictionary
// ResolveStatic will return a NULL function object.
- const Class& cls = Class::Handle(
- library.LookupClass(class_name, ambiguity_error_msg));
+ const Class& cls = Class::Handle(library.LookupClass(class_name));
if (!cls.IsNull()) {
function = ResolveStatic(cls,
function_name,
@@ -188,11 +183,9 @@
resolve_type);
}
if (FLAG_trace_resolving && function.IsNull()) {
- OS::Print("ResolveStatic error '%s.%s': %s.\n",
+ OS::Print("ResolveStatic error: function '%s.%s' not found.\n",
class_name.ToCString(),
- function_name.ToCString(),
- ambiguity_error_msg->IsNull() ? "static function not found"
- : ambiguity_error_msg->ToCString());
+ function_name.ToCString());
}
}
return function.raw();
« no previous file with comments | « runtime/vm/resolver.h ('k') | runtime/vm/resolver_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698