mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:37:53 +00:00
Use Function::ZoneHandle for StaticCallInstr targets
R=kustermann@google.com BUG= Review-Url: https://codereview.chromium.org/2897643002 .
This commit is contained in:
parent
3b5874a332
commit
c8f9e0f3f9
|
@ -2023,7 +2023,7 @@ void AotOptimizer::VisitPolymorphicInstanceCall(
|
|||
if (receiver_cid != kDynamicCid) {
|
||||
const Class& receiver_class =
|
||||
Class::Handle(Z, isolate()->class_table()->At(receiver_cid));
|
||||
const Function& function = Function::Handle(
|
||||
const Function& function = Function::ZoneHandle(
|
||||
Z, call->instance_call()->ResolveForReceiverClass(receiver_class));
|
||||
if (!function.IsNull()) {
|
||||
// Only one target. Replace by static call.
|
||||
|
|
|
@ -1489,7 +1489,8 @@ void JitOptimizer::VisitInstanceCall(InstanceCallInstr* instr) {
|
|||
}
|
||||
|
||||
if (has_one_target) {
|
||||
const Function& target = Function::Handle(Z, unary_checks.GetTargetAt(0));
|
||||
const Function& target =
|
||||
Function::ZoneHandle(Z, unary_checks.GetTargetAt(0));
|
||||
const RawFunction::Kind function_kind = target.kind();
|
||||
if (!flow_graph()->InstanceCallNeedsClassCheck(instr, function_kind)) {
|
||||
StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target);
|
||||
|
@ -1516,7 +1517,8 @@ void JitOptimizer::VisitInstanceCall(InstanceCallInstr* instr) {
|
|||
// array, not the IC array.
|
||||
AddReceiverCheck(instr);
|
||||
// Call can still deoptimize, do not detach environment from instr.
|
||||
const Function& target = Function::Handle(Z, unary_checks.GetTargetAt(0));
|
||||
const Function& target =
|
||||
Function::ZoneHandle(Z, unary_checks.GetTargetAt(0));
|
||||
StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target);
|
||||
instr->ReplaceWith(call, current_iterator());
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue