Index: runtime/vm/intermediate_language_ia32.cc |
=================================================================== |
--- runtime/vm/intermediate_language_ia32.cc (revision 37923) |
+++ runtime/vm/intermediate_language_ia32.cc (working copy) |
@@ -800,6 +800,7 @@ |
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(); |
// Push the result place holder initialized to NULL. |
__ PushObject(Object::ZoneHandle()); |
@@ -813,8 +814,8 @@ |
__ movl(ECX, Immediate(reinterpret_cast<uword>(native_c_function()))); |
__ movl(EDX, Immediate(argc_tag)); |
const ExternalLabel* stub_entry = (is_bootstrap_native() || is_leaf_call) ? |
- &StubCode::CallBootstrapCFunctionLabel() : |
- &StubCode::CallNativeCFunctionLabel(); |
+ &stub_code->CallBootstrapCFunctionLabel() : |
+ &stub_code->CallNativeCFunctionLabel(); |
compiler->GenerateCall(token_pos(), |
stub_entry, |
PcDescriptors::kOther, |
@@ -1709,8 +1710,10 @@ |
virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Comment("StoreInstanceFieldSlowPath"); |
__ Bind(entry_label()); |
+ Isolate* isolate = compiler->isolate(); |
const Code& stub = |
- Code::Handle(StubCode::GetAllocationStubForClass(cls_)); |
+ Code::Handle(isolate, |
+ isolate->stub_code()->GetAllocationStubForClass(cls_)); |
const ExternalLabel label(stub.EntryPoint()); |
LocationSummary* locs = instruction_->locs(); |
@@ -2183,8 +2186,9 @@ |
} |
__ Bind(&slow_path); |
+ StubCode* stub_code = compiler->isolate()->stub_code(); |
compiler->GenerateCall(token_pos(), |
- &StubCode::AllocateArrayLabel(), |
+ &stub_code->AllocateArrayLabel(), |
PcDescriptors::kOther, |
locs()); |
__ Bind(&done); |
@@ -2200,9 +2204,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(); |
@@ -2232,9 +2239,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(); |
@@ -2264,9 +2274,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(); |
@@ -2578,7 +2591,8 @@ |
compiler->SaveLiveRegisters(locs); |
__ movl(EDX, Immediate(instruction_->num_context_variables())); |
- const ExternalLabel label(StubCode::AllocateContextEntryPoint()); |
+ StubCode* stub_code = compiler->isolate()->stub_code(); |
+ const ExternalLabel label(stub_code->AllocateContextEntryPoint()); |
compiler->GenerateCall(instruction_->token_pos(), |
&label, |
PcDescriptors::kOther, |
@@ -2668,7 +2682,8 @@ |
ASSERT(locs()->out(0).reg() == EAX); |
__ movl(EDX, Immediate(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, |
@@ -3607,9 +3622,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(); |
@@ -5688,10 +5706,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, 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(); |
@@ -6315,7 +6335,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, |
@@ -6327,7 +6350,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()); |
__ movl(EDX, Immediate(0)); |
__ movl(ECX, Immediate(0)); |
compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |