| Index: runtime/vm/intermediate_language_arm64.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_arm64.cc (revision 37923)
|
| +++ runtime/vm/intermediate_language_arm64.cc (working copy)
|
| @@ -773,9 +773,10 @@
|
| const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
|
| const bool is_leaf_call =
|
| (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
|
| + StubCode* stub_code = compiler->isolate()->stub_code();
|
| const ExternalLabel* stub_entry;
|
| if (is_bootstrap_native() || is_leaf_call) {
|
| - stub_entry = &StubCode::CallBootstrapCFunctionLabel();
|
| + stub_entry = &stub_code->CallBootstrapCFunctionLabel();
|
| #if defined(USING_SIMULATOR)
|
| entry = Simulator::RedirectExternalReference(
|
| entry, Simulator::kBootstrapNativeCall, function().NumParameters());
|
| @@ -784,7 +785,7 @@
|
| // In the case of non bootstrap native methods the CallNativeCFunction
|
| // stub generates the redirection address when running under the simulator
|
| // and hence we do not change 'entry' here.
|
| - stub_entry = &StubCode::CallNativeCFunctionLabel();
|
| + stub_entry = &stub_code->CallNativeCFunctionLabel();
|
| #if defined(USING_SIMULATOR)
|
| if (!function().IsNativeAutoSetupScope()) {
|
| entry = Simulator::RedirectExternalReference(
|
| @@ -1606,11 +1607,14 @@
|
| : instruction_(instruction), cls_(cls) { }
|
|
|
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + Isolate* isolate = compiler->isolate();
|
| + StubCode* stub_code = isolate->stub_code();
|
| +
|
| __ Comment("StoreInstanceFieldSlowPath");
|
| __ Bind(entry_label());
|
|
|
| const Code& stub =
|
| - Code::Handle(StubCode::GetAllocationStubForClass(cls_));
|
| + Code::Handle(isolate, stub_code->GetAllocationStubForClass(cls_));
|
| const ExternalLabel label(stub.EntryPoint());
|
|
|
| LocationSummary* locs = instruction_->locs();
|
| @@ -1962,8 +1966,9 @@
|
| // Allocate the array. R2 = length, R1 = element type.
|
| ASSERT(locs()->in(kElementTypePos).reg() == R1);
|
| ASSERT(locs()->in(kLengthPos).reg() == R2);
|
| + StubCode* stub_code = compiler->isolate()->stub_code();
|
| compiler->GenerateCall(token_pos(),
|
| - &StubCode::AllocateArrayLabel(),
|
| + &stub_code->AllocateArrayLabel(),
|
| PcDescriptors::kOther,
|
| locs());
|
| ASSERT(locs()->out(0).reg() == R0);
|
| @@ -1978,9 +1983,12 @@
|
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Comment("BoxDoubleSlowPath");
|
| __ Bind(entry_label());
|
| + Isolate* isolate = compiler->isolate();
|
| + StubCode* stub_code = isolate->stub_code();
|
| const Class& double_class = compiler->double_class();
|
| const Code& stub =
|
| - Code::Handle(StubCode::GetAllocationStubForClass(double_class));
|
| + Code::Handle(isolate,
|
| + stub_code->GetAllocationStubForClass(double_class));
|
| const ExternalLabel label(stub.EntryPoint());
|
|
|
| LocationSummary* locs = instruction_->locs();
|
| @@ -2010,9 +2018,12 @@
|
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Comment("BoxFloat32x4SlowPath");
|
| __ Bind(entry_label());
|
| + Isolate* isolate = compiler->isolate();
|
| + StubCode* stub_code = isolate->stub_code();
|
| const Class& float32x4_class = compiler->float32x4_class();
|
| const Code& stub =
|
| - Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class));
|
| + Code::Handle(isolate,
|
| + stub_code->GetAllocationStubForClass(float32x4_class));
|
| const ExternalLabel label(stub.EntryPoint());
|
|
|
| LocationSummary* locs = instruction_->locs();
|
| @@ -2042,9 +2053,12 @@
|
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Comment("BoxFloat64x2SlowPath");
|
| __ Bind(entry_label());
|
| + Isolate* isolate = compiler->isolate();
|
| + StubCode* stub_code = isolate->stub_code();
|
| const Class& float64x2_class = compiler->float64x2_class();
|
| const Code& stub =
|
| - Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class));
|
| + Code::Handle(isolate,
|
| + stub_code->GetAllocationStubForClass(float64x2_class));
|
| const ExternalLabel label(stub.EntryPoint());
|
|
|
| LocationSummary* locs = instruction_->locs();
|
| @@ -2326,7 +2340,8 @@
|
| ASSERT(locs()->out(0).reg() == R0);
|
|
|
| __ LoadImmediate(R1, num_context_variables(), PP);
|
| - const ExternalLabel label(StubCode::AllocateContextEntryPoint());
|
| + StubCode* stub_code = compiler->isolate()->stub_code();
|
| + const ExternalLabel label(stub_code->AllocateContextEntryPoint());
|
| compiler->GenerateCall(token_pos(),
|
| &label,
|
| PcDescriptors::kOther,
|
| @@ -3197,9 +3212,12 @@
|
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Comment("BoxInt32x4SlowPath");
|
| __ Bind(entry_label());
|
| + Isolate* isolate = compiler->isolate();
|
| + StubCode* stub_code = isolate->stub_code();
|
| const Class& int32x4_class = compiler->int32x4_class();
|
| const Code& stub =
|
| - Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class));
|
| + Code::Handle(isolate,
|
| + stub_code->GetAllocationStubForClass(int32x4_class));
|
| const ExternalLabel label(stub.EntryPoint());
|
|
|
| LocationSummary* locs = instruction_->locs();
|
| @@ -5332,7 +5350,10 @@
|
|
|
|
|
| void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls()));
|
| + Isolate* isolate = compiler->isolate();
|
| + StubCode* stub_code = isolate->stub_code();
|
| + const Code& stub = Code::Handle(isolate,
|
| + stub_code->GetAllocationStubForClass(cls()));
|
| const ExternalLabel label(stub.EntryPoint());
|
| compiler->GenerateCall(token_pos(),
|
| &label,
|
| @@ -5344,7 +5365,8 @@
|
|
|
| void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(!compiler->is_optimizing());
|
| - const ExternalLabel label(StubCode::DebugStepCheckEntryPoint());
|
| + StubCode* stub_code = compiler->isolate()->stub_code();
|
| + const ExternalLabel label(stub_code->DebugStepCheckEntryPoint());
|
| __ LoadImmediate(R4, 0, kNoPP);
|
| __ LoadImmediate(R5, 0, kNoPP);
|
| compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
|
|
|