Index: runtime/vm/intermediate_language_arm.cc |
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc |
index 6538dec12c1126c65b56d981b7ade0a2b455ebe7..eae16a3602babd1215b8c83fc0b6e387ae5b8cd4 100644 |
--- a/runtime/vm/intermediate_language_arm.cc |
+++ b/runtime/vm/intermediate_language_arm.cc |
@@ -938,10 +938,9 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
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 = &stub_code->CallBootstrapCFunctionLabel(); |
+ stub_entry = &StubCode::CallBootstrapCFunctionLabel(); |
#if defined(USING_SIMULATOR) |
entry = Simulator::RedirectExternalReference( |
entry, Simulator::kBootstrapNativeCall, function().NumParameters()); |
@@ -950,7 +949,7 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// 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 = &stub_code->CallNativeCFunctionLabel(); |
+ stub_entry = &StubCode::CallNativeCFunctionLabel(); |
#if defined(USING_SIMULATOR) |
if (!function().IsNativeAutoSetupScope()) { |
entry = Simulator::RedirectExternalReference( |
@@ -1808,7 +1807,6 @@ class BoxAllocationSlowPath : public SlowPathCode { |
virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
Isolate* isolate = compiler->isolate(); |
- StubCode* stub_code = isolate->stub_code(); |
if (Assembler::EmittingComments()) { |
__ Comment("%s slow path allocation of %s", |
@@ -1817,7 +1815,7 @@ class BoxAllocationSlowPath : public SlowPathCode { |
} |
__ Bind(entry_label()); |
const Code& stub = |
- Code::Handle(isolate, stub_code->GetAllocationStubForClass(cls_)); |
+ Code::Handle(isolate, StubCode::GetAllocationStubForClass(cls_)); |
const ExternalLabel label(stub.EntryPoint()); |
LocationSummary* locs = instruction_->locs(); |
@@ -2389,15 +2387,11 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
return; |
} |
} |
- Isolate* isolate = compiler->isolate(); |
- const Code& stub = Code::Handle( |
- isolate, isolate->stub_code()->GetAllocateArrayStub()); |
- const ExternalLabel label(stub.EntryPoint()); |
+ const ExternalLabel label(StubCode::AllocateArrayEntryPoint()); |
compiler->GenerateCall(token_pos(), |
&label, |
RawPcDescriptors::kOther, |
locs()); |
- compiler->AddStubCallTarget(stub); |
ASSERT(locs()->out(0).reg() == kResultReg); |
} |
@@ -2681,8 +2675,7 @@ class AllocateContextSlowPath : public SlowPathCode { |
compiler->SaveLiveRegisters(locs); |
__ LoadImmediate(R1, instruction_->num_context_variables()); |
- StubCode* stub_code = compiler->isolate()->stub_code(); |
- const ExternalLabel label(stub_code->AllocateContextEntryPoint()); |
+ const ExternalLabel label(StubCode::AllocateContextEntryPoint()); |
compiler->GenerateCall(instruction_->token_pos(), |
&label, |
RawPcDescriptors::kOther, |
@@ -2739,8 +2732,7 @@ void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(locs()->out(0).reg() == R0); |
__ LoadImmediate(R1, num_context_variables()); |
- StubCode* stub_code = compiler->isolate()->stub_code(); |
- const ExternalLabel label(stub_code->AllocateContextEntryPoint()); |
+ const ExternalLabel label(StubCode::AllocateContextEntryPoint()); |
compiler->GenerateCall(token_pos(), |
&label, |
RawPcDescriptors::kOther, |
@@ -6806,9 +6798,8 @@ LocationSummary* AllocateObjectInstr::MakeLocationSummary(Zone* zone, |
void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Isolate* isolate = compiler->isolate(); |
- StubCode* stub_code = isolate->stub_code(); |
const Code& stub = Code::Handle(isolate, |
- stub_code->GetAllocationStubForClass(cls())); |
+ StubCode::GetAllocationStubForClass(cls())); |
const ExternalLabel label(stub.EntryPoint()); |
compiler->GenerateCall(token_pos(), |
&label, |
@@ -6821,8 +6812,7 @@ void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(!compiler->is_optimizing()); |
- StubCode* stub_code = compiler->isolate()->stub_code(); |
- const ExternalLabel label(stub_code->DebugStepCheckEntryPoint()); |
+ const ExternalLabel label(StubCode::DebugStepCheckEntryPoint()); |
compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
} |