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

Unified Diff: runtime/vm/resolver.cc

Issue 9316100: Fix for issue 1307: throw runtime exception instead of reporting a compile time error if a static... (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 | « runtime/vm/resolver.h ('k') | tests/language/language.status » ('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 3908)
+++ runtime/vm/resolver.cc (working copy)
@@ -118,11 +118,9 @@
}
-RawFunction* Resolver::ResolveStatic(const Class& cls,
- const String& function_name,
- int num_arguments,
- const Array& argument_names,
- StaticResolveType resolve_type) {
+RawFunction* Resolver::ResolveStaticByName(const Class& cls,
+ const String& function_name,
+ StaticResolveType resolve_type) {
if (cls.IsNull()) {
// Can't resolve function if cls is null.
return Function::null();
@@ -145,6 +143,18 @@
if (super_class.IsNull()) break;
}
}
+ return function.raw();
+}
+
+
+
+RawFunction* Resolver::ResolveStatic(const Class& cls,
+ const String& function_name,
+ int num_arguments,
+ const Array& argument_names,
+ StaticResolveType resolve_type) {
+ const Function& function = Function::Handle(
+ ResolveStaticByName(cls, function_name, resolve_type));
if (function.IsNull() ||
!function.AreValidArguments(num_arguments, argument_names)) {
// Return a null function to signal to the upper levels to throw a
« no previous file with comments | « runtime/vm/resolver.h ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698