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

Unified Diff: runtime/vm/resolver.cc

Issue 50523018: Cleanup StaticResolveType, it does not seem to be used anywhere. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 29568)
+++ runtime/vm/resolver.cc (working copy)
@@ -144,8 +144,7 @@
const String& class_name,
const String& function_name,
intptr_t num_arguments,
- const Array& argument_names,
- StaticResolveType resolve_type) {
+ const Array& argument_names) {
ASSERT(!library.IsNull());
Function& function = Function::Handle();
if (class_name.IsNull() || (class_name.Length() == 0)) {
@@ -181,8 +180,7 @@
function = ResolveStatic(cls,
function_name,
num_arguments,
- argument_names,
- resolve_type);
+ argument_names);
}
if (FLAG_trace_resolving && function.IsNull()) {
OS::Print("ResolveStatic error: function '%s.%s' not found.\n",
@@ -194,41 +192,16 @@
}
-RawFunction* Resolver::ResolveStaticByName(const Class& cls,
- const String& function_name,
- StaticResolveType resolve_type) {
+RawFunction* Resolver::ResolveStatic(const Class& cls,
+ const String& function_name,
+ intptr_t num_arguments,
+ const Array& argument_names) {
ASSERT(!cls.IsNull());
-
if (FLAG_trace_resolving) {
OS::Print("ResolveStatic '%s'\n", function_name.ToCString());
}
-
- // Now look for a static function whose name matches function_name
- // in the class.
- Function& function =
+ const Function& function =
Function::Handle(cls.LookupStaticFunction(function_name));
- if (resolve_type == kNotQualified) {
- // Walk the hierarchy.
- Class& super_class = Class::Handle(cls.SuperClass());
- while (function.IsNull()) {
- function = super_class.LookupStaticFunction(function_name);
- super_class = super_class.SuperClass();
- if (super_class.IsNull()) break;
- }
- }
- return function.raw();
-}
-
-
-
-RawFunction* Resolver::ResolveStatic(const Class& cls,
- const String& function_name,
- intptr_t num_arguments,
- const Array& argument_names,
- StaticResolveType resolve_type) {
- ASSERT(!cls.IsNull());
- const Function& function = Function::Handle(
- ResolveStaticByName(cls, function_name, resolve_type));
if (function.IsNull() ||
!function.AreValidArguments(num_arguments, argument_names, NULL)) {
// Return a null function to signal to the upper levels to throw a
« 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