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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 19200002: Change resolving of instance methods to check early for name mismatch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 25039)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -6,6 +6,7 @@
#include "vm/bit_vector.h"
#include "vm/cha.h"
+#include "vm/dart_entry.h"
#include "vm/flow_graph_builder.h"
#include "vm/flow_graph_compiler.h"
#include "vm/hash_map.h"
@@ -102,16 +103,16 @@
return false;
}
if (class_ids[0] != kDynamicCid) {
- const intptr_t num_named_arguments = call->argument_names().IsNull() ?
- 0 : call->argument_names().Length();
+ ArgumentsDescriptor args_desc(
+ Array::Handle(ArgumentsDescriptor::New(call->ArgumentCount(),
+ call->argument_names())));
const Class& receiver_class = Class::Handle(
Isolate::Current()->class_table()->At(class_ids[0]));
- Function& function = Function::Handle();
- function = Resolver::ResolveDynamicForReceiverClass(
- receiver_class,
- call->function_name(),
- call->ArgumentCount(),
- num_named_arguments);
+ const Function& function = Function::Handle(
+ Resolver::ResolveDynamicForReceiverClass(
+ receiver_class,
+ call->function_name(),
+ args_desc));
if (function.IsNull()) {
return false;
}
@@ -2656,12 +2657,14 @@
Isolate::Current()->class_table()->At(receiver_cid));
// Resolve equality operator.
+ const intptr_t kNumArgs = 2;
+ ArgumentsDescriptor args_desc(
+ Array::Handle(ArgumentsDescriptor::New(kNumArgs)));
const Function& function = Function::Handle(
Resolver::ResolveDynamicForReceiverClass(
receiver_class,
Symbols::EqualOperator(),
- 2,
- 0));
+ args_desc));
if (function.IsNull()) {
return false;
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698