| Index: runtime/vm/intermediate_language_arm.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_arm.cc (revision 37923)
|
| +++ runtime/vm/intermediate_language_arm.cc (working copy)
|
| @@ -928,9 +928,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());
|
| @@ -939,7 +940,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(
|
| @@ -1918,11 +1919,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();
|
| @@ -2378,8 +2382,9 @@
|
| }
|
| }
|
|
|
| + StubCode* stub_code = compiler->isolate()->stub_code();
|
| compiler->GenerateCall(token_pos(),
|
| - &StubCode::AllocateArrayLabel(),
|
| + &stub_code->AllocateArrayLabel(),
|
| PcDescriptors::kOther,
|
| locs());
|
| ASSERT(locs()->out(0).reg() == kResultReg);
|
| @@ -2394,9 +2399,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();
|
| @@ -2426,9 +2434,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();
|
| @@ -2458,9 +2469,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();
|
| @@ -2751,7 +2765,8 @@
|
| ASSERT(locs()->out(0).reg() == R0);
|
|
|
| __ LoadImmediate(R1, num_context_variables());
|
| - 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,
|
| @@ -3694,9 +3709,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();
|
| @@ -5913,10 +5931,12 @@
|
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Comment("BoxIntegerSlowPath");
|
| __ Bind(entry_label());
|
| + Isolate* isolate = compiler->isolate();
|
| + StubCode* stub_code = isolate->stub_code();
|
| const Class& mint_class =
|
| - Class::ZoneHandle(Isolate::Current()->object_store()->mint_class());
|
| + Class::ZoneHandle(isolate->object_store()->mint_class());
|
| const Code& stub =
|
| - Code::Handle(StubCode::GetAllocationStubForClass(mint_class));
|
| + Code::Handle(isolate, stub_code->GetAllocationStubForClass(mint_class));
|
| const ExternalLabel label(stub.EntryPoint());
|
|
|
| LocationSummary* locs = instruction_->locs();
|
| @@ -6417,7 +6437,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,
|
| @@ -6429,7 +6452,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);
|
| __ LoadImmediate(R5, 0);
|
| compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
|
|
|