Skip to content

Commit

Permalink
Do not create method extractors during JitOptimizer::TryExpandClasses…
Browse files Browse the repository at this point in the history
…InICData.

Closes #29230
Issue #29292
Issue #29293

R=erikcorry@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2796283006 .
  • Loading branch information
rmacnak-google committed Apr 7, 2017
1 parent d0e450d commit 170bf10
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions runtime/vm/jit_optimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ bool JitOptimizer::TryCreateICData(InstanceCallInstr* call) {
Array::Handle(Z, ArgumentsDescriptor::New(call->ArgumentCount(),
call->argument_names()));
ArgumentsDescriptor args_desc(args_desc_array);
const Function& function =
Function::Handle(Z, Resolver::ResolveDynamicForReceiverClass(
receiver_class, call->function_name(),
args_desc, false /* allow add */));
bool allow_add = false;
const Function& function = Function::Handle(
Z, Resolver::ResolveDynamicForReceiverClass(
receiver_class, call->function_name(), args_desc, allow_add));
if (function.IsNull()) {
return false;
}
Expand Down Expand Up @@ -175,10 +175,10 @@ bool JitOptimizer::TryCreateICData(InstanceCallInstr* call) {
Array::Handle(Z, ArgumentsDescriptor::New(call->ArgumentCount(),
call->argument_names()));
ArgumentsDescriptor args_desc(args_desc_array);
const Function& function =
Function::Handle(Z, Resolver::ResolveDynamicForReceiverClass(
owner_class, call->function_name(), args_desc,
false /* allow_add */));
bool allow_add = false;
const Function& function = Function::Handle(
Z, Resolver::ResolveDynamicForReceiverClass(
owner_class, call->function_name(), args_desc, allow_add));
if (!function.IsNull()) {
const ICData& ic_data = ICData::ZoneHandle(
Z, ICData::NewFrom(*call->ic_data(), class_ids.length()));
Expand Down Expand Up @@ -1458,8 +1458,10 @@ bool JitOptimizer::LookupMethodFor(int class_id,
if (!cls.is_finalized()) return false;
if (Array::Handle(cls.functions()).IsNull()) return false;

Function& target_function = Function::Handle(
Z, Resolver::ResolveDynamicForReceiverClass(cls, name, args_desc));
bool allow_add = false;
Function& target_function =
Function::Handle(Z, Resolver::ResolveDynamicForReceiverClass(
cls, name, args_desc, allow_add));
if (target_function.IsNull()) return false;
*fn_return ^= target_function.raw();
return true;
Expand Down

0 comments on commit 170bf10

Please sign in to comment.