Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1613)

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 1270803003: VM: More abstract interface for generating stub calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 95aa2ee71e30f0fa1da14c77a1afdd230cf59063..2e02c21fcc908d48cb2159a8708c3a2642788088 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -830,11 +830,11 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
__ 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();
+ const StubEntry* stub_entry = (is_bootstrap_native() || is_leaf_call) ?
+ StubCode::CallBootstrapCFunction_entry() :
+ StubCode::CallNativeCFunction_entry();
compiler->GenerateCall(token_pos(),
- stub_entry,
+ *stub_entry,
RawPcDescriptors::kOther,
locs());
__ popl(result);
@@ -1658,7 +1658,7 @@ class BoxAllocationSlowPath : public SlowPathCode {
__ Bind(entry_label());
const Code& stub =
Code::Handle(isolate, StubCode::GetAllocationStubForClass(cls_));
- const ExternalLabel label(stub.EntryPoint());
+ const StubEntry stub_entry(stub);
LocationSummary* locs = instruction_->locs();
@@ -1666,7 +1666,7 @@ class BoxAllocationSlowPath : public SlowPathCode {
compiler->SaveLiveRegisters(locs);
compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
- &label,
+ stub_entry,
RawPcDescriptors::kOther,
locs);
compiler->AddStubCallTarget(stub);
@@ -2128,9 +2128,8 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
__ Bind(&slow_path);
- const ExternalLabel label(StubCode::AllocateArrayEntryPoint());
compiler->GenerateCall(token_pos(),
- &label,
+ *StubCode::AllocateArray_entry(),
RawPcDescriptors::kOther,
locs());
__ Bind(&done);
@@ -2401,9 +2400,8 @@ class AllocateContextSlowPath : public SlowPathCode {
compiler->SaveLiveRegisters(locs);
__ movl(EDX, Immediate(instruction_->num_context_variables()));
- const ExternalLabel label(StubCode::AllocateContextEntryPoint());
compiler->GenerateCall(instruction_->token_pos(),
- &label,
+ *StubCode::AllocateContext_entry(),
RawPcDescriptors::kOther,
locs);
ASSERT(instruction_->locs()->out(0).reg() == EAX);
@@ -2458,9 +2456,8 @@ void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(locs()->out(0).reg() == EAX);
__ movl(EDX, Immediate(num_context_variables()));
- const ExternalLabel label(StubCode::AllocateContextEntryPoint());
compiler->GenerateCall(token_pos(),
- &label,
+ *StubCode::AllocateContext_entry(),
RawPcDescriptors::kOther,
locs());
}
@@ -6815,9 +6812,9 @@ void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Isolate* isolate = compiler->isolate();
const Code& stub = Code::Handle(isolate,
StubCode::GetAllocationStubForClass(cls()));
- const ExternalLabel label(stub.EntryPoint());
+ const StubEntry stub_entry(stub);
compiler->GenerateCall(token_pos(),
- &label,
+ stub_entry,
RawPcDescriptors::kOther,
locs());
compiler->AddStubCallTarget(stub);
@@ -6827,8 +6824,10 @@ void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
ASSERT(!compiler->is_optimizing());
- const ExternalLabel label(StubCode::DebugStepCheckEntryPoint());
- compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
+ compiler->GenerateCall(token_pos(),
+ *StubCode::DebugStepCheck_entry(),
+ stub_kind_,
+ locs());
}
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698